Class PostgreSQLSpringRangeType
java.lang.Object
io.hypersistence.utils.hibernate.type.ImmutableType<org.springframework.data.domain.Range>
io.hypersistence.utils.hibernate.type.range.spring.PostgreSQLSpringRangeType
- All Implemented Interfaces:
Serializable,org.hibernate.type.Type,org.hibernate.usertype.DynamicParameterizedType,org.hibernate.usertype.EnhancedUserType<org.springframework.data.domain.Range>,org.hibernate.usertype.ParameterizedType,org.hibernate.usertype.UserType<org.springframework.data.domain.Range>
public class PostgreSQLSpringRangeType
extends ImmutableType<org.springframework.data.domain.Range>
implements org.hibernate.usertype.DynamicParameterizedType
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.usertype.DynamicParameterizedType
org.hibernate.usertype.DynamicParameterizedType.ParameterType -
Field Summary
FieldsFields inherited from interface org.hibernate.usertype.DynamicParameterizedType
ACCESS_TYPE, ENTITY, IS_DYNAMIC, IS_PRIMARY_KEY, PARAMETER_TYPE, PROPERTY, RETURNED_CLASS, XPROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.data.domain.Range<BigDecimal>bigDecimalRange(String range) org.springframework.data.domain.RangefromStringValue(CharSequence sequence) protected org.springframework.data.domain.Rangeget(ResultSet rs, int position, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) Get the column value from the JDBCResultSet.intstatic org.springframework.data.domain.Range<Integer>integerRange(String range) static org.springframework.data.domain.Range<LocalDate>localDateRange(String range) static org.springframework.data.domain.Range<LocalDateTime>localDateTimeRange(String range) static org.springframework.data.domain.Range<Long>static org.springframework.data.domain.Range<OffsetDateTime>offsetDateTimeRange(String rangeStr) static <T extends Comparable<?>>
org.springframework.data.domain.Range<T>protected voidset(PreparedStatement st, org.springframework.data.domain.Range range, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) Set the column value on the provided JDBCPreparedStatement.voidsetParameterValues(Properties properties) static org.springframework.data.domain.Range<ZonedDateTime>zonedDateTimeRange(String rangeStr) Methods inherited from class io.hypersistence.utils.hibernate.type.ImmutableType
assemble, assemble, beforeAssemble, compare, compare, deepCopy, deepCopy, disassemble, disassemble, equals, getColumnSpan, getConfiguration, getHashCode, getHashCode, getName, getReturnedClass, getSqlTypeCodes, hashCode, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, returnedClass, toColumnNullness, toLoggableString, toSqlLiteral, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.type.Type
disassemble, getReturnedClassNameMethods inherited from interface org.hibernate.usertype.UserType
getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getJdbcType, getValueConverter
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PostgreSQLSpringRangeType
public PostgreSQLSpringRangeType() -
PostgreSQLSpringRangeType
-
-
Method Details
-
fromStringValue
public org.springframework.data.domain.Range fromStringValue(CharSequence sequence) throws org.hibernate.HibernateException - Specified by:
fromStringValuein interfaceorg.hibernate.usertype.EnhancedUserType<org.springframework.data.domain.Range>- Throws:
org.hibernate.HibernateException
-
setParameterValues
- Specified by:
setParameterValuesin interfaceorg.hibernate.usertype.ParameterizedType
-
getSqlType
public int getSqlType()- Specified by:
getSqlTypein interfaceorg.hibernate.usertype.UserType<org.springframework.data.domain.Range>
-
ofString
public static <T extends Comparable<?>> org.springframework.data.domain.Range<T> ofString(String str, Function<String, T> converter, Class<T> clazz) -
bigDecimalRange
-
integerRange
-
longRange
-
localDateTimeRange
-
localDateRange
-
zonedDateTimeRange
public static org.springframework.data.domain.Range<ZonedDateTime> zonedDateTimeRange(String rangeStr) -
offsetDateTimeRange
public static org.springframework.data.domain.Range<OffsetDateTime> offsetDateTimeRange(String rangeStr)