Class EnumConfiguration<T extends EnumKeyConfiguration>
- java.lang.Object
-
- com.github.toolarium.enumeration.configuration.dto.AbstractEnumConfiguration
-
- com.github.toolarium.enumeration.configuration.dto.EnumConfiguration<T>
-
- All Implemented Interfaces:
java.io.Serializable
public class EnumConfiguration<T extends EnumKeyConfiguration> extends AbstractEnumConfiguration
Defines the enum configuration- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAX_DATE_STRINGDefines the max datestatic java.lang.StringMAX_TIME_STRINGDefines the max timestatic java.lang.StringMAX_TIMESTAMP_STRINGDefines the max timestamp
-
Constructor Summary
Constructors Constructor Description EnumConfiguration()ConstructorEnumConfiguration(java.lang.String name)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tadd(T enumKeyConfiguration)Adds anEnumKeyConfigurationand corrects validFrom / validTill in case it's not consistent regarding the parent element.booleanequals(java.lang.Object obj)java.util.Set<java.lang.String>getInterfaceList()Get the interface listjava.util.Set<T>getKeyList()Get the key listjava.util.Set<java.lang.String>getMarkerInterfaceList()Get the marker interface listjava.lang.StringgetName()Get the configuration nameinthashCode()java.util.Set<T>selectMandatoryConfigurationList()Returns a list of mandatoryEnumKeyValueConfiguration.java.util.Set<T>selectMandatoryListWithMissingDefaultValue()Returns a list of mandatoryEnumKeyValueConfigurationwith no default valuevoidsetInterfaceList(java.util.Set<java.lang.String> interfaceList)Set the interface list<K extends EnumKeyConfiguration>
voidsetKeyList(java.util.Set<K> keyList)Set the key listvoidsetMarkerInterfaceList(java.util.Set<java.lang.String> markerInterfaceList)Set the marker interface listvoidsetName(java.lang.String name)Set the configuration namejava.lang.StringtoString()-
Methods inherited from class com.github.toolarium.enumeration.configuration.dto.AbstractEnumConfiguration
getDescription, getValidFrom, getValidTill, setDescription, setValidFrom, setValidTill
-
-
-
-
Field Detail
-
MAX_TIMESTAMP_STRING
public static final java.lang.String MAX_TIMESTAMP_STRING
Defines the max timestamp- See Also:
- Constant Field Values
-
MAX_DATE_STRING
public static final java.lang.String MAX_DATE_STRING
Defines the max date- See Also:
- Constant Field Values
-
MAX_TIME_STRING
public static final java.lang.String MAX_TIME_STRING
Defines the max time- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the configuration name- Returns:
- the configuration name
-
setName
public void setName(java.lang.String name)
Set the configuration name- Parameters:
name- the configuration name
-
setKeyList
public <K extends EnumKeyConfiguration> void setKeyList(java.util.Set<K> keyList)
Set the key list- Type Parameters:
K- The generic type- Parameters:
keyList- the key list.
-
getKeyList
public java.util.Set<T> getKeyList()
Get the key list- Returns:
- the key list
-
setInterfaceList
public void setInterfaceList(java.util.Set<java.lang.String> interfaceList)
Set the interface list- Parameters:
interfaceList- the interface list
-
getInterfaceList
public java.util.Set<java.lang.String> getInterfaceList()
Get the interface list- Returns:
- the interface list
-
setMarkerInterfaceList
public void setMarkerInterfaceList(java.util.Set<java.lang.String> markerInterfaceList)
Set the marker interface list- Parameters:
markerInterfaceList- the marker interface list
-
getMarkerInterfaceList
public java.util.Set<java.lang.String> getMarkerInterfaceList()
Get the marker interface list- Returns:
- the marker interface list
-
add
public T add(T enumKeyConfiguration)
Adds anEnumKeyConfigurationand corrects validFrom / validTill in case it's not consistent regarding the parent element.- Parameters:
enumKeyConfiguration- theEnumKeyConfiguration- Returns:
- the added enum value configuration
- Throws:
java.lang.IllegalArgumentException- In case the key doesn't exist
-
selectMandatoryConfigurationList
public java.util.Set<T> selectMandatoryConfigurationList()
Returns a list of mandatoryEnumKeyValueConfiguration.- Returns:
- the list of mandatory
EnumKeyValueConfiguration.
-
selectMandatoryListWithMissingDefaultValue
public java.util.Set<T> selectMandatoryListWithMissingDefaultValue()
Returns a list of mandatoryEnumKeyValueConfigurationwith no default value- Returns:
- the list of mandatory
EnumKeyValueConfiguration.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractEnumConfiguration- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classAbstractEnumConfiguration- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-