[原创]Hibernate 类型 Java 类型 映射表

本文详细介绍了Hibernate框架中各种类型的Java映射方式,包括基本数据类型、复合类型及特殊类型的映射规则,如BigDecimalType、BigIntegerType等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Hibernate 类型 Java 类型 映射表

 

 

Class Summary
AbstractBynaryType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
AbstractCharArrayType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
AbstractLobType 
AbstractLongBinaryType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
AbstractLongStringType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
AbstractTypeAbstract superclass of the built in Type hierarchy.
AdaptedImmutableTypeOptimize a mutable type, if the user promises not to mutable the instances.
AnyTypeHandles "any" mappings and the old deprecated "object" type
AnyType.ObjectTypeCacheEntry 
ArrayTypeA type for persistent arrays.
BagType 
BigDecimalType big_decimal: A type that maps an SQL NUMERIC to a java.math.BigDecimal
BigIntegerType big_integer: A type that maps an SQL NUMERIC to a java.math.BigInteger
BinaryType binary: A type that maps an SQL VARBINARY to a Java byte[].
BlobType blob: A type that maps an SQL BLOB to a java.sql.Blob.
BooleanType boolean: A type that maps an SQL BIT to a Java Boolean.
ByteArrayBlobType Deprecated. replaced by Hibernate Core's WrappedMaterializedBlobType
ByteType byte: A type that maps an SQL TINYINT to a Java Byte.
CalendarDateType calendar_date: A type mapping for a Calendar object that represents a date.
CalendarType calendar: A type mapping for a Calendar object that represents a datetime.
CharacterArrayClobTypeMap a Character[] to a Clob Experimental
CharacterArrayTypeBridge Character[] and VARCHAR
CharacterType character: A type that maps an SQL CHAR(1) to a Java Character.
CharArrayTypeput char[] into VARCHAR
CharBooleanType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
ClassType class: A type that maps an SQL VARCHAR to a Java Class.
ClobType clob: A type that maps an SQL CLOB to a java.sql.Clob.
CollectionTypeA type that handles Hibernate PersistentCollections (including arrays).
ComponentTypeHandles "component" mappings
CompositeCustomTypeAdapts CompositeUserType to Type interface
CurrencyType currency: A type that maps an SQL VARCHAR to a java.util.Currency
CustomCollectionTypeA custom type for mapping user-written classes that implement PersistentCollection
CustomTypeAdapts UserType to the generic Type interface, in order to isolate user code from changes in the internal Type contracts.
DateType date: A type that maps an SQL DATE to a Java Date.
DbTimestampType dbtimestamp: An extension of TimestampType which maps to the database's current timestamp, rather than the jvm's current timestamp.
DoubleType double: A type that maps an SQL DOUBLE to a Java Double.
EmbeddedComponentType 
EntityTypeBase for types which map associations to persistent entities.
EnumTypeEnum type mapper Try and find the appropriate SQL type depending on column metadata

TODO implements readobject/writeobject to recalculate the enumclasses

FloatType float: A type that maps an SQL FLOAT to a Java Float.
ForeignKeyDirectionRepresents directionality of the foreign key constraint
IdentifierBagType 
ImageType image: A type that maps an SQL LONGVARBINARY to Java byte[].
ImmutableType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
IntegerType integer: A type that maps an SQL INT to a Java Integer.
ListType 
LocaleType locale: A type that maps an SQL VARCHAR to a Java Locale.
LongType long: A type that maps an SQL BIGINT to a Java Long.
ManyToOneTypeA many-to-one association to an entity.
MapType 
MaterializedBlobType materialized_blob: A type that maps an SQL BLOB to Java byte[].
MaterializedClobType materialized_clob: A type that maps an SQL CLOB to a Java String.
MetaType 
MutableType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
NullableType Deprecated. see http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
NumericBooleanTypeMaps interger database values to boolean java values.
OneToOneTypeA one-to-one association to an entity
OrderedMapTypeA specialization of the map type, with (resultset-based) ordering.
OrderedSetTypeA specialization of the set type, with (resultset-based) ordering.
PrimitiveByteArrayBlobType Deprecated. replaced by Hibernate Core's MaterializedBlobType
PrimitiveCharacterArrayClobTypeMap a char[] to a Clob
PrimitiveTypeSuperclass of primitive / primitive wrapper types.
SerializableToBlobType 
SerializableType serializable: A type that maps an SQL VARBINARY to a serializable Java object.
SetType 
ShortType short: A type that maps an SQL SMALLINT to a Java Short.
SortedMapType 
SortedSetType 
SpecialOneToOneTypeA one-to-one association that maps to specific formula(s) instead of the primary key column of the owning entity.
StringClobType Deprecated. replaced by Hibernate Core's MaterializedClobType
StringType string: A type that maps an SQL VARCHAR to a Java String.
TextType text: A type that maps an SQL LONGVARCHAR to a Java String.
TimestampType timestamp: A type that maps an SQL TIMESTAMP to a Java java.util.Date or java.sql.Timestamp.
TimeType time: A type that maps an SQL TIME to a Java java.util.Date or java.sql.Time.
TimeZoneType timezone: A type that maps an SQL VARCHAR to a java.util.TimeZone
TrueFalseType true_false: A type that maps an SQL CHAR(1) to a Java Boolean.
TypeFactoryUsed internally to obtain instances of Type.
WrappedMaterializedBlobType materialized_blob: A type that maps an SQL BLOB to Java Byte[].
WrapperBinaryType 
YesNoType yes_no: A type that maps an SQL CHAR(1) to a Java Boolean.
 

 


资源下载链接为: https://pan.quark.cn/s/9648a1f24758 这个HTML文件是一个专门设计的网页,适合在告白或纪念日这样的特殊时刻送给女朋友,给她带来惊喜。它通过HTML技术,将普通文字转化为富有情感和创意的表达方式,让数字媒体也能传递深情。HTML(HyperText Markup Language)是构建网页的基础语言,通过标签描述网页结构和内容,让浏览器正确展示页面。在这个特效网页中,开发者可能使用了HTML5的新特性,比如音频、视频、Canvas画布或WebGL图形,来提升视觉效果和交互体验。 原本这个文件可能是基于ASP.NET技术构建的,其扩展名是“.aspx”。ASP.NET是微软开发的一个服务器端Web应用程序框架,支持多种编程语言(如C#或VB.NET)来编写动态网页。但为了在本地直接运行,不依赖服务器,开发者将其转换为纯静态的HTML格式,只需浏览器即可打开查看。 在使用这个HTML特效页时,建议使用Internet Explorer(IE)浏览器,因为一些老的或特定的网页特效可能只在IE上表现正常,尤其是那些依赖ActiveX控件或IE特有功能的页面。不过,由于IE逐渐被淘汰,现代网页可能不再对其进行优化,因此在其他现代浏览器上运行可能会出现问题。 压缩包内的文件“yangyisen0713-7561403-biaobai(html版本)_1598430618”是经过压缩的HTML文件,可能包含图片、CSS样式表和JavaScript脚本等资源。用户需要先解压,然后在浏览器中打开HTML文件,就能看到预设的告白或纪念日特效。 这个项目展示了HTML作为动态和互动内容载体的强大能力,也提醒我们,尽管技术在进步,但有时复古的方式(如使用IE浏览器)仍能唤起怀旧之情。在准备类似的个性化礼物时,掌握基本的HTML和网页制作技巧非常
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值