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 boolean
equals(java.lang.Object obj)
EnumKeyValueConfigurationSizing<java.lang.Integer>
getCardinality()
Get the cardinalityEnumKeyValueConfigurationDataType
getDataType()
Get the configuration value data typejava.lang.String
getDefaultValue()
Get the default valuejava.lang.String
getEnumerationValue()
Get the enumeration valuejava.lang.String
getExampleValue()
Get the example valueEnumKeyValueConfigurationSizing<?>
getValueSize()
Get the value sizeboolean
hasDefaultValue()
Check if a default value exist.int
hashCode()
boolean
isMandatory()
AnEnumKeyValueConfiguration
is mandatory in case the cardinality is defined and the min value is > 0.boolean
isUniqueness()
Specifies that the input value is unique.void
setCardinality(EnumKeyValueConfigurationSizing<java.lang.Integer> cardinality)
Set the cardinalityvoid
setDataType(EnumKeyValueConfigurationDataType dataType)
Set the configuration value data typevoid
setDefaultValue(java.lang.String defaultValue)
Set the default valuevoid
setEnumerationValue(java.lang.String enumerationValue)
Set the enumeration valuevoid
setExampleValue(java.lang.String exampleValue)
Set the examplevoid
setUniqueness(boolean isUniqueness)
Specifies that the input value is unique.void
setValueSize(EnumKeyValueConfigurationSizing<?> valueSize)
Set the value sizejava.lang.String
toString()
-
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()
AnEnumKeyValueConfiguration
is 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:
hashCode
in classEnumKeyConfiguration
- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classEnumKeyConfiguration
- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classEnumKeyConfiguration
- See Also:
Object.toString()
-
-