throws SystemException {
lfObjectiveState = toUnwrappedModel(lfObjectiveState);
boolean isNew = lfObjectiveState.isNew();
LFObjectiveStateModelImpl lfObjectiveStateModelImpl = (LFObjectiveStateModelImpl) lfObjectiveState;
Session session = null;
try {
session = openSession();
if (lfObjectiveState.isNew()) {
session.save(lfObjectiveState);
lfObjectiveState.setNew(false);
} else {
session.merge(lfObjectiveState);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFObjectiveStateModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfObjectiveStateModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYSTATEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfObjectiveStateModelImpl.getOriginalActivityStateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYSTATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYSTATEID,
args);
args = new Object[] {
lfObjectiveStateModelImpl.getActivityStateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYSTATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYSTATEID,