Package com.smartgwt.client.types
Enum MultiInsertNonMatchingStrategy
java.lang.Object
java.lang.Enum<MultiInsertNonMatchingStrategy>
com.smartgwt.client.types.MultiInsertNonMatchingStrategy
- All Implemented Interfaces:
ValueEnum
,Serializable
,Comparable<MultiInsertNonMatchingStrategy>
,Constable
public enum MultiInsertNonMatchingStrategy
extends Enum<MultiInsertNonMatchingStrategy>
implements ValueEnum
For
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 database-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMake 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.Drop all records in the record list that do not contain exactly the same fields as the first recordAssemble 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 -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
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.
-
Enum Constant Details
-
DROPRECORDS
Drop all records in the record list that do not contain exactly the same fields as the first recordIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "dropRecords". -
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. If the first record in the record list contains values for field(s) that are missing in any other record in the record list, the other record(s) will be padded with nulls. This is similar to the "padWithNulls" setting below, but it only serves to make the second and subsequent records the same as the first, rather than considering all fields on all recordsIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "dropFields". -
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 missingIf this enumerated value is used in a
Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "padWithNulls".
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
-