Package cdc.impex.api.templates
Enum Usage
- java.lang.Object
-
- java.lang.Enum<Usage>
-
- cdc.impex.api.templates.Usage
-
- All Implemented Interfaces:
Serializable,Comparable<Usage>
public enum Usage extends Enum<Usage>
Enumeration of possible usages for columns in an import template.- Author:
- Damien Carbonne
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MANDATORYThe column is mandatory whatever the action is.MANDATORY_ON_CREATEThe column is mandatory if the action isImportAction.CREATE.OPTIONALThe column is optional whatever the action is.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisMandatoryFor(ImportAction action)booleanisMandatoryForExport()static UsagevalueOf(String name)Returns the enum constant of this type with the specified name.static Usage[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPTIONAL
public static final Usage OPTIONAL
The column is optional whatever the action is.
-
MANDATORY
public static final Usage MANDATORY
The column is mandatory whatever the action is.This is typically the case of Action column or identifier columns.
-
MANDATORY_ON_CREATE
public static final Usage MANDATORY_ON_CREATE
The column is mandatory if the action isImportAction.CREATE.This is typically the case of read-only attributes, that must be set at creation time.
-
-
Method Detail
-
values
public static Usage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Usage c : Usage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Usage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isMandatoryFor
public boolean isMandatoryFor(ImportAction action)
- Parameters:
action- The action.- Returns:
trueif this usage mandatory foraction.
-
isMandatoryForExport
public boolean isMandatoryForExport()
-
-