throws SystemException {
lfTincanLrsState = toUnwrappedModel(lfTincanLrsState);
boolean isNew = lfTincanLrsState.isNew();
LFTincanLrsStateModelImpl lfTincanLrsStateModelImpl = (LFTincanLrsStateModelImpl) lfTincanLrsState;
Session session = null;
try {
session = openSession();
if (lfTincanLrsState.isNew()) {
session.save(lfTincanLrsState);
lfTincanLrsState.setNew(false);
} else {
session.merge(lfTincanLrsState);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFTincanLrsStateModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfTincanLrsStateModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsStateModelImpl.getOriginalActivityId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYID,
args);
args = new Object[] { lfTincanLrsStateModelImpl.getActivityId() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYID,
args);
}
if ((lfTincanLrsStateModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDSTATEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsStateModelImpl.getOriginalActivityId(),
lfTincanLrsStateModelImpl.getOriginalStateId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYIDANDSTATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDSTATEID,
args);
args = new Object[] {
lfTincanLrsStateModelImpl.getActivityId(),
lfTincanLrsStateModelImpl.getStateId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYIDANDSTATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDSTATEID,
args);
}
if ((lfTincanLrsStateModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDAGENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsStateModelImpl.getOriginalActivityId(),
lfTincanLrsStateModelImpl.getOriginalAgentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYIDANDAGENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDAGENTID,
args);
args = new Object[] {
lfTincanLrsStateModelImpl.getActivityId(),
lfTincanLrsStateModelImpl.getAgentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACTIVITYIDANDAGENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVITYIDANDAGENTID,