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