throws SystemException {
lfPackageComment = toUnwrappedModel(lfPackageComment);
boolean isNew = lfPackageComment.isNew();
LFPackageCommentModelImpl lfPackageCommentModelImpl = (LFPackageCommentModelImpl) lfPackageComment;
Session session = null;
try {
session = openSession();
if (lfPackageComment.isNew()) {
session.save(lfPackageComment);
lfPackageComment.setNew(false);
} else {
session.merge(lfPackageComment);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFPackageCommentModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfPackageCommentModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SOCIALPACKAGEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfPackageCommentModelImpl.getOriginalSocialPackageID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SOCIALPACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SOCIALPACKAGEID,
args);
args = new Object[] {
lfPackageCommentModelImpl.getSocialPackageID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SOCIALPACKAGEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SOCIALPACKAGEID,