For IntelliJ IDEA,
Android Studio or Eclipse



private void fillEntityFromModel(UserConsentModel consent, MongoUserConsentEntity consentEntity) { List<String> roleIds = new LinkedList<String>(); for (RoleModel role : consent.getGrantedRoles()) { roleIds.add(role.getId()); } consentEntity.setGrantedRoles(roleIds); List<String> protMapperIds = new LinkedList<String>(); for (ProtocolMapperModel protMapperModel : consent.getGrantedProtocolMappers()) { protMapperIds.add(protMapperModel.getId()); } consentEntity.setGrantedProtocolMappers(protMapperIds); consentEntity.setLastUpdatedDate(Time.currentTimeMillis()); }
for (ProtocolMapperModel protocolMapper : model.getGrantedProtocolMappers()) { String protocol = protocolMapper.getProtocol(); List<String> currentProtocolMappers = grantedProtocolMappers.get(protocol);
processRoles(consent.getGrantedRoles(), realmRolesGranted, resourceRolesGranted); for (ProtocolMapperModel protocolMapper : consent.getGrantedProtocolMappers()) { claimsGranted.add(protocolMapper.getConsentText());