@java.lang.SuppressWarnings("unused") public interface EntityDataLoader
Used to load XML entity data into the database or into an EntityList. The XML can come from
a specific location, XML text already read from somewhere, or by searching all component data directories
and the entity-facade.load-data elements for XML entity data files that match a type in the Set of types
specified.
The document should have a root element like <entity-facade-xml type="seed">
. The
type attribute will be used to determine if the file should be loaded by whether or not it matches the values
specified for data types on the loader.
Type Params | Return Type | Name and description |
---|---|---|
|
public java.util.List<java.lang.String> |
check() Only check the data against matching records in the database. |
|
public long |
check(java.util.List<java.lang.String> messageList) |
|
public java.util.List<java.util.Map<java.lang.String, java.lang.Object>> |
checkInfo() A variation on check() that returns structured field diff information instead of diff info in messages |
|
public long |
checkInfo(java.util.List<java.util.Map<java.lang.String, java.lang.Object>> diffInfoList, java.util.List<java.lang.String> messageList) |
|
public EntityDataLoader |
componentNameList(java.util.List<java.lang.String> componentNames) Used along with dataTypes; a list of component names to load data from. |
|
public EntityDataLoader |
csvCommentStart(char commentStart) |
|
public EntityDataLoader |
csvDelimiter(char delimiter) |
|
public EntityDataLoader |
csvEntityName(java.lang.String entityName) For CSV files use this name (entity or service name) instead of looking for it on line one in the file |
|
public EntityDataLoader |
csvFieldNames(java.util.List<java.lang.String> fieldNames) For CSV files use these field names instead of looking for them on line two in the file |
|
public EntityDataLoader |
csvQuoteChar(char quoteChar) |
|
public EntityDataLoader |
csvText(java.lang.String csvText) |
|
public EntityDataLoader |
dataTypes(java.util.Set<java.lang.String> dataTypes) A Set of data types to match against the candidate files from the component data directories and the entity-facade.load-data elements. |
|
public EntityDataLoader |
defaultValues(java.util.Map<java.lang.String, java.lang.Object> defaultValues) Default values for all records to load, if applicable for given entity or service |
|
public EntityDataLoader |
disableAuditLog(boolean disable) |
|
public EntityDataLoader |
disableDataFeed(boolean disable) |
|
public EntityDataLoader |
disableEntityEca(boolean disable) Set to true to disable Entity Facade ECA rules (for this import only, does not affect other things happening in the system). |
|
public EntityDataLoader |
disableFkCreate(boolean disable) |
|
public EntityDataLoader |
dummyFks(boolean dummyFks) If true will check all foreign key relationships for each value and if any of them are missing create a new record with primary key only to avoid foreign key constraint errors. |
|
public EntityDataLoader |
jsonText(java.lang.String jsonText) |
|
public EntityList |
list() Create an EntityList with all of the values from the data file(s). |
|
public long |
load() Load the values into the database(s). |
|
public long |
load(java.util.List<java.lang.String> messageList) |
|
public EntityDataLoader |
location(java.lang.String location) Location of the data file to load. |
|
public EntityDataLoader |
locationList(java.util.List<java.lang.String> locationList) List of locations of files to load. |
|
public EntityDataLoader |
messageNoActionFiles(boolean messageNoActionFiles) Files with no actions (or no messages for check) are logged in the check and load message list by default, set to false to not add messages for them |
|
public EntityDataLoader |
onlyCreate(boolean onlyInsert) If true only creates records that don't exist, does not update existing records. |
|
public EntityDataLoader |
transactionTimeout(int tt) The transaction timeout for this data load in seconds. |
|
public EntityDataLoader |
useTryInsert(boolean useTryInsert) If true instead of doing a query for each value from the file it will just try to insert it and if it fails then it will try to update the existing record. |
|
public EntityDataLoader |
xmlText(java.lang.String xmlText) String with XML text in it, ready to be parsed. |
Only check the data against matching records in the database. Report on records that don't exist in the database and any differences with records that have matching primary keys.
A variation on check() that returns structured field diff information instead of diff info in messages
Used along with dataTypes; a list of component names to load data from. If none specified will load from all components.
For CSV files use this name (entity or service name) instead of looking for it on line one in the file
For CSV files use these field names instead of looking for them on line two in the file
A Set of data types to match against the candidate files from the component data directories and the entity-facade.load-data elements.
Default values for all records to load, if applicable for given entity or service
Set to true to disable Entity Facade ECA rules (for this import only, does not affect other things happening in the system).
If true will check all foreign key relationships for each value and if any of them are missing create a new record with primary key only to avoid foreign key constraint errors. This should only be used when you are confident that the rest of the data for these new fk records will be loaded from somewhere else to avoid having orphaned records.
Create an EntityList with all of the values from the data file(s).
Load the values into the database(s).
Location of the data file to load. Can be called multiple times to load multiple files.
List of locations of files to load. Will be added to running list, so can be called multiple times and along with the location() method too.
Files with no actions (or no messages for check) are logged in the check and load message list by default, set to false to not add messages for them
If true only creates records that don't exist, does not update existing records.
The transaction timeout for this data load in seconds. Defaults to 3600 which is 1 hour.
If true instead of doing a query for each value from the file it will just try to insert it and if it fails then it will try to update the existing record. Good for situations where most of the values will be new in the db.
String with XML text in it, ready to be parsed.