Examples of AssociationModel


Examples of org.qi4j.runtime.association.AssociationModel

        Map<AccessibleObject, Object> state = state();
        Association<T> association = (Association<T>) state.get( accessor );

        if( association == null )
        {
            final AssociationModel associationModel = stateModel.getAssociation( accessor );
            if (associationModel == null)
                throw new IllegalArgumentException("No such association:"+accessor);

            association = new AssociationInstance<T>( entityState instanceof BuilderEntityState ? associationModel.getBuilderInfo() : associationModel, entityFunction, new Property<EntityReference>()
            {
                @Override
                public EntityReference get()
                {
                    return entityState.getAssociation( associationModel.qualifiedName() );
                }

                @Override
                public void set( EntityReference newValue ) throws IllegalArgumentException, IllegalStateException
                {
                    entityState.setAssociation( associationModel.qualifiedName(), newValue );
                }
            });
            state.put( accessor, association );
        }
View Full Code Here

Examples of org.qi4j.runtime.association.AssociationModel

        {
            associationValueConstraintsInstance = valueConstraintsModel.newInstance();
        }

        MetaInfo metaInfo = associationDeclarations.getMetaInfo( accessor );
        AssociationModel associationModel = new AssociationModel( accessor, valueConstraintsInstance, associationValueConstraintsInstance, metaInfo );
        return associationModel;
    }
View Full Code Here

Examples of org.qi4j.runtime.association.AssociationModel

        {
            associationValueConstraintsInstance = valueConstraintsModel.newInstance();
        }

        MetaInfo metaInfo = stateDeclarations.getMetaInfo( accessor );
        AssociationModel associationModel = new AssociationModel( accessor, valueConstraintsInstance, associationValueConstraintsInstance, metaInfo );
        return associationModel;
    }
View Full Code Here

Examples of org.qi4j.runtime.association.AssociationModel

        {
            associationValueConstraintsInstance = valueConstraintsModel.newInstance();
        }

        MetaInfo metaInfo = stateDeclarations.metaInfoFor( accessor );
        AssociationModel associationModel = new AssociationModel( accessor, valueConstraintsInstance, associationValueConstraintsInstance, metaInfo );
        return associationModel;
    }
View Full Code Here

Examples of org.qi4j.runtime.association.AssociationModel

        Map<AccessibleObject, Object> state = state();
        Association<T> association = (Association<T>) state.get( accessor );

        if( association == null )
        {
            final AssociationModel associationModel = stateModel.getAssociation( accessor );
            association = new AssociationInstance<>(
                entityState instanceof BuilderEntityState
                ? associationModel.getBuilderInfo()
                : associationModel,
                entityFunction,
                new Property<EntityReference>()
            {
                @Override
                public EntityReference get()
                {
                    return entityState.associationValueOf( associationModel.qualifiedName() );
                }

                @Override
                public void set( EntityReference newValue )
                    throws IllegalArgumentException, IllegalStateException
                {
                    entityState.setAssociationValue( associationModel.qualifiedName(), newValue );
                }
            } );
            state.put( accessor, association );
        }
View Full Code Here

Examples of org.qi4j.runtime.association.AssociationModel

        {
            associationValueConstraintsInstance = valueConstraintsModel.newInstance();
        }

        MetaInfo metaInfo = associationDeclarations.metaInfoFor( accessor );
        AssociationModel associationModel = new AssociationModel( accessor, valueConstraintsInstance, associationValueConstraintsInstance, metaInfo );
        return associationModel;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.