Provides for definition of an enumeration used by an entity.
Classes and Interfaces |
CharacterKeyEnumMapping |
Defines String -value enumeration and maps single-character key
to the enumerated constants. |
IMaprptEnumDef |
Provides for definition of an enumeration used by an entity. |
IntegerKeyEnumMapping |
Defines String -value enumeration and maps integer keys to the enumerated
constants. |
IntegerRangeKeyEnumMapping |
Defines String -value enumeration and maps ranges of integers
(e.g., 100-200) to the enumerated constants. |
LineTypeEnumMapping |
Defines String -value enumeration and maps single-character Mapper line types
to the enumerated constants. |
ReportNumberEnumMapping |
Defines String -value enumeration and maps Mapper report numbers
to the enumerated constants. |
ReportRangeEnumMapping |
Defines String -value enumeration and maps ranges of Mapper report
numbers (e.g., 100-200) to the enumerated constants. |
StringKeyEnumMapping |
Defines String -value enumeration and maps String key
to the enumerated constants. |
Class: CharacterKeyEnumMapping
next
package
Defines
String
-value enumeration and maps single-character key
to the enumerated constants. An instance of this class is typically instantiated as a
Spring bean, where the enumerated constants and keys are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public CharacterKeyEnumMapping()
|
Provides for definition of an enumeration used by an entity. The enumeration
has a class name (this class will extend
org.hibernate.usertype.EnhancedUserType)
and a symbol name and value for each of the enumerated constants. An arbitrary key value
is mapped to and from an enumerated constant; if there is no other key to map, the value
of the enumerated constant may be used as the key. For example:
true-key "cherry" = SymbolicConstant(RED, "red") OR
pseudo-key "red" = SymbolicConstant(RED, "red")
- Parameters:
<C>
- type of constant value (e.g., String
, Integer
).
<K>
- type of key (e.g., String
, Character
, Integer
).
public interface com.arsi.mj.maprpt.enums.IMaprptEnumDef
Inner Class SymbolicConstant |
Defines a symbol name and value for an enumerated constant.
- Parameters:
<C> - type of constant value (e.g., String , Integer ).
public static class com.arsi.mj.maprpt.enums.IMaprptEnumDef.SymbolicConstant
extends java.lang.Object
|
public final java.lang.String name()
public final java.lang.Object value()
|
Methods |
Define an enumerated constant and specify it's associated key.
- Parameters:
aKey - key associated with enumerated constant.
aConstant - the enumerated constant to define.
public void defineEnum(java.lang.Object aKey, com.arsi.mj.maprpt.enums.IMaprptEnumDef.SymbolicConstant aConstant)
|
Return the enumerated constants defined by this class instance, mapped to
the keys associated with the enumerated constants.
- Returns:
- map of keys to enumerated constants.
public java.util.Map enums()
|
Get the name of the enumeration class, including the package name.
- Returns:
- full name of the enumeration class.
public java.lang.String getEnumClassName()
|
Get the key(s) associated with the specified enumerated constant.
- Parameters:
aConstantValue - enumerated constant believed to be associated with one or more keys.
- Returns:
- key(s) associated with enumerated constant, or empty array if none.
public java.lang.Object keyOf(java.lang.Object aConstantValue)
|
Define enumerated constants and associated keys from a properties object.
Each properties entry must be in one of two valid formats:
- symbol=value
- key=symbol->value
In the first format, the key is assigned from the value , i.e.,
the key for purposes of this class is the constant value that appears after
the equal sign.
In the second format, the key is in the expected position for a properties entry
(before the equal sign), but the data after the equal sign has two parts (enumerated
symbol and constant value) which are separated by -> .
- Parameters:
aProps - a properties object in one of the described formats.
public void setEnumsFromProperties(java.util.Properties aProps)
|
Get the enumerated constant associated with the specified key.
- Parameters:
aKey - key believed to be associated an enumerated constant.
- Returns:
- enumerated constant associated with key, or NULL if none.
public com.arsi.mj.maprpt.enums.IMaprptEnumDef.SymbolicConstant valueOf(java.lang.Object aKey)
|
Defines
String
-value enumeration and maps integer keys to the enumerated
constants. An instance of this class is typically instantiated as a Spring bean,
where the enumerated constants and keys are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public IntegerKeyEnumMapping()
|
Defines
String
-value enumeration and maps ranges of integers
(e.g., 100-200) to the enumerated constants. An instance of this class is
typically instantiated as a Spring bean, where the enumerated constants and keys
are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public IntegerRangeKeyEnumMapping()
|
Defines
String
-value enumeration and maps single-character Mapper line types
to the enumerated constants. An instance of this class is typically instantiated as a
Spring bean, where the enumerated constants and keys are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public LineTypeEnumMapping()
|
Defines
String
-value enumeration and maps Mapper report numbers
to the enumerated constants. An instance of this class is typically instantiated as a
Spring bean, where the enumerated constants and keys are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public ReportNumberEnumMapping()
|
Defines
String
-value enumeration and maps ranges of Mapper report
numbers (e.g., 100-200) to the enumerated constants. An instance of this class is
typically instantiated as a Spring bean, where the enumerated constants and keys
are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public ReportRangeEnumMapping()
|
Defines
String
-value enumeration and maps
String
key
to the enumerated constants. An instance of this class is typically instantiated as a
Spring bean, where the enumerated constants and keys are defined as
Properties
.
Treat this class as "thread-safe" when used as intended, since an instance is not
modified after initialization, but "thread-hostile" if changes are made after
creating the class by concurrent threads since none of the methods are synchronized.
Constructors |
public StringKeyEnumMapping()
|