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