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