public class FieldDefinition extends AbstractObjectWithProperties implements Cloneable, MapSerializer
Record in the RecordDefinition.Record,
RecordDefinition| Constructor and Description |
|---|
FieldDefinition() |
FieldDefinition(FieldDefinition attribute) |
FieldDefinition(int index) |
FieldDefinition(Map<String,Object> properties) |
FieldDefinition(String name,
DataType type,
boolean required)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
boolean required,
Map<String,Object> properties)
Construct a new attribute.
|
FieldDefinition(String name,
DataType dataType,
boolean required,
String description) |
FieldDefinition(String name,
DataType type,
int length,
boolean required)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
int length,
boolean required,
Map<String,Object> properties)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
int length,
boolean required,
String description) |
FieldDefinition(String name,
DataType type,
Integer length,
Integer scale,
Boolean required)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
Integer length,
Integer scale,
Boolean required,
Map<String,Object> properties)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
Integer length,
Integer scale,
Boolean required,
String description)
Construct a new attribute.
|
FieldDefinition(String name,
DataType type,
Integer length,
Integer scale,
Boolean required,
String description,
Map<String,Object> properties)
Construct a new attribute.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllowedValue(Object value,
Object text) |
void |
appendType(StringBuilder string) |
FieldDefinition |
clone() |
<V> V |
convert(Object value) |
static FieldDefinition |
create(Map<String,Object> properties) |
boolean |
equals(Object object) |
Map<Object,Object> |
getAllowedValues() |
CodeTable |
getCodeTable() |
<T> T |
getDefaultValue() |
String |
getDescription() |
int |
getIndex() |
int |
getLength()
Get the maximum length of the attribute value.
|
int |
getMaxStringLength() |
<V> V |
getMaxValue() |
<V> V |
getMinValue() |
String |
getName()
Get the name of the attribute.
|
RecordDefinition |
getRecordDefinition() |
int |
getScale()
Get the maximum number of decimal places of the attribute value.
|
String |
getSimpleType() |
String |
getTitle() |
DataType |
getType()
Get the data type of the attribute value.
|
Class<?> |
getTypeClass()
Get the data type class of the attribute value.
|
String |
getTypeDescription()
Get the data type of the attribute value.
|
int |
hashCode()
Return the hash code of the attribute.
|
boolean |
isRequired()
Get the flag indicating if a value is required for the attribute.
|
void |
setAllowedValues(Collection<?> allowedValues) |
void |
setAllowedValues(Map<?,?> allowedValues) |
void |
setCodeTable(CodeTable codeTable) |
void |
setDefaultValue(Object defaultValue) |
void |
setDescription(String description) |
void |
setLength(int length) |
void |
setMaxValue(Object maxValue) |
void |
setMinValue(Object minValue) |
protected void |
setRecordDefinition(RecordDefinition recordDefinition) |
void |
setRequired(boolean required) |
void |
setScale(int scale) |
void |
setTitle(String title) |
void |
setType(DataType type) |
void |
setValue(Record record,
Object value) |
Map<String,Object> |
toMap()
Convert the object to a Map of property name, value pairs.
|
String |
toString() |
void |
validate(Object value) |
clearProperties, close, getProperties, getProperty, getProperty, removeProperty, setProperties, setProperty, setPropertySoft, setPropertyWeakpublic FieldDefinition()
public FieldDefinition(FieldDefinition attribute)
public FieldDefinition(int index)
public FieldDefinition(String name, DataType type, boolean required)
name - The name of the attribute.type - The data type of the attribute value.required - The flag indicating if a value is required for the
attribute.public FieldDefinition(String name, DataType type, boolean required, Map<String,Object> properties)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public FieldDefinition(String name, DataType dataType, boolean required, String description)
public FieldDefinition(String name, DataType type, int length, boolean required)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.required - The flag indicating if a value is required for the
attribute.public FieldDefinition(String name, DataType type, int length, boolean required, Map<String,Object> properties)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.scale - The maximum number of decimal places.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public FieldDefinition(String name, DataType type, int length, boolean required, String description)
public FieldDefinition(String name, DataType type, Integer length, Integer scale, Boolean required)
name - The name of the attribute.type - The data type of the attribute value.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public FieldDefinition(String name, DataType type, Integer length, Integer scale, Boolean required, Map<String,Object> properties)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.scale - The maximum number of decimal places.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public FieldDefinition(String name, DataType type, Integer length, Integer scale, Boolean required, String description)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.scale - The maximum number of decimal places.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public FieldDefinition(String name, DataType type, Integer length, Integer scale, Boolean required, String description, Map<String,Object> properties)
name - The name of the attribute.type - The data type of the attribute value.length - The maximum length of an attribute value, 0 for no maximum.scale - The maximum number of decimal places.required - The flag indicating if a value is required for the
attribute.properties - The meta data properties about the attribute.public static FieldDefinition create(Map<String,Object> properties)
public void appendType(StringBuilder string)
public FieldDefinition clone()
public <V> V convert(Object value)
public CodeTable getCodeTable()
public <T> T getDefaultValue()
public String getDescription()
public int getIndex()
public int getLength()
public int getMaxStringLength()
public <V> V getMaxValue()
public <V> V getMinValue()
public String getName()
public RecordDefinition getRecordDefinition()
public int getScale()
public String getSimpleType()
public String getTitle()
public DataType getType()
public Class<?> getTypeClass()
public String getTypeDescription()
public int hashCode()
public boolean isRequired()
public void setAllowedValues(Collection<?> allowedValues)
public void setAllowedValues(Map<?,?> allowedValues)
public void setCodeTable(CodeTable codeTable)
public void setDefaultValue(Object defaultValue)
public void setDescription(String description)
public void setLength(int length)
public void setMaxValue(Object maxValue)
public void setMinValue(Object minValue)
protected void setRecordDefinition(RecordDefinition recordDefinition)
public void setRequired(boolean required)
public void setScale(int scale)
public void setTitle(String title)
public void setType(DataType type)
public Map<String,Object> toMap()
MapSerializerConvert the object to a Map of property name, value pairs. The values can be one of the following supported types. Other values should be converted to one of these values.
toMap in interface MapSerializerpublic void validate(Object value)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.