org.qi4j.api.query.grammar
Interface AssociationReference

All Known Subinterfaces:
ManyAssociationReference

public interface AssociationReference

An expression related to Association.


Nested Class Summary
static class AssociationReference.ReferenceType
           
 
Method Summary
 Method associationAccessor()
          Get the accessor method for the association.
 Class<?> associationDeclaringType()
          Get the type of the interface that declared the association.
 String associationName()
          Get the name of the association, which is equal to the name of the method that declared it.
 Type associationType()
          Get the type of the assocition.
 Object eval(Object target)
          Evaluates the association reference against a target object.
 AssociationReference traversedAssociation()
          Gets the traversed association used to get to this association or null if there was no traversal involved.
 

Method Detail

associationName

String associationName()
Get the name of the association, which is equal to the name of the method that declared it.

Returns:
the name of the association

associationDeclaringType

Class<?> associationDeclaringType()
Get the type of the interface that declared the association.

Returns:
the type of property that declared the association

associationAccessor

Method associationAccessor()
Get the accessor method for the association.

Returns:
accessor method

associationType

Type associationType()
Get the type of the assocition. If the association is declared as Association then X is returned.

Returns:
the association type

traversedAssociation

AssociationReference traversedAssociation()
Gets the traversed association used to get to this association or null if there was no traversal involved.

Returns:
traversed association used to get to this association.

eval

Object eval(Object target)
Evaluates the association reference against a target object.

Parameters:
target - target object
Returns:
associated instance from the target