Class DocumentImportOptions

java.lang.Object
com.arangodb.model.DocumentImportOptions

public final class DocumentImportOptions extends Object
Author:
Mark Vollmary
  • Constructor Details

    • DocumentImportOptions

      public DocumentImportOptions()
  • Method Details

    • getFromPrefix

      public String getFromPrefix()
    • fromPrefix

      public DocumentImportOptions fromPrefix(String fromPrefix)
      Parameters:
      fromPrefix - An optional prefix for the values in _from attributes. If specified, the value is automatically prepended to each _from input value. This allows specifying just the keys for _from.
      Returns:
      options
    • getToPrefix

      public String getToPrefix()
    • toPrefix

      public DocumentImportOptions toPrefix(String toPrefix)
      Parameters:
      toPrefix - An optional prefix for the values in _to attributes. If specified, the value is automatically prepended to each _to input value. This allows specifying just the keys for _to.
      Returns:
      options
    • getOverwrite

      public Boolean getOverwrite()
    • overwrite

      public DocumentImportOptions overwrite(Boolean overwrite)
      Parameters:
      overwrite - If this parameter has a value of true, then all data in the collection will be removed prior to the import. Note that any existing index definitions will be preserved.
      Returns:
      options
    • getWaitForSync

      public Boolean getWaitForSync()
    • waitForSync

      public DocumentImportOptions waitForSync(Boolean waitForSync)
      Parameters:
      waitForSync - Wait until documents have been synced to disk before returning.
      Returns:
      options
    • getOnDuplicate

      public DocumentImportOptions.OnDuplicate getOnDuplicate()
    • onDuplicate

      public DocumentImportOptions onDuplicate(DocumentImportOptions.OnDuplicate onDuplicate)
      Parameters:
      onDuplicate - Controls what action is carried out in case of a unique key constraint violation. Possible values are:
      • error: this will not import the current document because of the unique key constraint violation. This is the default setting.
      • update: this will update an existing document in the database with the data specified in the request. Attributes of the existing document that are not present in the request will be preserved.
      • replace: this will replace an existing document in the database with the data specified in the request.
      • ignore: this will not update an existing document and simply ignore the error caused by the unique key constraint violation. Note that update, replace and ignore will only work when the import document in the request contains the _key attribute. update and replace may also fail because of secondary unique key constraint violations.
      Returns:
      options
    • getComplete

      public Boolean getComplete()
    • complete

      public DocumentImportOptions complete(Boolean complete)
      Parameters:
      complete - If set to true, it will make the whole import fail if any error occurs. Otherwise the import will continue even if some documents cannot be imported.
      Returns:
      options
    • getDetails

      public Boolean getDetails()
    • details

      public DocumentImportOptions details(Boolean details)
      Parameters:
      details - If set to true, the result will include an attribute details with details about documents that could not be imported.
      Returns:
      options