org.qi4j.api.entity.association
Class GenericAssociationInfo

java.lang.Object
  extended by org.qi4j.api.entity.association.GenericAssociationInfo
All Implemented Interfaces:
AssociationInfo

public final class GenericAssociationInfo
extends Object
implements AssociationInfo


Constructor Summary
GenericAssociationInfo(MetaInfo infos, boolean immutable, boolean aggregated, QualifiedName qualifiedName, Type type)
           
GenericAssociationInfo(Method accessor, MetaInfo metainfo)
           
GenericAssociationInfo(Method accessor, MetaInfo metainfo, boolean immutable)
           
 
Method Summary
static Type getAssociationType(Method accessor)
           
static Type getAssociationType(Type methodReturnType)
           
 boolean isAggregated()
           
 boolean isImmutable()
           
<T> T
metaInfo(Class<T> infoType)
          Get metadata that implements the given type
 String name()
           
 QualifiedName qualifiedName()
          Get the qualified name of the association.
 Type type()
          Get the type of the associated Entities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericAssociationInfo

public GenericAssociationInfo(MetaInfo infos,
                              boolean immutable,
                              boolean aggregated,
                              QualifiedName qualifiedName,
                              Type type)

GenericAssociationInfo

public GenericAssociationInfo(Method accessor,
                              MetaInfo metainfo)

GenericAssociationInfo

public GenericAssociationInfo(Method accessor,
                              MetaInfo metainfo,
                              boolean immutable)
Method Detail

getAssociationType

public static Type getAssociationType(Method accessor)

getAssociationType

public static Type getAssociationType(Type methodReturnType)

metaInfo

public <T> T metaInfo(Class<T> infoType)
Description copied from interface: AssociationInfo
Get metadata that implements the given type

Specified by:
metaInfo in interface AssociationInfo
Parameters:
infoType - the type of metadata to be returned
Returns:
the metadata for the given type, or null if no such metadata has been registered

name

public String name()

qualifiedName

public QualifiedName qualifiedName()
Description copied from interface: AssociationInfo
Get the qualified name of the association. This is constructed by concatenating the name of the declaring interface with the name of the method, using ":" as separator. Example:
com.somecompany.MyInterface with association method
Association someAssociation();
will have the qualified name:
com.somecompany.MyInterface:someAssociation

Specified by:
qualifiedName in interface AssociationInfo
Returns:
the qualified name of the association

type

public Type type()
Description copied from interface: AssociationInfo
Get the type of the associated Entities

Specified by:
type in interface AssociationInfo
Returns:
the type of the associated Entities

isImmutable

public boolean isImmutable()
Specified by:
isImmutable in interface AssociationInfo

isAggregated

public boolean isAggregated()
Specified by:
isAggregated in interface AssociationInfo