throws SystemException {
lfObjectiveMap = toUnwrappedModel(lfObjectiveMap);
boolean isNew = lfObjectiveMap.isNew();
LFObjectiveMapModelImpl lfObjectiveMapModelImpl = (LFObjectiveMapModelImpl) lfObjectiveMap;
Session session = null;
try {
session = openSession();
if (lfObjectiveMap.isNew()) {
session.save(lfObjectiveMap);
lfObjectiveMap.setNew(false);
} else {
session.merge(lfObjectiveMap);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFObjectiveMapModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfObjectiveMapModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_OBJECTIVEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfObjectiveMapModelImpl.getOriginalObjectiveID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_OBJECTIVEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_OBJECTIVEID,
args);
args = new Object[] { lfObjectiveMapModelImpl.getObjectiveID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_OBJECTIVEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_OBJECTIVEID,
args);