boolean merge) throws SystemException {
meetupsRegistration = toUnwrappedModel(meetupsRegistration);
boolean isNew = meetupsRegistration.isNew();
MeetupsRegistrationModelImpl meetupsRegistrationModelImpl = (MeetupsRegistrationModelImpl)meetupsRegistration;
Session session = null;
try {
session = openSession();
BatchSessionUtil.update(session, meetupsRegistration, merge);
meetupsRegistration.setNew(false);
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST);
EntityCacheUtil.putResult(MeetupsRegistrationModelImpl.ENTITY_CACHE_ENABLED,
MeetupsRegistrationImpl.class, meetupsRegistration.getPrimaryKey(),
meetupsRegistration);
if (!isNew &&
((meetupsRegistration.getUserId() != meetupsRegistrationModelImpl.getOriginalUserId()) ||
(meetupsRegistration.getMeetupsEntryId() != meetupsRegistrationModelImpl.getOriginalMeetupsEntryId()))) {
FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_U_ME,
new Object[] {
new Long(meetupsRegistrationModelImpl.getOriginalUserId()),
new Long(meetupsRegistrationModelImpl.getOriginalMeetupsEntryId())
});
}
if (isNew ||
((meetupsRegistration.getUserId() != meetupsRegistrationModelImpl.getOriginalUserId()) ||
(meetupsRegistration.getMeetupsEntryId() != meetupsRegistrationModelImpl.getOriginalMeetupsEntryId()))) {
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_U_ME,
new Object[] {
new Long(meetupsRegistration.getUserId()),
new Long(meetupsRegistration.getMeetupsEntryId())
}, meetupsRegistration);