org.nakedobjects.metamodel.specloader.internal.peer
Class JavaNakedObjectAssociationPeer

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetHolderImpl
      extended by org.nakedobjects.metamodel.specloader.internal.peer.JavaNakedObjectMemberPeer
          extended by org.nakedobjects.metamodel.specloader.internal.peer.JavaNakedObjectAssociationPeer
All Implemented Interfaces:
FacetHolder, Identified, NakedObjectAssociationPeer, NakedObjectMemberPeer
Direct Known Subclasses:
JavaOneToManyAssociationPeer, JavaOneToOneAssociationPeer

public abstract class JavaNakedObjectAssociationPeer
extends JavaNakedObjectMemberPeer
implements NakedObjectAssociationPeer


Field Summary
protected  java.lang.Class<?> type
           
 
Constructor Summary
JavaNakedObjectAssociationPeer(Identifier identifier, java.lang.Class<?> returnType, boolean oneToMany, SpecificationLoader specificationLoader)
           
 
Method Summary
 NakedObjectSpecification getSpecification()
          return the object type, as a Class object, that the method returns.
protected  SpecificationLoader getSpecificationLoader()
           
 boolean isOneToMany()
          If this is a collection.
 boolean isOneToOne()
          If this is a scalar association, representing (in old terminology) a reference to another entity or a value.
 void setType(java.lang.Class<?> type)
           
 
Methods inherited from class org.nakedobjects.metamodel.specloader.internal.peer.JavaNakedObjectMemberPeer
debugData, getIdentifier
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetHolderImpl
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.metamodel.specloader.internal.peer.NakedObjectMemberPeer
debugData
 
Methods inherited from interface org.nakedobjects.metamodel.spec.identifier.Identified
getIdentifier
 
Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet
 

Field Detail

type

protected java.lang.Class<?> type
Constructor Detail

JavaNakedObjectAssociationPeer

public JavaNakedObjectAssociationPeer(Identifier identifier,
                                      java.lang.Class<?> returnType,
                                      boolean oneToMany,
                                      SpecificationLoader specificationLoader)
Method Detail

getSpecification

public NakedObjectSpecification getSpecification()
return the object type, as a Class object, that the method returns.

Specified by:
getSpecification in interface NakedObjectAssociationPeer

setType

public void setType(java.lang.Class<?> type)

isOneToMany

public final boolean isOneToMany()
Description copied from interface: NakedObjectAssociationPeer
If this is a collection.

Opposite of NakedObjectAssociationPeer.isOneToOne().

Specified by:
isOneToMany in interface NakedObjectAssociationPeer

isOneToOne

public final boolean isOneToOne()
Description copied from interface: NakedObjectAssociationPeer
If this is a scalar association, representing (in old terminology) a reference to another entity or a value.

Opposite of NakedObjectAssociationPeer.isOneToMany().

Specified by:
isOneToOne in interface NakedObjectAssociationPeer

getSpecificationLoader

protected SpecificationLoader getSpecificationLoader()


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.