throws SystemException {
lfQuestion = toUnwrappedModel(lfQuestion);
boolean isNew = lfQuestion.isNew();
LFQuestionModelImpl lfQuestionModelImpl = (LFQuestionModelImpl) lfQuestion;
Session session = null;
try {
session = openSession();
if (lfQuestion.isNew()) {
session.save(lfQuestion);
lfQuestion.setNew(false);
} else {
session.merge(lfQuestion);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFQuestionModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfQuestionModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDCATEGORYID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfQuestionModelImpl.getOriginalCourseId(),
lfQuestionModelImpl.getOriginalCategoryId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEIDANDCATEGORYID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDCATEGORYID,
args);
args = new Object[] {
lfQuestionModelImpl.getCourseId(),
lfQuestionModelImpl.getCategoryId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEIDANDCATEGORYID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEIDANDCATEGORYID,