public enum MultiInsertNonMatchingStrategy extends java.lang.Enum<MultiInsertNonMatchingStrategy> implements ValueEnum
SQLDataSource
only, the strategy to use to harmonize multiple records when addData()
is called with a list of records, and multiInsertStrategy
"multipleValues" is in force, and
the supplied records do not all contain exactly the same fields. Harmonization is necessary because we only specify a
single list of fields to the multi-insert, and each of the multiple VALUES
clauses must exactly match that
list of fields or we will get either SQL errors or corrupted inserts, depending on the underlying databaseEnum Constant and Description |
---|
DROPFIELDS
Make all records match the first record in the record list, by dropping any fields from the second and subsequent
records that are not present on the first record.
|
DROPRECORDS
Drop all records in the record list that do not contain exactly the same fields as the first record
|
PADWITHNULLS
Assemble a list of all fields that appear on ANY record in the record list, and ensure that ALL records in the record
list include a value for each of those fields by modifying records to specify a null value for any field(s) the record
is missing
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static MultiInsertNonMatchingStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MultiInsertNonMatchingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MultiInsertNonMatchingStrategy DROPRECORDS
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "dropRecords".
public static final MultiInsertNonMatchingStrategy DROPFIELDS
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "dropFields".
public static final MultiInsertNonMatchingStrategy PADWITHNULLS
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "padWithNulls".
public static MultiInsertNonMatchingStrategy[] values()
for (MultiInsertNonMatchingStrategy c : MultiInsertNonMatchingStrategy.values()) System.out.println(c);
public static MultiInsertNonMatchingStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null