Class ImportOption
java.lang.Object
com.primavera.integration.client.bo.enm.EnumType
com.primavera.integration.client.xml.xmlimporter.ImportOption
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
FieldsModifier and TypeFieldDescriptionstatic final ImportOptionstatic final ImportOptionstatic final ImportOptionOnly create new objects and disallow updating.static final ImportOptionNeither creating nor updating is allowed; all objects must matchstatic final ImportOptionstatic final ImportOptionstatic final ImportOptionKeep the object unchanged that is already in the database and adds objects without a match.static final ImportOptionRepresents an unspecified import option.static final ImportOptionstatic final ImportOptionUpdates the object already in the database and adds objects without a match. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this ImportOption.static String[]Returns the array of descriptions of all possible ImportOptions.static String[]Returns the array of string representations of all possible ImportOptions.static ImportOptiongetImportOption(int iImportOption) Converts an integer index to the corresponding static instance of ImportOption.static ImportOptiongetImportOption(String sImportOption) Converts a string to the corresponding static instance of ImportOption.getValue()Returns a string representation of this ImportOption.toString()Returns the description of this ImportOption.
-
Field Details
-
NULL
Represents an unspecified import option. -
DO_NOT_IMPORT
Neither creating nor updating is allowed; all objects must match -
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
Updates the object already in the database and adds objects without a match. Commonly used with project data. -
CREATE_NEW
Only create new objects and disallow updating. If a match is found, a new object is added. -
ASSIGN
-
IGNORE
-
KEEP
-
REPLACE_EXISTING
-
ADD_IN_TO_EXISTING
-
-
Method Details
-
toString
Returns the description of this ImportOption. -
getValue
Returns a string representation of this ImportOption. -
getDescription
Returns the description of this ImportOption.- Specified by:
getDescriptionin classEnumType- Returns:
- String the description of an ImportOption
-
getImportOption
Converts a string to the corresponding static instance of ImportOption.- Parameters:
sImportOption- string representation of an ImportOption- Returns:
- ImportOption static instance of ImportOption
-
getImportOption
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
Returns the array of string representations of all possible ImportOptions.- Returns:
- String[] array of string representations of all possible ImportOptions
-
getEnumDescriptions
Returns the array of descriptions of all possible ImportOptions.- Returns:
- String[] array of descriptions of all possible ImportOptions
-