Hibernate (5) Basic data types and hibernate Data Types

Source: Internet
Author: User

Hibernate (5) Basic data types and hibernate Data Types
I. Basic data types of Hibernate

Relationship between the three data types

Hibernate ing type

Java type

Standard SQL type

Integer

Java. lang. Integer

INTEGER

Long

Java. lang. Long

BIGINT

Short

Java. lang. Short

SMALLINT

Float

Java. lang. Float

FLOAT

Double

Java. lang. Double

DOUBLE

Big_decimal

Java. math. BigDecimal

NUMERIC

Character

Java. lang. String

CHAR (1)

String

Java. lang. String

VARCHAR

Byte

Byte or java. lang. Byte

TINYINT

Boolean

Boolean or java. lang. Boolean

BIT

 

Hibernate ing type

Java type

Standard SQL type

Yes_no

Boolean or java. lang. Boolean

CHAR (1) ('y' or 'N ')

True_false

Boolean or java. lang. Boolean

CHAR (1) ('y' or 'N ')

Date

Java. util. Date or java. SQL. Date

DATE

Time

Java. util. Date or java. SQL. Time

TIME

Timestamp

Java. util. Date or java. SQL. Timestamp

TIMESTAMP

Calendar

Java. util. Calendar

TIMESTAMP

Calendar_date

Java. util. Calendar

DATE

Binary

Byte []

VARBINARY or BLOB

Text

Java. lang. String

CLOB

Serializable

Java. io. Serializable instance

VARBINARY or BLOB

Clob

Java. SQL. Clob

CLOB

Blob

Java. SQL. Blob

BLOB

Class

Java. lang. Class

VARCHAR

Locale

Java. util. Locale

VARCHAR

Timezone

Java. util. TimeZone

VARCHAR

Currency

Java. util. Currency

VARCHAR

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.