throws SystemException {
lfCertificateSite = toUnwrappedModel(lfCertificateSite);
boolean isNew = lfCertificateSite.isNew();
LFCertificateSiteModelImpl lfCertificateSiteModelImpl = (LFCertificateSiteModelImpl) lfCertificateSite;
Session session = null;
try {
session = openSession();
if (lfCertificateSite.isNew()) {
session.save(lfCertificateSite);
lfCertificateSite.setNew(false);
} else {
session.merge(lfCertificateSite);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFCertificateSiteModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfCertificateSiteModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfCertificateSiteModelImpl.getOriginalCertificateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID,
args);
args = new Object[] {
lfCertificateSiteModelImpl.getCertificateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID,
args);
}
if ((lfCertificateSiteModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEIDANDSITEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfCertificateSiteModelImpl.getOriginalCertificateID(),
lfCertificateSiteModelImpl.getOriginalSiteID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEIDANDSITEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEIDANDSITEID,
args);
args = new Object[] {
lfCertificateSiteModelImpl.getCertificateID(),
lfCertificateSiteModelImpl.getSiteID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEIDANDSITEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEIDANDSITEID,