throws SystemException {
lfAchievementUser = toUnwrappedModel(lfAchievementUser);
boolean isNew = lfAchievementUser.isNew();
LFAchievementUserModelImpl lfAchievementUserModelImpl = (LFAchievementUserModelImpl) lfAchievementUser;
Session session = null;
try {
session = openSession();
if (lfAchievementUser.isNew()) {
session.save(lfAchievementUser);
lfAchievementUser.setNew(false);
} else {
session.merge(lfAchievementUser);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFAchievementUserModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfAchievementUserModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfAchievementUserModelImpl.getOriginalUserId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
args);
args = new Object[] { lfAchievementUserModelImpl.getUserId() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
args);
}
if ((lfAchievementUserModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACHIEVEMENTID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfAchievementUserModelImpl.getOriginalAchievementId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACHIEVEMENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACHIEVEMENTID,
args);
args = new Object[] {
lfAchievementUserModelImpl.getAchievementId()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ACHIEVEMENTID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACHIEVEMENTID,