Package org.qi4j.api.association

Examples of org.qi4j.api.association.Association


        Iterable<? extends AssociationDescriptor> associations = stateDescriptor.associations();
        for( AssociationDescriptor association : associations )
        {
            if( association.isAggregated() )
            {
                Association assoc = state.associationFor( association.accessor() );
                Object aggregatedEntity = assoc.get();
                if( aggregatedEntity != null )
                {
                    aggregatedEntities.add( aggregatedEntity );
                }
            }
View Full Code Here


                return;
            }
            else if( Association.class.isAssignableFrom( memberClass ) )
            {
                Association association = (Association) qi4jField;
                OgnlContext ognlContext = (OgnlContext) aContext;
                Class<?> associationType = (Class) api.associationDescriptorFor( association ).type();
                Object convertedValue = getConvertedType(
                    ognlContext, aTarget, null, fieldName, aPropertyValue, associationType );
                if( convertedValue == OgnlRuntime.NoConversionPossible )
                {
                    throw new OgnlException( "Could not convert value to association type" );
                }
                try
                {
                    association.set( convertedValue );
                }
                catch( ConstraintViolationException e )
                {
                    Collection<ConstraintViolation> violations = e.constraintViolations();
                    handleConstraintViolation( aContext, aTarget, fieldName, aPropertyValue, violations );
View Full Code Here

TOP

Related Classes of org.qi4j.api.association.Association

Copyright © 2018 www.massapicom. 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.