throws SystemException {
lfQuizTreeElement = toUnwrappedModel(lfQuizTreeElement);
boolean isNew = lfQuizTreeElement.isNew();
LFQuizTreeElementModelImpl lfQuizTreeElementModelImpl = (LFQuizTreeElementModelImpl) lfQuizTreeElement;
Session session = null;
try {
session = openSession();
if (lfQuizTreeElement.isNew()) {
session.save(lfQuizTreeElement);
lfQuizTreeElement.setNew(false);
} else {
session.merge(lfQuizTreeElement);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFQuizTreeElementModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfQuizTreeElementModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_QUIZID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfQuizTreeElementModelImpl.getOriginalQuizID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_QUIZID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_QUIZID,
args);
args = new Object[] { lfQuizTreeElementModelImpl.getQuizID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_QUIZID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_QUIZID,
args);
}