public class FieldDef
extends Object
implements Serializable
DataSet
,
Serialized FormConstructor and Description |
---|
FieldDef()
Instantiates a new FieldDef.
|
FieldDef(int sqlDataType,
String nativeDataType)
Instantiates a new FieldDef.
|
Modifier and Type | Method and Description |
---|---|
void |
addVersion()
Add version.
|
FieldDef |
copy()
Copy field.
|
void |
copyDataType(FieldDef to)
Copy data type.
|
FieldDef |
copyEssential(FieldDef to)
Copy essential attributes.
|
void |
forceNativeDataType(String value)
Sets the native data type.Ignore fieldTypeOverriddenByVar
|
void |
forceSqlDataType(int value)
Sets the sql data type.
|
FieldDef |
getBestMatch()
Gets the best match.
|
Object |
getData()
Gets the data associated with a field.
|
String |
getDataSize()
Gets the data size.
|
int |
getDataTypeInArray()
Gets the data type in array.
|
String |
getDisplayName()
Gets the column name to display in the table header.
|
int |
getFieldSize()
Gets the field size.
|
boolean |
getHasDecimal()
Gets the checks for decimal.
|
int |
getIndex()
Gets the index of the field.
|
int |
getIndexInRecord()
Gets the index in record.
|
Class<?> |
getJavaDataType()
Gets the primitive java data type.
|
String |
getName()
Gets the name.
|
String |
getNameToPersist()
Gets the name to use when persisting data set.
|
String |
getNameToUse()
Gets the column name to use in the SQL.
|
String |
getNativeDataType()
Gets the native data type.
|
int |
getPrecision()
Gets the precision.
|
String |
getRealDisplayName()
Gets the real display name.
|
String |
getRealName()
Gets the real name.
|
int |
getScale()
Gets the scale.
|
int |
getSqlDataType()
Gets the sql data type.
|
int |
getVersions()
Gets number of versions of the same field.
|
boolean |
hasParams()
Checks if field has parameters.
|
boolean |
hasSpacesInName()
Checks if field name has spaces.
|
boolean |
isArray() |
boolean |
isAttribute()
Checks if fields is an XML attribute.
|
boolean |
isAutoIncrement()
Checks if field is auto increment.
|
boolean |
isBlob()
Checks if field is BLOB.
|
boolean |
isBoolean()
Checks if field is boolean.
|
boolean |
isCdata()
Checks if this field is a CDATA XML node.
|
boolean |
isChar()
Checks if field is char (all flavors of chars).
|
boolean |
isClob()
Checks if field is CLOB.
|
boolean |
isDate()
Checks if field is date or time or timestamp.
|
boolean |
isDateOnly()
Checks if field is date.
|
boolean |
isDateTime()
Checks if field is date or timestamp.
|
boolean |
isEncode()
Checks if field is encoded.
|
boolean |
isFieldTypeOverriddenByVar()
Checks if the field type is overridden by var.
|
boolean |
isHasNoParentRowTag()
Checks if is the field has no parent row tag in XML.
|
boolean |
isHiddenIfEmpty()
Checks if this field is hidden if it doesn't have a value
|
boolean |
isHiddenInNested()
Checks if field must be hidden in nested datasets.
|
boolean |
isJsonArray()
Checks if field is json array.
|
boolean |
isKey()
Checks if this field is a part of the primary key.
|
boolean |
isLargeObject()
Checks if field is CLOB or BLOB.
|
boolean |
isMarkedToDelete()
Checks if field is mark to be deleted.
|
boolean |
isNullable()
Checks if field is nullable.
|
boolean |
isNumeric()
Checks if field is numeric.
|
boolean |
isObjectsAsStrings()
Checks if objects such as arrays, structs, etc should deserialized as
strings.
|
boolean |
isOther()
Checks if field is on the following data types: DISTINCT, REF, DATALINK.
|
boolean |
isTagValueField()
Checks if this field is an XML tag value.
|
boolean |
isTime()
Checks if field is time.
|
boolean |
isTimestamp()
Checks if field is timestamp.
|
boolean |
isVisible()
Checks if field is visible.
|
boolean |
isXml()
Checks if field is XML.
|
void |
removeVersion()
Remove version.
|
void |
setAttribute(boolean isAttribute)
Makes field an XML attribute.
|
void |
setAutoIncrement(boolean value)
Sets the auto increment flag for the field.
|
void |
setBestMatch(FieldDef value)
Sets the best match.
|
void |
setCdata(boolean isCdata)
Sets the cdata flag for the field.
|
void |
setData(Object data)
Sets the data associated with a field.
|
void |
setDataSize(String value)
Sets the data size.
|
void |
setDataTypeInArray(int dataTypeInArray)
Sets the data type in array.
|
void |
setDisplayName(String value)
Sets the display name.
|
void |
setEncode(boolean value)
Sets the encode flag.
|
void |
setFieldSize(int value)
Sets the field size.
|
void |
setFieldTypeOverriddenByVar(boolean fieldTypeOverriddenByVar)
Sets the value of the parameter "field type overridden by var".
|
void |
setHasDecimal(boolean hasDecimal)
Sets the checks for decimal.
|
void |
setHasNoParentRowTag(boolean hasNoParentRowTag)
Sets the flag "has no parent row tag".
|
void |
setHasParams(boolean value)
Sets the "has parameters" flag.
|
void |
setHiddenIfEmpty(boolean isHiddenIfEmpty)
Sets the value of the flag "hidden if empty".
|
void |
setHiddenInNested(boolean isHiddenInNested)
Sets the attribute "hidden in nested".
|
void |
setIndex(int value)
Sets the index.
|
void |
setIndexInRecord(int indexInRecord)
Sets the index in record.
|
void |
setJsonArray(boolean isJsonArray)
Sets the flag "is json array".
|
void |
setKey(boolean isKey)
Sets the 'is key' flag.
|
void |
setName(String value)
Sets the name.
|
void |
setNativeDataType(String value)
Sets the native data type.
|
void |
setNullable(boolean value)
Sets the nullable.
|
void |
setObjectsAsStrings(boolean objectsAsStrings)
Sets the flag "objects as strings".
|
void |
setPrecision(int value)
Sets the precision.
|
void |
setRealName(String value)
Sets the real name.
|
void |
setScale(int value)
Sets the scale.
|
void |
setSqlDataType(int value)
Sets the sql data type.
|
void |
setTagValueField(boolean isTagValueField)
Sets the flag for "XML tag value field".
|
void |
setToDelete(boolean value)
Sets "marked to be deleted" flag.
|
void |
setVisible(boolean value)
Sets the "is visible" flag.
|
public FieldDef()
public FieldDef(int sqlDataType, String nativeDataType)
sqlDataType
- the sql data type, for example java.sql.Types.NUMERICnativeDataType
- the native data type, the native data type, for example
"NUMBER(18)"public void addVersion()
public FieldDef copy()
public void copyDataType(FieldDef to)
to
- the to fieldpublic FieldDef copyEssential(FieldDef to)
to
- the field to copy essential attributes topublic FieldDef getBestMatch()
public Object getData()
public String getDataSize()
public String getDisplayName()
public int getFieldSize()
public int getIndex()
public Class<?> getJavaDataType()
public String getName()
public String getNameToPersist()
public String getNameToUse()
public String getNativeDataType()
public int getPrecision()
public String getRealDisplayName()
public String getRealName()
public int getScale()
public int getSqlDataType()
public int getVersions()
public boolean hasParams()
public boolean hasSpacesInName()
public boolean isArray()
public boolean isAutoIncrement()
public boolean isBlob()
public boolean isBoolean()
public boolean isChar()
public boolean isClob()
public boolean isDate()
public boolean isDateOnly()
public boolean isDateTime()
public boolean isEncode()
public boolean isLargeObject()
public boolean isMarkedToDelete()
true
if field is mark to be deletedpublic boolean isNullable()
public boolean isNumeric()
public boolean isOther()
public boolean isTime()
public boolean isTimestamp()
public boolean isVisible()
public boolean isXml()
public void removeVersion()
public void setAutoIncrement(boolean value)
value
- the new auto increment flagpublic void setBestMatch(FieldDef value)
value
- the new best matchpublic void setData(Object data)
data
- the new datapublic void setDataSize(String value)
value
- the new data sizepublic void setDisplayName(String value)
value
- the new display namepublic void setEncode(boolean value)
value
- the new encode flagpublic void setFieldSize(int value)
value
- the new field sizepublic void setHasParams(boolean value)
value
- the new value for "has parameters" flagpublic void setIndex(int value)
value
- the new indexpublic void setName(String value)
value
- the new namepublic void setNativeDataType(String value)
value
- the new native data typepublic void forceNativeDataType(String value)
value
- the new native data typepublic void setNullable(boolean value)
value
- the new nullablepublic void setPrecision(int value)
value
- the new precisionpublic void setRealName(String value)
value
- the new real namepublic void setScale(int value)
value
- the new scalepublic void setSqlDataType(int value)
value
- the new sql data typepublic void forceSqlDataType(int value)
value
- the new sql data typepublic void setToDelete(boolean value)
value
- the new value of the "marked to be deleted" flagpublic void setVisible(boolean value)
value
- the new value for "is visible" flagpublic boolean isAttribute()
public void setAttribute(boolean isAttribute)
isAttribute
- booleanpublic boolean isHiddenInNested()
public void setHiddenInNested(boolean isHiddenInNested)
isHiddenInNested
- booleanpublic boolean isJsonArray()
public void setJsonArray(boolean isJsonArray)
isJsonArray
- booleanpublic boolean isCdata()
public void setCdata(boolean isCdata)
isCdata
- boolean, the new value for the cdata flagpublic boolean isTagValueField()
public void setTagValueField(boolean isTagValueField)
isTagValueField
- booleanpublic boolean isHiddenIfEmpty()
public void setHiddenIfEmpty(boolean isHiddenIfEmpty)
isHiddenIfEmpty
- the new value of the flag "hidden if empty"public boolean isHasNoParentRowTag()
public void setHasNoParentRowTag(boolean hasNoParentRowTag)
hasNoParentRowTag
- the new value of the flag "has no parent row tag"public boolean isObjectsAsStrings()
public void setObjectsAsStrings(boolean objectsAsStrings)
objectsAsStrings
- the new value of the "objects as strings" flagpublic boolean isFieldTypeOverriddenByVar()
public void setFieldTypeOverriddenByVar(boolean fieldTypeOverriddenByVar)
fieldTypeOverriddenByVar
- booleanpublic int getIndexInRecord()
public void setIndexInRecord(int indexInRecord)
indexInRecord
- the new index in recordpublic boolean getHasDecimal()
public void setHasDecimal(boolean hasDecimal)
hasDecimal
- the new checks for decimalpublic int getDataTypeInArray()
public void setDataTypeInArray(int dataTypeInArray)
dataTypeInArray
- the new data type in arraypublic boolean isKey()
public void setKey(boolean isKey)
isKey
- the new value of the 'is key' flagCopyright © 2010-2020 Toolsverse. All Rights Reserved.