public class PostgreSQLRangeType extends ImmutableType<Range> implements org.hibernate.usertype.DynamicParameterizedType
Range object type to a PostgreSQL range
column type.
Supported range types:
For more details about how to use it, check out this article on vladmihalcea.com.
| Modifier and Type | Field and Description |
|---|---|
static PostgreSQLRangeType |
INSTANCE |
| Constructor and Description |
|---|
PostgreSQLRangeType() |
| Modifier and Type | Method and Description |
|---|---|
protected Range |
get(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object owner)
Get the column value from the JDBC
ResultSet. |
Class<?> |
getElementType() |
protected void |
set(PreparedStatement st,
Range range,
int index,
org.hibernate.engine.spi.SharedSessionContractImplementor session)
Set the column value on the provided JDBC
PreparedStatement. |
void |
setParameterValues(Properties parameters) |
int[] |
sqlTypes() |
assemble, assemble, beforeAssemble, compare, deepCopy, deepCopy, defaultSizes, dictatedSizes, disassemble, disassemble, equals, getColumnSpan, getConfiguration, getHashCode, getHashCode, getName, getRegistrationKeys, getReturnedClass, getSemiResolvedType, hashCode, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, resolve, returnedClass, semiResolve, sqlTypes, toColumnNullness, toLoggableStringpublic static final PostgreSQLRangeType INSTANCE
public int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserTypeprotected Range get(ResultSet rs, String[] names, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) throws SQLException
ImmutableTypeResultSet.get in class ImmutableType<Range>rs - JDBC ResultSetnames - database column namesession - current Hibernate Sessionowner - current Hibernate SessionFactoryImplementorSQLException - in case of failureprotected void set(PreparedStatement st, Range range, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws SQLException
ImmutableTypePreparedStatement.set in class ImmutableType<Range>st - JDBC PreparedStatementrange - database column valueindex - database column indexsession - current Hibernate SessionSQLException - in case of failurepublic void setParameterValues(Properties parameters)
setParameterValues in interface org.hibernate.usertype.ParameterizedTypepublic Class<?> getElementType()
Copyright © 2022. All rights reserved.