public class TextFieldDef extends FieldDef
internalId, internalName, log, TIMESTAMP_FORMATSERIALIZED_CLASS_NAME, TYPEXML_SERIALIZED_CLASS_NAME| Constructor and Description |
|---|
TextFieldDef() |
TextFieldDef(String name,
FieldType type) |
| Modifier and Type | Method and Description |
|---|---|
TextFieldDef |
clone() |
boolean |
equals(Object obj) |
TextFieldDef |
fromRecord(Record source)
Loads this instance's state from a record and returns
this (for fluid API call chaining). |
TextFieldDef |
fromXmlElement(Element fieldDefElement) |
void |
generateJavaCode(JavaCodeBuilder code) |
Integer |
getMaximumLength()
The optional most number of characters in values of this field.
|
Integer |
getMinimumLength()
The optional least number of characters in values of this field.
|
Pattern |
getPattern()
The optional regular expression pattern to use when parsing incoming values during validation (not used during mapping).
|
void |
getSchemaProblems(List<SchemaProblem> problems,
boolean includeChildren) |
int |
hashCode() |
boolean |
isAllowBlank()
Indicates if empty strings are allowed as values for this field.
|
boolean |
isTrim()
Indicates if leading and trailing whitespace characters should be removed (default is false).
|
protected Object |
mapValueImpl(Object value) |
TextFieldDef |
setAllowBlank(boolean allowBlank) |
TextFieldDef |
setAllowedValues(ValueMatch<?> allowedValues) |
TextFieldDef |
setArray(boolean array)
Forces this field to be an array by setting the
FieldDef.getMinimumElements() to zero (0) if both FieldDef.getMinimumElements() and FieldDef.getMaximumElements() are null, otherwise, does nothing. |
TextFieldDef |
setAttributes(Attributes attributes) |
TextFieldDef |
setDefaultValueExpression(Expression defaultValueExpression)
The calculated value to set in the data if the field is null or missing.
|
TextFieldDef |
setDescription(String description) |
TextFieldDef |
setDisplayName(String displayName) |
protected TextFieldDef |
setEntityDef(EntityDef entityDef) |
TextFieldDef |
setExample(String example) |
TextFieldDef |
setLimitToAllowedValues(boolean limitToAllowedValues) |
TextFieldDef |
setMaximumElements(Integer maximumElements) |
TextFieldDef |
setMaximumLength(Integer maximumLength) |
TextFieldDef |
setMinimumElements(Integer minimumElements) |
TextFieldDef |
setMinimumLength(Integer minimumLength) |
TextFieldDef |
setName(String name) |
TextFieldDef |
setPattern(Pattern pattern)
The optional regular expression pattern to use when parsing incoming values during validation (not used during mapping).
|
TextFieldDef |
setPattern(String pattern)
The optional regular expression pattern to use when parsing incoming values during validation (not used during mapping).
|
TextFieldDef |
setPosition(Integer position) |
TextFieldDef |
setPrimaryKeyPosition(Integer primaryKeyPosition) |
TextFieldDef |
setPrimaryKeyType(PrimaryKeyType primaryKeyType) |
TextFieldDef |
setRequired(boolean required) |
TextFieldDef |
setStrictArrays(boolean strictArrays) |
TextFieldDef |
setTags(Tags tags) |
TextFieldDef |
setTrim(boolean trim)
Indicates if leading and trailing whitespace characters should be removed (default is false).
|
TextFieldDef |
setType(FieldType type) |
Record |
toRecord() |
Element |
toXmlElement(Document document) |
protected void |
validateValueImpl(Object value,
ValidationResult result) |
assertValid, fromJson, generateConstructor, getAllowedValues, getAttributes, getDefaultValueExpression, getDefaultValueExpressionAsString, getDescription, getDisplayName, getDisplayNameOrName, getEntityDef, getEntityQualifiedName, getExample, getIndexInEntityDef, getMaximumElements, getMinimumElements, getName, getNameForErrorMessage, getPosition, getPrimaryKeyPosition, getPrimaryKeyType, getQualifiedName, getSchemaDef, getSchemaDef, getSchemaPartContainer, getSchemaPartName, getSchemaPartType, getTags, getType, isArray, isLimitToAllowedValues, isPrimaryKey, isRequired, isStrictArrays, mapValue, newInstanceFromRecord, newInstanceFromType, newInstanceFromXml, toJson, validateAllowedValues, validateField, validateField, validateField, validateField, validateValue, validateValuegetSchemaName, getSchemaPartContainerName, getSchemaPartContainerTypeaddExceptionProperties, assertValid, exception, exception, exception, getInternalId, getInternalName, resetInternalIdfinalize, getClass, notify, notifyAll, wait, wait, waitgetSchemaProblems, getSchemaProblemsfromArrayValue, fromArrayValue, fromArrayValue, fromJson, newInstanceFromRecord, toArrayValue, toJson, toJson, toRecordnewInstanceFromJsonforEachGrandChildElement, fromXml, fromXml, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getChildElement, getChildElements, newInstanceFromXml, newInstanceFromXml, setAttribute, toXml, toXml, toXml, toXml, toXml, writeXml, writeXmladdExceptionProperties, contributeExceptionProperties, contributeExceptionPropertiespublic void getSchemaProblems(List<SchemaProblem> problems, boolean includeChildren)
getSchemaProblems in interface SchemaProblemsSuppliergetSchemaProblems in class FieldDefpublic TextFieldDef clone()
public void generateJavaCode(JavaCodeBuilder code)
generateJavaCode in interface JavaCodeGeneratorgenerateJavaCode in class FieldDefprotected void validateValueImpl(Object value, ValidationResult result) throws Throwable
validateValueImpl in class FieldDefThrowableprotected Object mapValueImpl(Object value) throws Throwable
mapValueImpl in class FieldDefThrowableprotected TextFieldDef setEntityDef(EntityDef entityDef)
setEntityDef in class FieldDefpublic TextFieldDef setName(String name)
public TextFieldDef setDisplayName(String displayName)
setDisplayName in class FieldDefpublic TextFieldDef setDescription(String description)
setDescription in class FieldDefpublic TextFieldDef setType(FieldType type)
public TextFieldDef setRequired(boolean required)
setRequired in class FieldDefpublic TextFieldDef setMinimumElements(Integer minimumElements)
setMinimumElements in class FieldDefpublic TextFieldDef setMaximumElements(Integer maximumElements)
setMaximumElements in class FieldDefpublic TextFieldDef setArray(boolean array)
FieldDefFieldDef.getMinimumElements() to zero (0) if both FieldDef.getMinimumElements() and FieldDef.getMaximumElements() are null, otherwise, does nothing.public TextFieldDef setStrictArrays(boolean strictArrays)
setStrictArrays in class FieldDefpublic TextFieldDef setAllowedValues(ValueMatch<?> allowedValues)
setAllowedValues in class FieldDefpublic TextFieldDef setLimitToAllowedValues(boolean limitToAllowedValues)
setLimitToAllowedValues in class FieldDefpublic TextFieldDef setPrimaryKeyPosition(Integer primaryKeyPosition)
setPrimaryKeyPosition in class FieldDefpublic TextFieldDef setPrimaryKeyType(PrimaryKeyType primaryKeyType)
setPrimaryKeyType in class FieldDefpublic Integer getMinimumLength()
public TextFieldDef setMinimumLength(Integer minimumLength)
public Integer getMaximumLength()
public TextFieldDef setMaximumLength(Integer maximumLength)
public boolean isAllowBlank()
public TextFieldDef setAllowBlank(boolean allowBlank)
public Pattern getPattern()
public TextFieldDef setPattern(Pattern pattern)
public TextFieldDef setPattern(String pattern)
public boolean isTrim()
public TextFieldDef setTrim(boolean trim)
public TextFieldDef setPosition(Integer position)
setPosition in class FieldDefpublic TextFieldDef setDefaultValueExpression(Expression defaultValueExpression)
FieldDefsetDefaultValueExpression in class FieldDefpublic TextFieldDef setExample(String example)
setExample in class FieldDefpublic TextFieldDef setAttributes(Attributes attributes)
setAttributes in class FieldDefpublic TextFieldDef setTags(Tags tags)
public Record toRecord()
toRecord in interface RecordSerializabletoRecord in class FieldDefpublic TextFieldDef fromRecord(Record source)
RecordSerializablethis (for fluid API call chaining).
For fluid API call chaining, the overridden method should change the declared return type to its class.fromRecord in interface RecordSerializablefromRecord in class FieldDefpublic Element toXmlElement(Document document)
toXmlElement in interface XmlSerializabletoXmlElement in class FieldDefpublic TextFieldDef fromXmlElement(Element fieldDefElement)
fromXmlElement in interface XmlSerializablefromXmlElement in class FieldDefCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.