com.smartgwt.client.types

## Enum MultiInsertNonMatchingStrategy

- java.lang.Object
- - java.lang.Enum<MultiInsertNonMatchingStrategy>
  - - com.smartgwt.client.types.MultiInsertNonMatchingStrategy

- All Implemented Interfaces:
    ValueEnum, java.io.Serializable, java.lang.Comparable<MultiInsertNonMatchingStrategy>

      public enum MultiInsertNonMatchingStrategy
      extends java.lang.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

- - ### Enum Constant Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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.

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

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

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

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

- - ### Enum Constant Detail

    - #### 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 Detail

    - #### values

          public static MultiInsertNonMatchingStrategy[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MultiInsertNonMatchingStrategy c : MultiInsertNonMatchingStrategy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static MultiInsertNonMatchingStrategy valueOf(java.lang.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:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null

    - #### getValue

          public java.lang.String getValue()

      Specified by:
        `getValue` in interface `ValueEnum`