Class TableDescription

java.lang.Object
com.esri.arcgisruntime.data.TableDescription

public final class TableDescription extends Object
An object that describes a GeodatabaseFeatureTable 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 Details

    • TableDescription

      public TableDescription(String name)
      Creates a new table description object with the specified name.
      Parameters:
      name - the table's name
      Throws:
      IllegalArgumentException - if name is null
      Since:
      100.14.0
    • TableDescription

      public TableDescription(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 name
      spatialReference - the table's spatial reference
      geometryType - the table's geometry type
      Throws:
      IllegalArgumentException - if name is null
      IllegalArgumentException - if spatialReference is null
      IllegalArgumentException - if geometryType is null
      Since:
      100.14.0
  • Method Details

    • getFieldDescriptions

      public List<FieldDescription> getFieldDescriptions()
      Gets a List of FieldDescription 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 of FieldDescription 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 the getSpatialReference() 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 the getSpatialReference() property.

      Parameters:
      geometryType - the type of geometry to be used by features in the table
      Throws:
      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 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(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:
      IllegalArgumentException - if tableName is null
      Since:
      100.14.0