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 | Name and description |
|---|---|
java.util.List<java.lang.String> |
check()Only check the data against matching records in the database. |
long |
check(java.util.List<java.lang.String> messageList) |
EntityDataLoader |
componentNameList(java.util.List<java.lang.String> componentNames)Used along with dataTypes; a list of component names to load data from. |
EntityDataLoader |
csvCommentStart(char commentStart) |
EntityDataLoader |
csvDelimiter(char delimiter) |
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 |
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 |
EntityDataLoader |
csvQuoteChar(char quoteChar) |
EntityDataLoader |
csvText(java.lang.String csvText) |
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. |
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 |
EntityDataLoader |
disableAuditLog(boolean disable) |
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). |
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. |
EntityDataLoader |
jsonText(java.lang.String jsonText) |
EntityList |
list()Create an EntityList with all of the values from the data file(s). |
long |
load()Load the values into the database(s). |
EntityDataLoader |
location(java.lang.String location)Location of the data file to load. |
EntityDataLoader |
locationList(java.util.List<java.lang.String> locationList)List of locations of files to load. |
EntityDataLoader |
transactionTimeout(int tt)The transaction timeout for this data load in seconds. |
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. |
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.
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.
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.