Class AbstractCastingPostGISJdbcType

java.lang.Object
org.hibernate.spatial.dialect.postgis.AbstractCastingPostGISJdbcType
All Implemented Interfaces:
Serializable, JdbcType
Direct Known Subclasses:
PGCastingGeographyJdbcType, PGCastingGeometryJdbcType

public abstract class AbstractCastingPostGISJdbcType extends Object implements JdbcType
Type Descriptor for the Postgis Geometry type
See Also:
  • Method Details

    • getJdbcLiteralFormatter

      public <T> JdbcLiteralFormatter<T> getJdbcLiteralFormatter(JavaType<T> javaType)
      Description copied from interface: JdbcType
      Obtain a formatter object capable of rendering values of the given Java type as SQL literals of the type represented by this object.
      Specified by:
      getJdbcLiteralFormatter in interface JdbcType
    • getDefaultSqlTypeCode

      public abstract int getDefaultSqlTypeCode()
      Description copied from interface: JdbcType
      A JDBC type code that identifies the SQL column type.

      This value might be different from JdbcType.getDdlTypeCode() if the actual type e.g. JSON is emulated through a type like CLOB.

      Specified by:
      getDefaultSqlTypeCode in interface JdbcType
      Returns:
      a JDBC type code
    • getConstructorFunction

      protected abstract String getConstructorFunction()
    • appendWriteExpression

      public void appendWriteExpression(String writeExpression, @Nullable Size size, SqlAppender appender, Dialect dialect)
      Description copied from interface: JdbcType
      Append the write expression wrapped in a way to be able to write values with this JdbcType's ValueBinder.
      Specified by:
      appendWriteExpression in interface JdbcType
    • isWriteExpressionTyped

      public boolean isWriteExpressionTyped(Dialect dialect)
      Description copied from interface: JdbcType
      Whether the write expression is typed. This is used to determine if a parameter expression needs a cast in e.g. a select item context.
      Specified by:
      isWriteExpressionTyped in interface JdbcType
    • toGeometry

      public org.geolatte.geom.Geometry<?> toGeometry(String wkt)
    • getJdbcTypeCode

      public int getJdbcTypeCode()
      Description copied from interface: JdbcType
      The JDBC type code used when interacting with JDBC APIs.

      For example, it's used when calling PreparedStatement.setNull(int, int).

      Specified by:
      getJdbcTypeCode in interface JdbcType
      Returns:
      a JDBC type code
    • getBinder

      public <X> ValueBinder<X> getBinder(JavaType<X> javaType)
      Description copied from interface: JdbcType
      Obtain a binder object capable of binding values of the given Java type to parameters of a JDBC PreparedStatement.
      Specified by:
      getBinder in interface JdbcType
      Parameters:
      javaType - The descriptor describing the types of Java values to be bound
      Returns:
      The appropriate binder.
    • getExtractor

      public <X> ValueExtractor<X> getExtractor(JavaType<X> javaType)
      Description copied from interface: JdbcType
      Obtain an extractor object capable of extracting values of the given Java type from a JDBC ResultSet.
      Specified by:
      getExtractor in interface JdbcType
      Parameters:
      javaType - The descriptor describing the types of Java values to be extracted
      Returns:
      The appropriate extractor