Package org.intermine.dataloader
Class EquivalentObjectHints
- java.lang.Object
-
- org.intermine.dataloader.EquivalentObjectHints
-
public class EquivalentObjectHints extends java.lang.Object
Object for holding hint data for the getEquivalentObjects method in IntegrationWriters.- Author:
- Matthew Wakeling
-
-
Constructor Summary
Constructors Constructor Description EquivalentObjectHints(ObjectStore os)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
classNotExists(java.lang.Class<? extends FastPathObject> clazz)
Returns true if there were no instances of the given class in the database.boolean
databaseEmpty()
Returns true if the database was empty at the start of the run.java.util.Set<java.lang.Object>
getQueried(java.lang.String summaryName)
Returns a Set of values that have been tested for a particular class and fieldname.java.util.Set<java.lang.Object>
getValues(java.lang.String summaryName)
Returns a Set of values that were in the database for a particular class and fieldname.boolean
pkQueryFruitless(java.lang.Class<? extends FastPathObject> clazz, java.lang.String fieldName, java.lang.Object value)
Returns true if there were no instances of the given class with the given field set to the given value.
-
-
-
Constructor Detail
-
EquivalentObjectHints
public EquivalentObjectHints(ObjectStore os)
Constructor.- Parameters:
os
- an ObjectStore of a production database
-
-
Method Detail
-
databaseEmpty
public boolean databaseEmpty()
Returns true if the database was empty at the start of the run.- Returns:
- a boolean
-
classNotExists
public boolean classNotExists(java.lang.Class<? extends FastPathObject> clazz)
Returns true if there were no instances of the given class in the database.- Parameters:
clazz
- the class, must be in the model- Returns:
- a boolean
-
pkQueryFruitless
public boolean pkQueryFruitless(java.lang.Class<? extends FastPathObject> clazz, java.lang.String fieldName, java.lang.Object value)
Returns true if there were no instances of the given class with the given field set to the given value.- Parameters:
clazz
- the class, must be in the modelfieldName
- the name of the fieldvalue
- the value- Returns:
- a boolean
-
getQueried
public java.util.Set<java.lang.Object> getQueried(java.lang.String summaryName)
Returns a Set of values that have been tested for a particular class and fieldname.- Parameters:
summaryName
- a String- Returns:
- a Set of values, or an AlwaysSet if too many values were tested
-
getValues
public java.util.Set<java.lang.Object> getValues(java.lang.String summaryName)
Returns a Set of values that were in the database for a particular class and fieldname.- Parameters:
summaryName
- a String- Returns:
- a Set of values, or an AlwaysSet if too many values were tested
-
-