org.intermine.metadata
Class CollectionDescriptor

java.lang.Object
  extended by org.intermine.metadata.FieldDescriptor
      extended by org.intermine.metadata.ReferenceDescriptor
          extended by org.intermine.metadata.CollectionDescriptor

public class CollectionDescriptor
extends ReferenceDescriptor

Describes a field that references a collection of other objects. getReverseReferenceDescriptor() allows one ot work out the multiplicity of the association's other end.


Field Summary
 
Fields inherited from class org.intermine.metadata.ReferenceDescriptor
referencedClassDesc, referencedType, reverseRefDesc, reverseRefName
 
Fields inherited from class org.intermine.metadata.FieldDescriptor
cld, M_N_RELATION, N_ONE_RELATION, name, NOT_RELATION, ONE_N_RELATION, ONE_ONE_RELATION
 
Constructor Summary
CollectionDescriptor(java.lang.String name, java.lang.String referencedType, java.lang.String reverseRefName)
          Construct a CollectionDescriptor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int hashCode()
          
 int relationType()
          Return an integer describing the type of relationship this field represents, where relationship types are 1:1, 1:N, N:1, M:N and "not a relationship".
 java.lang.String toString()
          
 
Methods inherited from class org.intermine.metadata.ReferenceDescriptor
findReferencedDescriptor, getReferencedClassDescriptor, getReferencedClassName, getReverseReferenceDescriptor, getReverseReferenceFieldName
 
Methods inherited from class org.intermine.metadata.FieldDescriptor
getClassDescriptor, getName, isAttribute, isCollection, isReference, setClassDescriptor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionDescriptor

public CollectionDescriptor(java.lang.String name,
                            java.lang.String referencedType,
                            java.lang.String reverseRefName)
Construct a CollectionDescriptor. name and referencedType may not be null.

Parameters:
name - name of this field in parent class
referencedType - the fully qualified name of the business object type in this collection
reverseRefName - name of field in the referenced class that points back to this class (may be null)
Throws:
java.lang.IllegalArgumentException - if arguments are null
Method Detail

relationType

public int relationType()
Return an integer describing the type of relationship this field represents, where relationship types are 1:1, 1:N, N:1, M:N and "not a relationship".

Overrides:
relationType in class ReferenceDescriptor
Returns:
int to describe the relationship type

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class ReferenceDescriptor

hashCode

public int hashCode()

Overrides:
hashCode in class ReferenceDescriptor

toString

public java.lang.String toString()

Overrides:
toString in class ReferenceDescriptor