Class FieldDescription
- java.lang.Object
- 
- com.esri.arcgisruntime.data.FieldDescription
 
- 
 public final class FieldDescription extends java.lang.ObjectAn object that describes aFieldto be created.Creation of fields and tables is currently only supported on mobile geodatabases, either created in ArcGIS Pro or via Geodatabase.createAsync(String).- Since:
- 100.14.0
 
- 
- 
Constructor SummaryConstructors Constructor Description FieldDescription(java.lang.String name, Field.Type fieldType)Creates a new field description object with the specified name and type.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlias()Gets the field's alias.java.lang.StringgetDomainName()Gets the name of the domain to use on this field.booleangetEditable()True if the field is editable.Field.TypegetFieldType()Gets the field's data type.intgetLength()Gets the length of the field.java.lang.StringgetName()Gets the field's name.booleangetNullable()True if the field is nullable.voidsetAlias(java.lang.String alias)Sets the field's alias.voidsetDomainName(java.lang.String domainName)Sets the name of the domain to use on this field.voidsetEditable(boolean editable)True if the field is editable.voidsetFieldType(Field.Type fieldType)Sets the field's data type.voidsetLength(int length)Sets the length of the field.voidsetName(java.lang.String name)Sets the field's name.voidsetNullable(boolean nullable)True if the field is nullable.
 
- 
- 
- 
Constructor Detail- 
FieldDescriptionpublic FieldDescription(java.lang.String name, Field.Type fieldType)Creates a new field description object with the specified name and type.- Parameters:
- name- the field's name
- fieldType- the field's data type
- Throws:
- java.lang.IllegalArgumentException- if name is null
- java.lang.IllegalArgumentException- if fieldType is null
- Since:
- 100.14.0
 
 
- 
 - 
Method Detail- 
getAliaspublic java.lang.String getAlias() Gets the field's alias.The default value is an empty string. - Returns:
- the field's alias
- Since:
- 100.14.0
 
 - 
setAliaspublic void setAlias(java.lang.String alias) Sets the field's alias.The default value is an empty string. - Parameters:
- alias- the field's alias
- Throws:
- java.lang.IllegalArgumentException- if alias is null
- Since:
- 100.14.0
 
 - 
getDomainNamepublic java.lang.String getDomainName() Gets the name of the domain to use on this field.The domain must already exist in the geodatabase (see Geodatabase.createDomainAsync(DomainDescription)). The default value of an empty string indicates that no domain should be used.- Returns:
- the name of the domain to use on this field
- Since:
- 100.14.0
 
 - 
setDomainNamepublic void setDomainName(java.lang.String domainName) Sets the name of the domain to use on this field.The domain must already exist in the geodatabase (see Geodatabase.createDomainAsync(DomainDescription)). The default value of an empty string indicates that no domain should be used.- Parameters:
- domainName- the name of the domain to use on this field
- Throws:
- java.lang.IllegalArgumentException- if domainName is null
- Since:
- 100.14.0
 
 - 
getEditablepublic boolean getEditable() True if the field is editable.The default value is true. - Returns:
- true if the field is editable
- Since:
- 100.14.0
 
 - 
setEditablepublic void setEditable(boolean editable) True if the field is editable.The default value is true. - Parameters:
- editable- true if the field is editable
- Since:
- 100.14.0
 
 - 
getFieldTypepublic Field.Type getFieldType() Gets the field's data type.The default is Field.Type.UNKNOWN, and must be set to a valid type.- Returns:
- the field's data type
- Since:
- 100.14.0
 
 - 
setFieldTypepublic void setFieldType(Field.Type fieldType) Sets the field's data type.The default is Field.Type.UNKNOWN, and must be set to a valid type.- Parameters:
- fieldType- the field's data type
- Throws:
- java.lang.IllegalArgumentException- if fieldType is null
- Since:
- 100.14.0
 
 - 
getLengthpublic int getLength() Gets the length of the field.The default value is 0. This only applies to text fields. - Returns:
- the length of the field
- Since:
- 100.14.0
 
 - 
setLengthpublic void setLength(int length) Sets the length of the field.The default value is 0. This only applies to text fields. - Parameters:
- length- the length of the field
- Since:
- 100.14.0
 
 - 
getNamepublic java.lang.String getName() Gets the field's name.Field names must be non-empty, consist only of alphanumeric characters and underscores, and cannot start with a number or an underscore. - Returns:
- the field's name
- Since:
- 100.14.0
 
 - 
setNamepublic void setName(java.lang.String name) Sets the field's name.Field names must be non-empty, consist only of alphanumeric characters and underscores, and cannot start with a number or an underscore. - Parameters:
- name- the field's name
- Throws:
- java.lang.IllegalArgumentException- if name is null
- Since:
- 100.14.0
 
 - 
getNullablepublic boolean getNullable() True if the field is nullable.The default value is true. - Returns:
- true if the field is nullable
- Since:
- 100.14.0
 
 - 
setNullablepublic void setNullable(boolean nullable) True if the field is nullable.The default value is true. - Parameters:
- nullable- true if the field is nullable
- Since:
- 100.14.0
 
 
- 
 
-