Class Column

java.lang.Object
org.apache.sis.internal.sql.feature.Column

public final class Column extends Object
Information (name, data type…) about a table column. It contains information extracted from database metadata, possibly completed with information about a geometry column. The aim is to describe all information about a column that is needed for mapping to feature model.

Multi-threading

Column instances shall be kept unmodified after all fields have been initialized. The same instances may be read concurrently by many threads.
Since:
1.1
Version:
1.2
Author:
Alexis Manin (Geomatys), Martin Desruisseaux (Geomatys)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
    Whether the column can have null values.
    final String
    Title to use for displays.
    final String
    Name of the column.
    final int
    Type of values as one of the constants enumerated in Types class.
    final String
    A name for the value type, free-text from the database engine.
  • Method Summary

    Modifier and Type
    Method
    Description
    final Optional<org.opengis.referencing.crs.CoordinateReferenceSystem>
    If this column is a geometry or raster column, returns the default coordinate reference system.
    If this column is a geometry column, returns the type of the geometry objects.
    Returns a string representation for debugging purposes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Method Details

    • getGeometryType

      public final Optional<GeometryType> getGeometryType()
      If this column is a geometry column, returns the type of the geometry objects. Otherwise returns empty (including the case where this is a raster column). Note that if this column is a geometry column but the geometry type was not defined, then GeometryType.GEOMETRY is returned as a fallback.
      Returns:
      type of geometry objects, or empty if this column is not a geometry column.
    • getDefaultCRS

      public final Optional<org.opengis.referencing.crs.CoordinateReferenceSystem> getDefaultCRS()
      If this column is a geometry or raster column, returns the default coordinate reference system. Otherwise returns empty. The CRS may also be empty even for a geometry column if it is unspecified.
      Returns:
      CRS of geometries or rasters in this column, or empty if unknown or not applicable.
    • toString

      public String toString()
      Returns a string representation for debugging purposes.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this column.