public class DataDrivenEnum extends Object implements Serializable
Constructor and Description |
---|
DataDrivenEnum() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
Object value)
Takes in any additional attributes passed in the request not matching any defined properties.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Map<String,Object> |
getAttribute()
Return any additional attributes passed in the request not matching any defined properties.
|
Map<String,Object> |
getAttributes()
Map holding any additional attributes passed in the request not matching any defined
properties.
|
String |
getDisplayValue()
The display value for the associated
type . |
String |
getId()
The ID of the enum.
|
String |
getType()
Identifies the type of the associated value, this is needed to gather all the enum
values based on their types. |
String |
getValue()
The value of the associated
type . |
int |
hashCode() |
void |
setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined
properties.
|
void |
setDisplayValue(String displayValue)
The display value for the associated
type . |
void |
setId(String id)
The ID of the enum.
|
void |
setType(String type)
Identifies the type of the associated value, this is needed to gather all the enum
values based on their types. |
void |
setValue(String value)
The value of the associated
type . |
String |
toString() |
public void addAttribute(String name, Object value)
name
- Name of the additional attributevalue
- Value of the additional attributepublic Map<String,Object> getAttribute()
public String getId()
public String getType()
values
based on their types.
For example, if this enum type was to be used for a field representing product's materials, then the type would be "MATERIAL".
public String getValue()
type
.
For example, the value for type "MATERIAL" could be "COTTON", "LEATHER", "POLYESTER", etc.
public String getDisplayValue()
type
.
Different from value
, the display value is meant to be more user-friendly and for
client-facing usages, such as searching and faceting.
For example, the display value for type "MATERIAL" could be "Cotton", "Leather", "Polyester", etc.
public Map<String,Object> getAttributes()
public void setId(String id)
id
- the context ID of this enumpublic void setType(String type)
values
based on their types.
For example, if this enum type was to be used for a field representing product's materials, then the type would be "MATERIAL".
type
- the type for the associated valuepublic void setValue(String value)
type
.
For example, the value for type "MATERIAL" could be "COTTON", "LEATHER", "POLYESTER", etc.
value
- the value of the associated typepublic void setDisplayValue(String displayValue)
type
.
Different from value
, the display value is meant to be more user-friendly and for
client-facing usages, such as searching and faceting.
For example, the display value for type "MATERIAL" could be "Cotton", "Leather", "Polyester", etc.
displayValue
- the display value of the associated typepublic void setAttributes(Map<String,Object> attributes)
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.