throws SystemException {
lfCertificateUser = toUnwrappedModel(lfCertificateUser);
boolean isNew = lfCertificateUser.isNew();
LFCertificateUserModelImpl lfCertificateUserModelImpl = (LFCertificateUserModelImpl) lfCertificateUser;
Session session = null;
try {
session = openSession();
if (lfCertificateUser.isNew()) {
session.save(lfCertificateUser);
lfCertificateUser.setNew(false);
} else {
session.merge(lfCertificateUser);
}
} catch (Exception e) {
throw processException(e);
} finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
if (isNew || !LFCertificateUserModelImpl.COLUMN_BITMASK_ENABLED) {
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
}
else {
if ((lfCertificateUserModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfCertificateUserModelImpl.getOriginalCertificateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID,
args);
args = new Object[] {
lfCertificateUserModelImpl.getCertificateID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CERTIFICATEID,
args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CERTIFICATEID,
args);
}
if ((lfCertificateUserModelImpl.getColumnBitmask() &
FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) {
Object[] args = new Object[] {
lfCertificateUserModelImpl.getOriginalUserID()
};
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
args);
args = new Object[] { lfCertificateUserModelImpl.getUserID() };
FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
args);
}