throws SystemException {
lfSocialPackage = toUnwrappedModel(lfSocialPackage);
boolean isNew = lfSocialPackage.isNew();
LFSocialPackageModelImpl lfSocialPackageModelImpl = (LFSocialPackageModelImpl) lfSocialPackage;
Session session = null;
try {
session = openSession();
if (lfSocialPackage.isNew()) {
session.save(lfSocialPackage);
lfSocialPackage.setNew(false);
} else {
session.merge(lfSocialPackage);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFSocialPackageModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfSocialPackageModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AUTHORID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfSocialPackageModelImpl.getOriginalAuthorID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_AUTHORID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AUTHORID,
args);
args = new Object[] { lfSocialPackageModelImpl.getAuthorID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_AUTHORID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_AUTHORID,
args);
}