Class TableDescription
- java.lang.Object
-
- com.esri.arcgisruntime.data.TableDescription
-
public final class TableDescription extends java.lang.Object
An object that describes aGeodatabaseFeatureTable
to 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 Summary
Constructors Constructor Description TableDescription(java.lang.String name)
Creates a new table description object with the specified name.TableDescription(java.lang.String name, SpatialReference spatialReference, GeometryType geometryType)
Creates a new table description object with the specified name, spatial reference, and geometry type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<FieldDescription>
getFieldDescriptions()
Gets aList
ofFieldDescription
objects that represent the descriptions of the fields to be created.GeometryType
getGeometryType()
Gets the type of geometry to be used by features in the table.SpatialReference
getSpatialReference()
Gets the spatial reference to be used by feature geometries in the table.java.lang.String
getTableName()
Gets the table's name.boolean
hasAttachments()
True if the features should support attachments.boolean
hasM()
True if the feature geometries should contain M values.boolean
hasZ()
True if the feature geometries should contain Z values.void
setGeometryType(GeometryType geometryType)
Sets the type of geometry to be used by features in the table.void
setHasAttachments(boolean hasAttachments)
True if the features should support attachments.void
setHasM(boolean hasM)
True if the feature geometries should contain M values.void
setHasZ(boolean hasZ)
True if the feature geometries should contain Z values.void
setSpatialReference(SpatialReference spatialReference)
Sets the spatial reference to be used by feature geometries in the table.void
setTableName(java.lang.String tableName)
Sets the table's name.
-
-
-
Constructor Detail
-
TableDescription
public TableDescription(java.lang.String name)
Creates a new table description object with the specified name.- Parameters:
name
- the table's name- Throws:
java.lang.IllegalArgumentException
- if name is null- Since:
- 100.14.0
-
TableDescription
public TableDescription(java.lang.String name, SpatialReference spatialReference, GeometryType geometryType)
Creates a new table description object with the specified name, spatial reference, and geometry type.- Parameters:
name
- the field's namespatialReference
- the table's spatial referencegeometryType
- the table's geometry type- Throws:
java.lang.IllegalArgumentException
- if name is nulljava.lang.IllegalArgumentException
- if spatialReference is nulljava.lang.IllegalArgumentException
- if geometryType is null- Since:
- 100.14.0
-
-
Method Detail
-
getFieldDescriptions
public java.util.List<FieldDescription> getFieldDescriptions()
Gets aList
ofFieldDescription
objects that represent the descriptions of the fields to be created.If no ObjectID field is provided, one will be automatically added.
- Returns:
- a
List
ofFieldDescription
objects that represent the descriptions of the fields to be created - Since:
- 100.14.0
-
getGeometryType
public GeometryType getGeometryType()
Gets the type of geometry to be used by features in the table.The default geometry type is
GeometryType.UNKNOWN
and represents a non-spatial table. When setting a known geometry type, the spatial reference also needs to be specified via thegetSpatialReference()
property.- Returns:
- the type of geometry to be used by features in the table
- Since:
- 100.14.0
-
setGeometryType
public void setGeometryType(GeometryType geometryType)
Sets the type of geometry to be used by features in the table.The default geometry type is
GeometryType.UNKNOWN
and represents a non-spatial table. When setting a known geometry type, the spatial reference also needs to be specified via thegetSpatialReference()
property.- Parameters:
geometryType
- the type of geometry to be used by features in the table- Throws:
java.lang.IllegalArgumentException
- if geometryType is null- Since:
- 100.14.0
-
hasAttachments
public boolean hasAttachments()
True if the features should support attachments.The default value is false. Enabling attachments requires a GlobalID field.
- Returns:
- true if the features should support attachments
- Since:
- 100.14.0
-
setHasAttachments
public void setHasAttachments(boolean hasAttachments)
True if the features should support attachments.The default value is false. Enabling attachments requires a GlobalID field.
- Parameters:
hasAttachments
- true if the features should support attachments- Since:
- 100.14.0
-
hasM
public boolean hasM()
True if the feature geometries should contain M values.The default value is false.
- Returns:
- true if the feature geometries should contain M values
- Since:
- 100.14.0
-
setHasM
public void setHasM(boolean hasM)
True if the feature geometries should contain M values.The default value is false.
- Parameters:
hasM
- true if the feature geometries should contain M values- Since:
- 100.14.0
-
hasZ
public boolean hasZ()
True if the feature geometries should contain Z values.The default value is false.
- Returns:
- true if the feature geometries should contain Z values
- Since:
- 100.14.0
-
setHasZ
public void setHasZ(boolean hasZ)
True if the feature geometries should contain Z values.The default value is false.
- Parameters:
hasZ
- true if the feature geometries should contain Z values- Since:
- 100.14.0
-
getSpatialReference
public SpatialReference getSpatialReference()
Gets the spatial reference to be used by feature geometries in the table.The default spatial reference is null and represents a non-spatial table. When setting to a non-null spatial reference, the geometry type also needs to be specified via the
getGeometryType()
property.- Returns:
- the spatial reference to be used by feature geometries in the table, or null if none
- Since:
- 100.14.0
-
setSpatialReference
public void setSpatialReference(SpatialReference spatialReference)
Sets the spatial reference to be used by feature geometries in the table.The default spatial reference is null and represents a non-spatial table. When setting to a non-null spatial reference, the geometry type also needs to be specified via the
getGeometryType()
property.- Parameters:
spatialReference
- the spatial reference to be used by feature geometries in the table- Since:
- 100.14.0
-
getTableName
public java.lang.String getTableName()
Gets the table's name.The table name must be non-empty, consist only of alphanumeric characters and underscores, and cannot start with a number or an underscore.
- Returns:
- the table's name
- Since:
- 100.14.0
-
setTableName
public void setTableName(java.lang.String tableName)
Sets the table's name.The table name must be non-empty, consist only of alphanumeric characters and underscores, and cannot start with a number or an underscore.
- Parameters:
tableName
- the table's name- Throws:
java.lang.IllegalArgumentException
- if tableName is null- Since:
- 100.14.0
-
-