Package org.intermine.metadata
Class CollectionDescriptor
- java.lang.Object
-
- org.intermine.metadata.FieldDescriptor
-
- org.intermine.metadata.ReferenceDescriptor
-
- 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
Constructors Constructor Description CollectionDescriptor(java.lang.String name, java.lang.String referencedType, java.lang.String reverseRefName)Construct a CollectionDescriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()intrelationType()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.StringtoString()-
Methods inherited from class org.intermine.metadata.ReferenceDescriptor
findReferencedDescriptor, getReferencedClassDescriptor, getReferencedClassName, getReverseReferenceDescriptor, getReverseReferenceFieldName, toJSONString
-
Methods inherited from class org.intermine.metadata.FieldDescriptor
getClassDescriptor, getName, isAttribute, isCollection, isReference, setClassDescriptor
-
-
-
-
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 classreferencedType- the fully qualified name of the business object type in this collectionreverseRefName- 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:
relationTypein classReferenceDescriptor- Returns:
- int to describe the relationship type
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classReferenceDescriptor
-
hashCode
public int hashCode()
- Overrides:
hashCodein classReferenceDescriptor
-
toString
public java.lang.String toString()
- Overrides:
toStringin classReferenceDescriptor
-
-