Examples of accessor()


Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                    new Function<AssociationDescriptor, Map<String, EntityReference>>()
                    {
                        @Override
                        public Map<String, EntityReference> map( AssociationDescriptor associationDescriptor )
                        {
                            NamedAssociation<?> assoc = associationState.namedAssociationFor( associationDescriptor.accessor() );
                            Map<String, EntityReference> refs = new LinkedHashMap<>( assoc.count() );
                            for( String name : assoc )
                            {
                                refs.put( name, EntityReference.entityReferenceFor( assoc.get( name ) ) );
                            }
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                                catch( IllegalArgumentException e1 )
                                {
                                    return null;
                                }

                                AccessibleObject associationMethod = associationDescriptor.accessor();
                                Object entity = associationState.associationFor( associationMethod ).get();
                                if( entity != null )
                                {
                                    return ( (Identity) entity ).identity().get();
                                }
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                                catch( IllegalArgumentException e1 )
                                {
                                    return null;
                                }

                                AccessibleObject associationMethod = associationDescriptor.accessor();
                                ManyAssociation<?> state = associationState.manyAssociationFor( associationMethod );
                                List<String> entities = new ArrayList<>( state.count() );
                                for( Object entity : state )
                                {
                                    entities.add( ( (Identity) entity ).identity().get() );
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                                catch( IllegalArgumentException e1 )
                                {
                                    return null;
                                }

                                AccessibleObject associationMethod = associationDescriptor.accessor();
                                NamedAssociation<?> state = associationState.namedAssociationFor( associationMethod );
                                Map<String, String> entities = new LinkedHashMap<>( state.count() );
                                for( String name : state )
                                {
                                    entities.put( name, ( (Identity) state.get( name ) ).identity().get() );
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                            catch( IllegalArgumentException e )
                            {
                                return null;
                            }

                            AccessibleObject associationMethod = associationDescriptor.accessor();
                            Association<Object> association = associationState.associationFor( associationMethod );
                            return EntityReference.entityReferenceFor( association.get() );
                        }
                    },
                    new Function<AssociationDescriptor, Iterable<EntityReference>>()
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                            catch( IllegalArgumentException e )
                            {
                                return Iterables.empty();
                            }

                            ManyAssociation<?> state = associationState.manyAssociationFor( associationDescriptor.accessor() );
                            List<EntityReference> refs = new ArrayList<>( state.count() );
                            for( Object entity : state )
                            {
                                refs.add( EntityReference.entityReferenceFor( entity ) );
                            }
View Full Code Here

Examples of org.qi4j.api.association.AssociationDescriptor.accessor()

                            }
                            catch( IllegalArgumentException e )
                            {
                                return Collections.emptyMap();
                            }
                            AccessibleObject associationMethod = associationDescriptor.accessor();
                            NamedAssociation<Object> assoc = associationState.namedAssociationFor( associationMethod );
                            Map<String, EntityReference> refs = new LinkedHashMap<>( assoc.count() );
                            for( String name : assoc )
                            {
                                refs.put( name, EntityReference.entityReferenceFor( assoc.get( name ) ) );
View Full Code Here

Examples of org.qi4j.api.property.PropertyDescriptor.accessor()

                    {
                        try
                        {
                            PropertyDescriptor propertyDescriptor = entityDescriptor.state()
                                .findPropertyModelByName( descriptor.qualifiedName().name() );
                            return associationState.propertyFor( propertyDescriptor.accessor() ).get();
                        }
                        catch( IllegalArgumentException e )
                        {
                            if( descriptor.valueType().mainType().equals( String.class ) )
                            {
View Full Code Here

Examples of org.qi4j.api.property.PropertyDescriptor.accessor()

                    {
                        try
                        {
                            PropertyDescriptor propertyDescriptor = entityDescriptor.state()
                                .findPropertyModelByName( descriptor.qualifiedName().name() );
                            return associationState.propertyFor( propertyDescriptor.accessor() ).get();
                        }
                        catch( IllegalArgumentException e )
                        {
                            if( descriptor.valueType().mainType().equals( String.class ) )
                            {
View Full Code Here

Examples of org.qi4j.api.property.PropertyDescriptor.accessor()

                        AssociationStateDescriptor entityState = entityDescriptor.state();
                        String propertyName = descriptor.qualifiedName().name();
                        try
                        {
                            PropertyDescriptor propertyDescriptor = entityState.findPropertyModelByName( propertyName );
                            return associationState.propertyFor( propertyDescriptor.accessor() ).get();
                        }
                        catch( IllegalArgumentException e )
                        {
                            if( descriptor.valueType().mainType().equals( String.class ) )
                            {
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.