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 Constants
  Enum Constant
  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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue()`
  `static MultiInsertNonMatchingStrategy`
  `valueOf(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.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DROPRECORDS

    public static final MultiInsertNonMatchingStrategy DROPRECORDS
    Drop all records in the record list that do not contain exactly the same fields as the first record

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "dropRecords".

  - ### DROPFIELDS

    public static final MultiInsertNonMatchingStrategy 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 records

    If this enumerated value is used in a `Component XML` file or server-side DataSource descriptor (.ds.xml file), use the value "dropFields".

  - ### PADWITHNULLS

    public static final MultiInsertNonMatchingStrategy 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

    If 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

    public static MultiInsertNonMatchingStrategy[] 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

    public static MultiInsertNonMatchingStrategy valueOf(String name)
    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 name
      `NullPointerException` - if the argument is null

  - ### getValue

    public String getValue()
    Specified by:
      `getValue` in interface `ValueEnum`