}
this.associations = new LinkedHashMap<>();
for( AssociationDescriptor associationDescriptor : valueModel.state().associations() )
{
AssociationInfo builderInfo = ( (AssociationModel) associationDescriptor ).getBuilderInfo();
EntityReference value = stateResolver.getAssociationState( associationDescriptor );
AssociationInstance<Object> associationInstance1 = new AssociationInstance<>(
builderInfo,
currentModule.getEntityFunction(),
new ReferenceProperty( value ) );
associations.put( associationDescriptor.accessor(), associationInstance1 );
}
this.manyAssociations = new LinkedHashMap<>();
for( AssociationDescriptor associationDescriptor : valueModel.state().manyAssociations() )
{
AssociationInfo builderInfo = ( (ManyAssociationModel) associationDescriptor ).getBuilderInfo();
List<EntityReference> value = stateResolver.getManyAssociationState( associationDescriptor );
ManyAssociationValueState manyAssociationState = new ManyAssociationValueState( value );
ManyAssociationInstance<Object> associationInstance = new ManyAssociationInstance<>(
builderInfo,
currentModule.getEntityFunction(),
manyAssociationState );
manyAssociations.put( associationDescriptor.accessor(), associationInstance );
}
this.namedAssociations = new LinkedHashMap<>();
for( AssociationDescriptor associationDescriptor : valueModel.state().namedAssociations() )
{
AssociationInfo builderInfo = ( (NamedAssociationModel) associationDescriptor ).getBuilderInfo();
Map<String, EntityReference> value = stateResolver.getNamedAssociationState( associationDescriptor );
NamedAssociationValueState namedAssociationState = new NamedAssociationValueState( value );
NamedAssociationInstance<Object> associationInstance = new NamedAssociationInstance<>(
builderInfo,
currentModule.getEntityFunction(),