接口 JavaTypeDescriptor<T>
-
- 所有超级接口:
Serializable
- 所有已知子接口:
BasicJavaDescriptor<T>
- 所有已知实现类:
AbstractTypeDescriptor,BigDecimalTypeDescriptor,BigIntegerTypeDescriptor,BlobTypeDescriptor,BooleanTypeDescriptor,ByteArrayTypeDescriptor,ByteTypeDescriptor,CalendarDateTypeDescriptor,CalendarTimeTypeDescriptor,CalendarTypeDescriptor,CharacterArrayTypeDescriptor,CharacterTypeDescriptor,ClassTypeDescriptor,ClobTypeDescriptor,CurrencyTypeDescriptor,DateTypeDescriptor,DoubleTypeDescriptor,DurationJavaDescriptor,EnumJavaTypeDescriptor,FloatTypeDescriptor,InstantJavaDescriptor,IntegerTypeDescriptor,JavaTypeDescriptorRegistry.FallbackJavaTypeDescriptor,JdbcDateTypeDescriptor,JdbcTimestampTypeDescriptor,JdbcTimeTypeDescriptor,LocalDateJavaDescriptor,LocalDateTimeJavaDescriptor,LocaleTypeDescriptor,LocalTimeJavaDescriptor,LongTypeDescriptor,NClobTypeDescriptor,OffsetDateTimeJavaDescriptor,OffsetTimeJavaDescriptor,PrimitiveByteArrayTypeDescriptor,PrimitiveCharacterArrayTypeDescriptor,RowVersionTypeDescriptor,SerializableTypeDescriptor,ShortTypeDescriptor,StringTypeDescriptor,TimeZoneTypeDescriptor,UrlTypeDescriptor,UUIDTypeDescriptor,ZonedDateTimeJavaDescriptor
public interface JavaTypeDescriptor<T> extends Serializable
Descriptor for the Java side of a value mapping.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 default booleanareEqual(T one, T another)Determine if two instances are equaldefault intextractHashCode(T value)Extract a proper hash code for this value.default StringextractLoggableRepresentation(T value)Extract a loggable representation of the value.TfromString(String string)default Comparator<T>getComparator()Retrieve the natural comparator for this type.default Class<T>getJavaType()Get the Java type describedClass<T>getJavaTypeClass()已过时。UsegetJavaType()insteaddefault MutabilityPlan<T>getMutabilityPlan()Retrieve the mutability plan for this Java type.default StringtoString(T value)<X> Xunwrap(T value, Class<X> type, WrapperOptions options)Unwrap an instance of our handled Java type into the requested type.<X> Twrap(X value, WrapperOptions options)Wrap a value as our handled Java type.
-
-
-
方法详细资料
-
getJavaTypeClass
@Deprecated Class<T> getJavaTypeClass()
已过时。UsegetJavaType()insteadRetrieve the Java type handled here.- 返回:
- The Java type.
-
getMutabilityPlan
default MutabilityPlan<T> getMutabilityPlan()
Retrieve the mutability plan for this Java type.
-
getComparator
default Comparator<T> getComparator()
Retrieve the natural comparator for this type.
-
extractHashCode
default int extractHashCode(T value)
Extract a proper hash code for this value.- 参数:
value- The value for which to extract a hash code.- 返回:
- The extracted hash code.
-
areEqual
default boolean areEqual(T one, T another)
Determine if two instances are equal- 参数:
one- One instanceanother- The other instance- 返回:
- True if the two are considered equal; false otherwise.
-
extractLoggableRepresentation
default String extractLoggableRepresentation(T value)
Extract a loggable representation of the value.- 参数:
value- The value for which to extract a loggable representation.- 返回:
- The loggable representation
-
unwrap
<X> X unwrap(T value, Class<X> type, WrapperOptions options)
Unwrap an instance of our handled Java type into the requested type. As an example, if this is aJavaTypeDescriptor<Integer>and we are asked to unwrap theInteger valueas aLongwe would return something likeLong.valueOf( value.longValue() ). Intended use is duringPreparedStatementbinding.- 类型参数:
X- The conversion type.- 参数:
value- The value to unwraptype- The type as which to unwrapoptions- The options- 返回:
- The unwrapped value.
-
wrap
<X> T wrap(X value, WrapperOptions options)
Wrap a value as our handled Java type. Intended use is duringResultSetextraction.- 类型参数:
X- The conversion type.- 参数:
value- The value to wrap.options- The options- 返回:
- The wrapped value.
-
-