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