Datentyp | RapidClipse Standard Mapping | Generierter Javacode |
---|
CHARACTER(n) Character. Fixed-length character strings with a length of n bytes. n must be greater than 0 and not greater than 255. The default length is 1. | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"CHARACTER"},new String[]{"java.lang.String"},"CHARACTER")); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private String charactertest;
@Column(name = "CHARACTERTEST", nullable = false, length = 10, columnDefinition = "CHARACTER")
public String getCharactertest() {
return this.charactertest;
} |
|
LONG VARCHAR Long Varchar. Specifies a varying-length column for character string data. The maximum length of a column of this type is 32700 characters. | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"LONG VARCHAR"},new String[]{"java.lang.String"},"LONG VARCHAR")); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private String longvarchartest;
@Column(name = "LONGVARCHARTEST", nullable = false, length = 32700, columnDefinition = "LONG VARCHAR")
public String getLongvarchartest() {
return this.longvarchartest;
} |
|
REAL Real. A single-precision floating-point number is a short floating-point number of 32 bits. The range of single-precision floating-point numbers is approximately -7.2E+75 to 7.2E+75. In this range, the largest negative value is about -5.4E-79, and the smallest positive value is about 5.4E-079. | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"REAL"},new String[]{"java.lang.Float","float"},"REAL")); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private float realtest;
@Column(name = "REALTEST", nullable = false, precision = 24, scale = 0, columnDefinition = "REAL")
public float getRealtest() {
return this.realtest;
} |
|
INTEGER Large integers. A large integer is binary integer with a precision of 31 bits. The range is -2147483648 to +2147483647. | Hibernate Standard Mapping | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| pivate int inttest;
@Column(name = "INTTEST", unique = true, nullable = false)
public int getInttest() {
return this.inttest;
} |
|
BIGINT Big integers. A big integer is a binary integer with a precision of 63 bits. The range of big integers is -9223372036854775808 to +9223372036854775807. | Hibernate Standard Mapping | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| pivate int inttest;
@Column(name = "INTTEST", unique = true, nullable = false)
public int getInttest() {
return this.inttest;
} |
|
BLOB BLOB. Data type to store large amounts of noncharacter data, such as pictures, voice, and mixed media. | Code Block |
---|
language | xml |
---|
theme | Confluence |
---|
| <sql-type jdbc-type="BLOB" hibernate-type="byte[]"></sql-type> |
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(
new PropertyColumnDefinitionFix(new String[]{"BLOB"},new String[]{"byte[]"},"blob")
.addLobAnnotation()); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private byte[] blobtest;
@Lob
@Column(name = "BLOBTEST", columnDefinition = "blob")
public byte[] getBlobtest() {
return this.blobtest;
} |
|
CLOB Data type to store SBCS or mixed data, such as documents that contain single character set. Use this data type if your data is larger (or might grow larger) than the VARCHAR data type permits. | Code Block |
---|
language | xml |
---|
theme | Confluence |
---|
| <sql-type jdbc-type="CLOB" hibernate-type="java.lang.String"></sql-type> |
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(new String[]{"CLOB"},new String[]
{"java.lang.String"},"clob").addLobAnnotation()); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private String clobtest;
@Lob
@Column(name = "CLOBTEST", nullable = false, columnDefinition = "clob")
public String getClobtest() {
return this.clobtest;
} |
|
DATE DATE. A date is a three-part value representing a year, month, and day in the range of 0001-01-01 to 9999-12-31. | Hibernate Standard Mapping | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private Date datetest;
@Temporal(TemporalType.DATE)
@Column(name = "DATETEST", nullable = false, length = 10)
public Date getDatetest() {
return this.datetest;
} |
|
DECIMAL DECIMAL. A decimal number is a packed decimal number with an implicit decimal point. The position of the decimal point is determined by the precision and the scale of the number. The scale, which is the number of digits in the fractional part of the number, cannot be negative or greater than the precision. The maximum precision is 31 digits. All values of a decimal column have the same precision and scale. The range of a decimal variable or the numbers in a decimal column is -n to +n, where n is the largest positive number that can be represented with the applicable precision and scale. The maximum range is 1 - 10³¹ to 10³¹ - 1. | Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"DECIMAL"},new String[]{"java.math.BigDecimal"},"decimal")); |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private BigDecimal decimaltest;
@Column(name = "DECIMALTEST", nullable = false, precision = 6, columnDefinition = "decimal")
public BigDecimal getDecimaltest() {
return this.decimaltest;
} |
Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private double decimaltest;
@Column(name = "DECIMALTEST", nullable = false, precision = 6, columnDefinition = "decimal")
public double getDecimaltest() {
return this.decimaltest;
} |
|