throws SystemException {
lfQuestionCategory = toUnwrappedModel(lfQuestionCategory);
boolean isNew = lfQuestionCategory.isNew();
LFQuestionCategoryModelImpl lfQuestionCategoryModelImpl = (LFQuestionCategoryModelImpl) lfQuestionCategory;
Session session = null;
try {
session = openSession();
if (lfQuestionCategory.isNew()) {
session.save(lfQuestionCategory);
lfQuestionCategory.setNew(false);
} else {
session.merge(lfQuestionCategory);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFQuestionCategoryModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfQuestionCategoryModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfQuestionCategoryModelImpl.getOriginalCourseId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID,
args);
args = new Object[] { lfQuestionCategoryModelImpl.getCourseId() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID,
args);
}
if ((lfQuestionCategoryModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDPARENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfQuestionCategoryModelImpl.getOriginalCourseId(),
lfQuestionCategoryModelImpl.getOriginalParentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEIDANDPARENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDPARENTID,
args);
args = new Object[] {
lfQuestionCategoryModelImpl.getCourseId(),
lfQuestionCategoryModelImpl.getParentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEIDANDPARENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDPARENTID,