throws SystemException {
lfQuiz = toUnwrappedModel(lfQuiz);
boolean isNew = lfQuiz.isNew();
LFQuizModelImpl lfQuizModelImpl = (LFQuizModelImpl) lfQuiz;
Session session = null;
try {
session = openSession();
if (lfQuiz.isNew()) {
session.save(lfQuiz);
lfQuiz.setNew(false);
} else {
session.merge(lfQuiz);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFQuizModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfQuizModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfQuizModelImpl.getOriginalCourseID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID,
args);
args = new Object[] { lfQuizModelImpl.getCourseID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_COURSEID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_COURSEID,
args);
}