throws SystemException {
lfConfig = toUnwrappedModel(lfConfig);
boolean isNew = lfConfig.isNew();
LFConfigModelImpl lfConfigModelImpl = (LFConfigModelImpl) lfConfig;
Session session = null;
try {
session = openSession();
if (lfConfig.isNew()) {
session.save(lfConfig);
lfConfig.setNew(false);
} else {
session.merge(lfConfig);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFConfigModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfConfigModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DATAKEY.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfConfigModelImpl.getOriginalDataKey()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_DATAKEY, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DATAKEY,
args);
args = new Object[] { lfConfigModelImpl.getDataKey() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_DATAKEY, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_DATAKEY,
args);
}