}
private static RealmConfigurationMetaData createRealmConfigurationMetaData(RealmType realmType)
{
RealmConfigurationMetaDataImpl realmMD = new RealmConfigurationMetaDataImpl();
realmMD.setId(realmType.getId());
if (realmType.getIdentityTypeMappings() != null)
{
realmMD.setIdentityMapping(realmType.getIdentityTypeMappings().getIdentityMapping());
}
realmMD.setIdentityRepositoryIdRef(realmType.getRepositoryIdRef());
Map<String, String> groupMappings = new HashMap<String, String>();
if (realmType.getIdentityTypeMappings() != null
&& realmType.getIdentityTypeMappings().getGroupTypeMapping() != null)
{
for (GroupTypeMappingType groupTypeMappingType : realmType.getIdentityTypeMappings().getGroupTypeMapping())
{
groupMappings.put(groupTypeMappingType.getGroupTypeName(), groupTypeMappingType.getIdentityObjectTypeName());
}
}
realmMD.setGroupTypeMappings(groupMappings);
realmMD.setOptions(createOptions(realmType.getOptions()));
return realmMD;
}