throws PortalException, SystemException {
User user = userLocalService.getUserById(userId);
Date now = new Date();
MeetupsRegistration meetupsRegistration =
meetupsRegistrationPersistence.fetchByU_ME(
userId, meetupsEntryId);
if (meetupsRegistration == null) {
long meetupsRegistrationId = counterLocalService.increment();
meetupsRegistration = meetupsRegistrationPersistence.create(
meetupsRegistrationId);
meetupsRegistration.setCompanyId(user.getCompanyId());
meetupsRegistration.setUserId(user.getUserId());
meetupsRegistration.setUserName(user.getFullName());
meetupsRegistration.setCreateDate(now);
meetupsRegistration.setMeetupsEntryId(meetupsEntryId);
}
meetupsRegistration.setModifiedDate(now);
meetupsRegistration.setStatus(status);
meetupsRegistration.setComments(comments);
meetupsRegistrationPersistence.update(meetupsRegistration, false);
return meetupsRegistration;
}