Package org.intermine.metadata
Class PrimaryKeyUtil
- java.lang.Object
-
- org.intermine.metadata.PrimaryKeyUtil
-
public abstract class PrimaryKeyUtil extends java.lang.ObjectUtility methods for PrimaryKey objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Map<java.lang.String,java.util.Properties>modelKeysprotected static java.util.Map<ClassDescriptor,java.util.Map<java.lang.String,PrimaryKey>>primaryKeyCache
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.PropertiesgetKeyProperties(java.lang.String modelName)Return the Properties that specify the key fields for the classes in this Modelstatic java.util.Map<java.lang.String,PrimaryKey>getPrimaryKeys(ClassDescriptor cld)Retrieve a map from key name to PrimaryKey object.
-
-
-
Field Detail
-
modelKeys
protected static java.util.Map<java.lang.String,java.util.Properties> modelKeys
-
primaryKeyCache
protected static java.util.Map<ClassDescriptor,java.util.Map<java.lang.String,PrimaryKey>> primaryKeyCache
-
-
Method Detail
-
getPrimaryKeys
public static java.util.Map<java.lang.String,PrimaryKey> getPrimaryKeys(ClassDescriptor cld)
Retrieve a map from key name to PrimaryKey object. The Map contains all the primary keys that exist on a particular class, without performing any recursion.- Parameters:
cld- the ClassDescriptor to fetch primary keys for- Returns:
- the Map from key names to PrimaryKeys
-
getKeyProperties
public static java.util.Properties getKeyProperties(java.lang.String modelName)
Return the Properties that specify the key fields for the classes in this Model- Parameters:
modelName- name of the model- Returns:
- the relevant Properties
-
-