Enum 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 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 is ImportAction.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 name
        NullPointerException - if the argument is null
      • isMandatoryFor

        public boolean isMandatoryFor​(ImportAction action)
        Parameters:
        action - The action.
        Returns:
        true if this usage mandatory for action.
      • isMandatoryForExport

        public boolean isMandatoryForExport()