Class EnumKeyValueConfiguration
- java.lang.Object
-
- com.github.toolarium.enumeration.configuration.dto.AbstractEnumConfiguration
-
- com.github.toolarium.enumeration.configuration.dto.EnumKeyConfiguration
-
- com.github.toolarium.enumeration.configuration.dto.EnumKeyValueConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public class EnumKeyValueConfiguration extends EnumKeyConfiguration
Defines the enum value configuration- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EnumKeyValueConfiguration()Constructor for EnumKeyValueConfiguration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)EnumKeyValueConfigurationSizing<java.lang.Integer>getCardinality()Get the cardinalityEnumKeyValueConfigurationDataTypegetDataType()Get the configuration value data typejava.lang.StringgetDefaultValue()Get the default valuejava.lang.StringgetEnumerationValue()Get the enumeration valuejava.lang.StringgetExampleValue()Get the example valueEnumKeyValueConfigurationSizing<?>getValueSize()Get the value sizebooleanhasDefaultValue()Check if a default value exist.inthashCode()booleanisMandatory()AnEnumKeyValueConfigurationis mandatory in case the cardinality is defined and the min value is > 0.booleanisUniqueness()Specifies that the input value is unique.voidsetCardinality(EnumKeyValueConfigurationSizing<java.lang.Integer> cardinality)Set the cardinalityvoidsetDataType(EnumKeyValueConfigurationDataType dataType)Set the configuration value data typevoidsetDefaultValue(java.lang.String defaultValue)Set the default valuevoidsetEnumerationValue(java.lang.String enumerationValue)Set the enumeration valuevoidsetExampleValue(java.lang.String exampleValue)Set the examplevoidsetUniqueness(boolean isUniqueness)Specifies that the input value is unique.voidsetValueSize(EnumKeyValueConfigurationSizing<?> valueSize)Set the value sizejava.lang.StringtoString()-
Methods inherited from class com.github.toolarium.enumeration.configuration.dto.EnumKeyConfiguration
getKey, isConfidential, setConfidential, setKey
-
Methods inherited from class com.github.toolarium.enumeration.configuration.dto.AbstractEnumConfiguration
getDescription, getValidFrom, getValidTill, setDescription, setValidFrom, setValidTill
-
-
-
-
Method Detail
-
getDataType
public EnumKeyValueConfigurationDataType getDataType()
Get the configuration value data type- Returns:
- the configuration value data type
-
setDataType
public void setDataType(EnumKeyValueConfigurationDataType dataType)
Set the configuration value data type- Parameters:
dataType- the configuration value data type
-
getDefaultValue
public java.lang.String getDefaultValue()
Get the default value- Returns:
- the default value
-
setDefaultValue
public void setDefaultValue(java.lang.String defaultValue)
Set the default value- Parameters:
defaultValue- the default value
-
hasDefaultValue
public boolean hasDefaultValue()
Check if a default value exist.- Returns:
- true if a default value exist.
-
getExampleValue
public java.lang.String getExampleValue()
Get the example value- Returns:
- the example value
-
setExampleValue
public void setExampleValue(java.lang.String exampleValue)
Set the example- Parameters:
exampleValue- the example value
-
getEnumerationValue
public java.lang.String getEnumerationValue()
Get the enumeration value- Returns:
- the enumeration value
-
setEnumerationValue
public void setEnumerationValue(java.lang.String enumerationValue)
Set the enumeration value- Parameters:
enumerationValue- the enumeration value
-
getValueSize
public EnumKeyValueConfigurationSizing<?> getValueSize()
Get the value size- Returns:
- the value size
-
setValueSize
public void setValueSize(EnumKeyValueConfigurationSizing<?> valueSize)
Set the value size- Parameters:
valueSize- the value size
-
getCardinality
public EnumKeyValueConfigurationSizing<java.lang.Integer> getCardinality()
Get the cardinality- Returns:
- the cardinality
-
setCardinality
public void setCardinality(EnumKeyValueConfigurationSizing<java.lang.Integer> cardinality)
Set the cardinality- Parameters:
cardinality- the cardinality
-
isMandatory
public boolean isMandatory()
AnEnumKeyValueConfigurationis mandatory in case the cardinality is defined and the min value is > 0.- Returns:
- true if it is not optinal.
-
isUniqueness
public boolean isUniqueness()
Specifies that the input value is unique. This is only relevant if you have a cardinality.- Returns:
- True if it is unique; otherwise false, which means that the same value can occur more than once.
-
setUniqueness
public void setUniqueness(boolean isUniqueness)
Specifies that the input value is unique. This is only relevant if you have a cardinality.- Parameters:
isUniqueness- True if it is unique; otherwise false, which means that the same value can occur more than once.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classEnumKeyConfiguration- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classEnumKeyConfiguration- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classEnumKeyConfiguration- See Also:
Object.toString()
-
-