public final class ImportSpecMode extends Object
The complete specification of XML imports is available in XML Imports.
| Modifier and Type | Field and Description |
|---|---|
static ImportSpecMode |
INSERT
Insert mode: only record creations are allowed.
|
static ImportSpecMode |
REPLACE
Replace (synchronization) mode: if a record with the same primary key exists
in the target table, it is updated, otherwise, a new record is inserted;
if a record is not present in the source, it is deleted.
|
static ImportSpecMode |
UPDATE
Update mode: only modifications of existing records are allowed.
|
static ImportSpecMode |
UPDATE_OR_INSERT
Update or insert mode: both record creations and modifications of existing records are allowed.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format()
Returns a persistent identifier for this definition mode.
|
String |
getLabel()
Returns a human-readable label for this XML import mode.
|
boolean |
isInsert()
Returns
true if this is INSERT mode. |
boolean |
isReplace()
Returns
true if this is REPLACE mode. |
boolean |
isUpdate()
Returns
true if this is UPDATE mode. |
boolean |
isUpdateOrInsert()
Returns
true if this is UPDATE_OR_INSERT mode. |
static ImportSpecMode |
parse(String aFlag)
Returns the definition mode that corresponds to the string specified.
|
String |
toString() |
public static final ImportSpecMode UPDATE
public static final ImportSpecMode INSERT
public static final ImportSpecMode UPDATE_OR_INSERT
public static final ImportSpecMode REPLACE
public boolean isUpdate()
true if this is UPDATE mode.public boolean isInsert()
true if this is INSERT mode.public boolean isUpdateOrInsert()
true if this is UPDATE_OR_INSERT mode.public boolean isReplace()
true if this is REPLACE mode.public String format()
The ImportSpecMode can obtained by parsing the
persistent identifier using the method parse(String).
parse(String)public static ImportSpecMode parse(String aFlag)
The specified string must have been generated by the method format().
IllegalArgumentException - if string specified is an invalid persistent identifier.format()public String getLabel()