public class PostGISGeometries extends Object implements GeometryAdvisor<org.postgresql.PGConnection>
Constructor and Description |
---|
PostGISGeometries() |
Modifier and Type | Method and Description |
---|---|
Class<? extends com.vividsolutions.jts.geom.Geometry> |
configureGeometryColumnType(org.postgresql.PGConnection connection,
schemacrawler.schema.Column column,
DefaultTypeDefinition type)
Configure the type for a geometry column.
|
Object |
convertGeometry(GeometryProperty<?> geom,
TypeDefinition columnType)
Convert a property to a value that can be stored in the database.
|
boolean |
isFixedType(schemacrawler.schema.ColumnDataType columnType)
Determines if for a column type detected as geometry type and associated
to this advisor is a fixed type, i.e.
|
public boolean isFixedType(schemacrawler.schema.ColumnDataType columnType)
GeometryAdvisor
isFixedType
in interface GeometryAdvisor<org.postgresql.PGConnection>
columnType
- the column data typepublic Class<? extends com.vividsolutions.jts.geom.Geometry> configureGeometryColumnType(org.postgresql.PGConnection connection, schemacrawler.schema.Column column, DefaultTypeDefinition type)
GeometryAdvisor
configureGeometryColumnType
in interface GeometryAdvisor<org.postgresql.PGConnection>
connection
- the JDBC connectioncolumn
- the geometry columntype
- the type definition associated to the column. It may be
adapted by adding custom constraints, but GeometryType
and Binding
will be set by the callerGeometryType
bindingpublic Object convertGeometry(GeometryProperty<?> geom, TypeDefinition columnType) throws Exception
GeometryAdvisor
convertGeometry
in interface GeometryAdvisor<org.postgresql.PGConnection>
geom
- the geometry property value consisting of geometry and the
associated CRS definitioncolumnType
- the type definition of the associated geometry column
that was previously configured using
GeometryAdvisor.configureGeometryColumnType(Object, Column, DefaultTypeDefinition)
Exception
- something went wrongBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a