Primavera Integration API 7.0

com.primavera.integration.client.xml.xmlimporter
Class ImportOption

java.lang.Object
  extended by com.primavera.integration.client.bo.enm.EnumType
      extended by 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 Summary
static ImportOption CREATE_NEW
          Only create new objects and disallow updating.
static ImportOption DO_NOT_IMPORT
          Neither creating nor updating is allowed; all objects must match
static ImportOption KEEP_EXISTING
          Keep the object unchanged that is already in the database and adds objects without a match.
static ImportOption NULL
          Represents an unspecified import option.
static ImportOption UPDATE_EXISTING
          Updates the object already in the database and adds objects without a match.
 
Method Summary
 java.lang.String getDescription()
          Returns the description of this ImportOption.
static java.lang.String[] getEnumDescriptions()
          Returns the array of descriptions of all possible ImportOptions.
static java.lang.String[] getEnumValues()
          Returns the array of string representations of all possible ImportOptions.
static ImportOption getImportOption(int iImportOption)
          Converts an integer index to the corresponding static instance of ImportOption.
static ImportOption getImportOption(java.lang.String sImportOption)
          Converts a string to the corresponding static instance of ImportOption.
 java.lang.String getValue()
          Returns a string representation of this ImportOption.
 java.lang.String toString()
          Returns the description of this ImportOption.
 
Methods inherited from class com.primavera.integration.client.bo.enm.EnumType
equals, hashCode, intValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

Method Detail

toString

public java.lang.String toString()
Returns the description of this ImportOption.

Overrides:
toString in class java.lang.Object
Returns:
String the description of an ImportOption

getValue

public java.lang.String getValue()
Returns a string representation of this ImportOption.

Specified by:
getValue in class EnumType
Returns:
String string representation of an ImportOption

getDescription

public java.lang.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(java.lang.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 java.lang.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 java.lang.String[] getEnumDescriptions()
Returns the array of descriptions of all possible ImportOptions.

Returns:
String[] array of descriptions of all possible ImportOptions

Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.