Package org.intermine.dataloader
Class PriorityConfig
- java.lang.Object
-
- org.intermine.dataloader.PriorityConfig
-
public class PriorityConfig extends java.lang.Object
Class holding data source priority configuration for a Model.- Author:
- Matthew Wakeling
-
-
Constructor Summary
Constructors Constructor Description PriorityConfig(Model model)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>
getPriorities(java.lang.Class<? extends FastPathObject> clazz, java.lang.String fieldName)
Returns a List of data source names representing the priority for a given class and fieldname pair.
-
-
-
Constructor Detail
-
PriorityConfig
public PriorityConfig(Model model)
Constructor.- Parameters:
model
- the Model of the production database- Throws:
java.lang.IllegalArgumentException
- if the priorities are misconfigured
-
-
Method Detail
-
getPriorities
protected java.util.List<java.lang.String> getPriorities(java.lang.Class<? extends FastPathObject> clazz, java.lang.String fieldName)
Returns a List of data source names representing the priority for a given class and fieldname pair. This method searches all the parent classes for a priority config, and throws an exception if more than one is found. Results are cached for performance.- Parameters:
clazz
- the class of the object being createdfieldName
- the name of the field that the priority is for- Returns:
- a List of data source names
- Throws:
java.lang.IllegalArgumentException
- if more than one priority config matches
-
-