java.lang.Object
com.primavera.integration.client.bo.enm.EnumType
com.primavera.integration.client.xml.xmlimporter.ImportOption

public class ImportOption extends EnumType

When you use the XMLImporter to import from an XML file, you can specify an ImportOption for each type of business object. You should use one of the static instances, such as ImportOption.UPDATE_EXISTING.

In each type of business object there are one or two fields that have to be unique within the Project (if project-specific) or under the same parent. For example, in Activity, the field Id has to be unique within the Project. In WBS, both Code and Name have to unique under the same parent. These unique fields are used in XMLImporter to match an object from the XML file to an object already in the database, if available. ImportOption tells the XMLImporter what to do when a match (or conflict) is found.

  • Field Details

    • NULL

      public static final ImportOption NULL
      Represents an unspecified import option.
    • DO_NOT_IMPORT

      public static final ImportOption DO_NOT_IMPORT
      Neither creating nor updating is allowed; all objects must match
    • KEEP_EXISTING

      public static final ImportOption KEEP_EXISTING
      Keep the object unchanged that is already in the database and adds objects without a match. Commonly used with global data.
    • UPDATE_EXISTING

      public static final ImportOption UPDATE_EXISTING
      Updates the object already in the database and adds objects without a match. Commonly used with project data.
    • CREATE_NEW

      public static final ImportOption CREATE_NEW
      Only create new objects and disallow updating. If a match is found, a new object is added.
    • ASSIGN

      public static final ImportOption ASSIGN
    • IGNORE

      public static final ImportOption IGNORE
    • KEEP

      public static final ImportOption KEEP
    • REPLACE_EXISTING

      public static final ImportOption REPLACE_EXISTING
    • ADD_IN_TO_EXISTING

      public static final ImportOption ADD_IN_TO_EXISTING
  • Method Details

    • toString

      public String toString()
      Returns the description of this ImportOption.
      Overrides:
      toString in class Object
      Returns:
      String the description of an ImportOption
    • getValue

      public String getValue()
      Returns a string representation of this ImportOption.
      Specified by:
      getValue in class EnumType
      Returns:
      String string representation of an ImportOption
    • getDescription

      public String getDescription()
      Returns the description of this ImportOption.
      Specified by:
      getDescription in class EnumType
      Returns:
      String the description of an ImportOption
    • getImportOption

      public static ImportOption getImportOption(String sImportOption)
      Converts a string to the corresponding static instance of ImportOption.
      Parameters:
      sImportOption - string representation of an ImportOption
      Returns:
      ImportOption static instance of ImportOption
    • getImportOption

      public static ImportOption getImportOption(int iImportOption)
      Converts an integer index to the corresponding static instance of ImportOption.
      Parameters:
      iImportOption - integer representation of an ImportOption
      Returns:
      ImportOption static instance of ImportOption
    • getEnumValues

      public static String[] getEnumValues()
      Returns the array of string representations of all possible ImportOptions.
      Returns:
      String[] array of string representations of all possible ImportOptions
    • getEnumDescriptions

      public static String[] getEnumDescriptions()
      Returns the array of descriptions of all possible ImportOptions.
      Returns:
      String[] array of descriptions of all possible ImportOptions