org.pm4j.core.pm.annotation
Enum PmOptionCfg.NullOption

java.lang.Object
  extended by java.lang.Enum<PmOptionCfg.NullOption>
      extended by org.pm4j.core.pm.annotation.PmOptionCfg.NullOption
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PmOptionCfg.NullOption>
Enclosing class:
PmOptionCfg

public static enum PmOptionCfg.NullOption
extends java.lang.Enum<PmOptionCfg.NullOption>

Defines if a null option should be generated or not.


Enum Constant Summary
DEFAULT
          Defines that the attribute type specific null-option default definition should be used.
The default for non-list attribute types is FOR_OPTIONAL_ATTR.
the default for list attribute types is NO.
FOR_OPTIONAL_ATTR
          A null-option will be provided if the attribute value is optional (PmAttr.isRequired() returns false).
NO
          A null-option will not be provided.
YES
          A null-option will always be provided.
 
Method Summary
static PmOptionCfg.NullOption valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PmOptionCfg.NullOption[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FOR_OPTIONAL_ATTR

public static final PmOptionCfg.NullOption FOR_OPTIONAL_ATTR
A null-option will be provided if the attribute value is optional (PmAttr.isRequired() returns false).


YES

public static final PmOptionCfg.NullOption YES
A null-option will always be provided.


NO

public static final PmOptionCfg.NullOption NO
A null-option will not be provided.


DEFAULT

public static final PmOptionCfg.NullOption DEFAULT
Defines that the attribute type specific null-option default definition should be used.
The default for non-list attribute types is FOR_OPTIONAL_ATTR.
the default for list attribute types is NO.

You may define the attribute specific default value by overriding PmAttrImplIf#getNullOptionDefault().

Method Detail

values

public static PmOptionCfg.NullOption[] 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 (PmOptionCfg.NullOption c : PmOptionCfg.NullOption.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PmOptionCfg.NullOption valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null