com.smartgwt.client.types

## Enum DSOperationType

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

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

      public enum DSOperationType
      extends java.lang.Enum<DSOperationType>
      implements ValueEnum

  One of the four basic operations that can be performed on DataSource data: "fetch", "add", "update", "remove". Elsewhere called CRUD operations, where CRUD stands for "create", "retrieve", "update", "delete", which correspond to "add", "fetch", "update" and "remove" in Smart GWT terminology. See `DataSourceOperations` for a full description.

  There are also additional, non-CRUD operations explained below.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ADD` Store new records
    `CLIENTEXPORT` Upload formatted client data and export it to Excel, XML and other formats.
    `CUSTOM` perform some arbitrary custom logic that is not a CRUD operation.
    `DOWNLOADFILE` Like "viewFile", but the HTTP header Content-Disposition is used to suggest that the browser show a save dialog.
    `FETCH` Fetch one or more records that match a set of search criteria.
    `GETFILE` Use the DataSource as a `source for files`.
    `HASFILE` Use the DataSource as a `source for files`.
    `LISTFILES` Use the DataSource as a `source for files`.
    `REMOVE` Remove (delete) an existing record
    `REMOVEFILE` Use the DataSource as a `source for files`.
    `RENAMEFILE` Use the DataSource as a `source for files`.
    `SAVEFILE` Use the DataSource as a `source for files`.
    `UPDATE` Update an existing record
    `VALIDATE` Run server-side validation for "add" or "update" without actually adding or updating anything.
    `VIEWFILE` Retrieve a file stored in a binary field in a DataSource record, and allow the browser to choose whether to view it directly or prompt the user to save.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getValue()`
    `static DSOperationType` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static DSOperationType[]` | `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

    - #### FETCH

          public static final DSOperationType FETCH

      Fetch one or more records that match a set of search criteria.

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

    - #### ADD

          public static final DSOperationType ADD

      Store new records

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

    - #### UPDATE

          public static final DSOperationType UPDATE

      Update an existing record

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

    - #### REMOVE

          public static final DSOperationType REMOVE

      Remove (delete) an existing record

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

    - #### CUSTOM

          public static final DSOperationType CUSTOM

      perform some arbitrary custom logic that is not a CRUD operation. Format of the inputs and outputs is unconstrained, and the operation will be ignored for cache sync purposes by `ResultSet`s. See `DataSource.performCustomOperation()`.

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

    - #### VALIDATE

          public static final DSOperationType VALIDATE

      Run server-side validation for "add" or "update" without actually adding or updating anything. See `DataSource.validateData()`.

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

    - #### VIEWFILE

          public static final DSOperationType VIEWFILE

      Retrieve a file stored in a binary field in a DataSource record, and allow the browser to choose whether to view it directly or prompt the user to save. See `BinaryFields`.

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

    - #### DOWNLOADFILE

          public static final DSOperationType DOWNLOADFILE

      Like "viewFile", but the HTTP header Content-Disposition is used to suggest that the browser show a save dialog. See `BinaryFields`.

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

    - #### CLIENTEXPORT

          public static final DSOperationType CLIENTEXPORT

      Upload formatted client data and export it to Excel, XML and other formats. Used automatically by `exportClientData()` and cannot be used directly. Usable only with the Smart GWT server framework.

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

    - #### GETFILE

          public static final DSOperationType GETFILE

      Use the DataSource as a `source for files`. Used automatically by `DataSource.getFile()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

    - #### HASFILE

          public static final DSOperationType HASFILE

      Use the DataSource as a `source for files`. Used automatically by `DataSource.hasFile()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

    - #### LISTFILES

          public static final DSOperationType LISTFILES

      Use the DataSource as a `source for files`. Used automatically by `DataSource.listFiles()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

    - #### REMOVEFILE

          public static final DSOperationType REMOVEFILE

      Use the DataSource as a `source for files`. Used automatically by `DataSource.removeFile()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

    - #### SAVEFILE

          public static final DSOperationType SAVEFILE

      Use the DataSource as a `source for files`. Used automatically by `DataSource.saveFile()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

    - #### RENAMEFILE

          public static final DSOperationType RENAMEFILE

      Use the DataSource as a `source for files`. Used automatically by `DataSource.renameFile()`, and would not normally be used directly. Usable only with the Smart GWT server framework.

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

  - ### Method Detail

    - #### values

          public static DSOperationType[] 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 (DSOperationType c : DSOperationType.values())
              System.out.println(c);

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

    - #### valueOf

          public static DSOperationType 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`