throws SystemException {
lfTincanLrsAgentProfile = toUnwrappedModel(lfTincanLrsAgentProfile);
boolean isNew = lfTincanLrsAgentProfile.isNew();
LFTincanLrsAgentProfileModelImpl lfTincanLrsAgentProfileModelImpl = (LFTincanLrsAgentProfileModelImpl) lfTincanLrsAgentProfile;
Session session = null;
try {
session = openSession();
if (lfTincanLrsAgentProfile.isNew()) {
session.save(lfTincanLrsAgentProfile);
lfTincanLrsAgentProfile.setNew(false);
} else {
session.merge(lfTincanLrsAgentProfile);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFTincanLrsAgentProfileModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfTincanLrsAgentProfileModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PROFILEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsAgentProfileModelImpl.getOriginalProfileId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PROFILEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PROFILEID,
args);
args = new Object[] {
lfTincanLrsAgentProfileModelImpl.getProfileId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PROFILEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PROFILEID,
args);
}
if ((lfTincanLrsAgentProfileModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AGENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfTincanLrsAgentProfileModelImpl.getOriginalAgentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_AGENTID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AGENTID,
args);
args = new Object[] {
lfTincanLrsAgentProfileModelImpl.getAgentId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_AGENTID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AGENTID,
args);