Package org.hibernate.dialect.type
Class AbstractPostgreSQLStructJdbcType
java.lang.Object
org.hibernate.dialect.type.AbstractPostgreSQLStructJdbcType
- All Implemented Interfaces:
Serializable,AggregateJdbcType,JdbcType,SqlTypedJdbcType,StructuredJdbcType
- Direct Known Subclasses:
PostgreSQLStructCastingJdbcType,PostgreSQLStructPGObjectJdbcType
Implementation for serializing/deserializing an embeddable aggregate to/from the PostgreSQL component format.
For regular queries, we select the individual struct elements because the PostgreSQL component format encoding
is probably not very efficient.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPostgreSQLStructJdbcType(EmbeddableMappingType embeddableMappingType, String typeName, int[] orderMapping) -
Method Summary
Modifier and TypeMethodDescriptioncreateJdbcValue(Object domainValue, WrapperOptions options) Object[]extractJdbcValues(Object rawJdbcValue, WrapperOptions options) protected <X> XfromString(String string, JavaType<X> javaType, WrapperOptions options) protected <X> ObjectgetBindValue(X value, WrapperOptions options) <X> ValueExtractor<X>getExtractor(JavaType<X> javaType) <T> JavaType<T>getJdbcRecommendedJavaTypeMapping(Integer precision, Integer scale, TypeConfiguration typeConfiguration) intThe JDBC type code used when interacting with JDBC APIs.protected StringgetRawStructFromJdbcValue(Object rawJdbcValue) protected <X> StringtoString(X value, JavaType<X> javaType, WrapperOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.type.descriptor.jdbc.AggregateJdbcType
resolveAggregateJdbcTypeMethods inherited from interface org.hibernate.type.descriptor.jdbc.JdbcType
addAuxiliaryDatabaseObjects, appendWriteExpression, getBinder, getCastType, getCheckCondition, getDdlTypeCode, getDefaultSqlTypeCode, getExtraCreateTableInfo, getFriendlyName, getJdbcLiteralFormatter, getPreferredJavaTypeClass, hasDatePart, hasTimePart, isArray, isBinary, isBoolean, isComparable, isDecimal, isDuration, isFloat, isImplicitJson, isImplicitXml, isInteger, isInterval, isJson, isLob, isLobOrLong, isNationalized, isNumber, isSmallInteger, isSpatial, isString, isStringLike, isStringLikeExcludingClob, isTemporal, isXml, registerOutParameter, registerOutParameter, wrapTopLevelSelectionExpression, wrapWriteExpressionMethods inherited from interface org.hibernate.type.descriptor.jdbc.StructuredJdbcType
getSqlTypeName
-
Constructor Details
-
AbstractPostgreSQLStructJdbcType
protected AbstractPostgreSQLStructJdbcType(EmbeddableMappingType embeddableMappingType, String typeName, int[] orderMapping)
-
-
Method Details
-
getJdbcTypeCode
public int getJdbcTypeCode()Description copied from interface:JdbcTypeThe JDBC type code used when interacting with JDBC APIs.For example, it's used when calling
PreparedStatement.setNull(int, int).- Specified by:
getJdbcTypeCodein interfaceJdbcType- Returns:
- a JDBC type code
-
getStructTypeName
- Specified by:
getStructTypeNamein interfaceStructuredJdbcType
-
getEmbeddableMappingType
- Specified by:
getEmbeddableMappingTypein interfaceAggregateJdbcType
-
getJdbcRecommendedJavaTypeMapping
public <T> JavaType<T> getJdbcRecommendedJavaTypeMapping(Integer precision, Integer scale, TypeConfiguration typeConfiguration) - Specified by:
getJdbcRecommendedJavaTypeMappingin interfaceJdbcType
-
getExtractor
Description copied from interface:JdbcTypeObtain an extractor object capable of extracting values of the given Java type from a JDBCResultSet.- Specified by:
getExtractorin interfaceJdbcType- Parameters:
javaType- The descriptor describing the types of Java values to be extracted- Returns:
- The appropriate extractor
-
fromString
protected <X> X fromString(String string, JavaType<X> javaType, WrapperOptions options) throws SQLException - Throws:
SQLException
-
createJdbcValue
- Specified by:
createJdbcValuein interfaceAggregateJdbcType- Throws:
SQLException
-
extractJdbcValues
- Specified by:
extractJdbcValuesin interfaceAggregateJdbcType- Throws:
SQLException
-
getRawStructFromJdbcValue
-
toString
protected <X> String toString(X value, JavaType<X> javaType, WrapperOptions options) throws SQLException - Throws:
SQLException
-
getBindValue
- Throws:
SQLException
-