Class Column
java.lang.Object
org.apache.sis.internal.sql.feature.Column
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
FieldsModifier and TypeFieldDescriptionfinal booleanWhether the column can have null values.final StringTitle to use for displays.final StringName of the column.final intType of values as one of the constants enumerated inTypesclass.final StringA name for the value type, free-text from the database engine. -
Method Summary
Modifier and TypeMethodDescriptionfinal Optional<org.opengis.referencing.crs.CoordinateReferenceSystem> If this column is a geometry or raster column, returns the default coordinate reference system.final Optional<GeometryType> If this column is a geometry column, returns the type of the geometry objects.toString()Returns a string representation for debugging purposes.
-
Field Details
-
name
Name of the column.- See Also:
-
label
Title to use for displays. This is the name specified by theASkeyword in aSELECTclause. This is never null but may be identical tonameif no label was specified. -
type
public final int typeType of values as one of the constants enumerated inTypesclass.- See Also:
-
typeName
A name for the value type, free-text from the database engine. For more information about this, seeDatabaseMetaData.getColumns(String, String, String, String)andReflection.TYPE_NAME. This value shall not be null.- See Also:
-
isNullable
public final boolean isNullableWhether the column can have null values.- See Also:
-
-
Method Details
-
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, thenGeometryType.GEOMETRYis returned as a fallback.- Returns:
- type of geometry objects, or empty if this column is not a geometry column.
-
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
Returns a string representation for debugging purposes.
-