throws SystemException {
lfUser = toUnwrappedModel(lfUser);
boolean isNew = lfUser.isNew();
LFUserModelImpl lfUserModelImpl = (LFUserModelImpl) lfUser;
Session session = null;
try {
session = openSession();
if (lfUser.isNew()) {
session.save(lfUser);
lfUser.setNew(false);
} else {
session.merge(lfUser);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFUserModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfUserModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDCOLLECTION.getColumnBitmask()) != 0) {
Object[] args = new Object[] { lfUserModelImpl.getOriginalId() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERIDCOLLECTION,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDCOLLECTION,
args);
args = new Object[] { lfUserModelImpl.getId() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERIDCOLLECTION,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDCOLLECTION,
args);