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