Package org.intermine.metadata
Class PrimaryKey
- java.lang.Object
-
- org.intermine.metadata.PrimaryKey
-
public class PrimaryKey extends java.lang.Object
Class representing a primary key as a list of field names- Author:
- Andrew Varley, Mark Woodbridge
-
-
Constructor Summary
Constructors Constructor Description PrimaryKey(java.lang.String name, java.lang.String fields, ClassDescriptor cld)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
ClassDescriptor
getClassDescriptor()
Return the ClassDescriptor for class this key is defined forjava.util.Set<java.lang.String>
getFieldNames()
Return the Set of field namesjava.lang.String
getName()
Return the nameint
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PrimaryKey
public PrimaryKey(java.lang.String name, java.lang.String fields, ClassDescriptor cld)
Constructor- Parameters:
name
- the name to use for the primary keyfields
- a comma-delimited list of field namescld
- the ClassDescriptor that this PrimaryKey refers to
-
-
Method Detail
-
getName
public java.lang.String getName()
Return the name- Returns:
- name of this primary key
-
getClassDescriptor
public ClassDescriptor getClassDescriptor()
Return the ClassDescriptor for class this key is defined for- Returns:
- the class descriptor
-
getFieldNames
public java.util.Set<java.lang.String> getFieldNames()
Return the Set of field names- Returns:
- the Set of field names
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-