Data type | RapidClipse default mapping | Generated Java code Javacode (example) |
|
---|
MONEY Currency amount Range: -92233720368547758.08 to +92233720368547758.07 Storage: 8 bytes | Code Block |
---|
| <sql-type jdbc-type="NUMERIC" name="money" hibernate-type="java.math.BigDecimal" /> |
Code Block |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"MONEY"},new String[]{"java.math.BigDecimal"},"money")); |
| Code Block |
---|
| private BigDecimal moneyTest; |
Code Block |
---|
| @Column(name = "`MoneyTest`", scale = 0,
columnDefinition = "money")
public BigDecimal getMoneyTest() {
return this.moneyTest;
} |
|
|
BIGINT Large-range integer Range: -9223372036854775808 to 9223372036854775807 Storage: 8 bytes |
| Code Block |
---|
| private Long bigintTest; |
Code Block |
---|
| @Column(name = "`BigintTest`")
public Long getBigintTest() {
return this.bigintTest;
} |
|
|
BIGSERIAL Large autoincrementing integer 1 to 9223372036854775807 Storage: 8 bytes |
| Code Block |
---|
| private long bigserial; |
Code Block |
---|
| @Column(name = "`Bigserial`", nullable = false)
public long getBigserial() {
return this.bigserial;
} |
|
|
BOLEAN PostgreSQL provides the standard SQL type boolean. Boolean can have one of only two states: "true" or "false". A third state, "unknown", is represented by the SQL null value. |
| Code Block |
---|
| private Boolean booleanTest; |
Code Block |
---|
| @Column(name = "`BooleanTest`")
public Boolean getBooleanTest() {
return this.booleanTest;
} |
|
|
BYTEA A variable-length binary string. Storage: 1 or 4 bytes plus the actual binary string. |
| Code Block |
---|
language | java |
---|
theme | Confluence |
---|
| private byte[] byteaTest; |
Code Block |
---|
| @Column(name = "`ByteaTest`")
public byte[] getByteaTest() {
return this.byteaTest;
} |
|
|
CHARACTER Character string with fixed-length and blank padding. | Code Block |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"BPCHAR"},new String[]{"java.lang.String"},"bpchar")); |
| Code Block |
---|
| private String characterTest; |
Code Block |
---|
| @Column(name = "`CharacterTest`", length = 10,
columnDefinition = "bpchar")
public String getCharacterTest() {
return this.characterTest;
} |
|
|
CHARACTER VARYING Character string with variable-length with limit. |
| Code Block |
---|
| private String characterVaryingTest; |
Code Block |
---|
| @Column(name = "`Character_varyingTest`")
public String getCharacterVaryingTest() {
return this.characterVaryingTest;
}
|
|
|
DATE Storage: 4 bytes Range: 4713 BC - 5874897 AD Resolution: 1 day |
| Code Block |
---|
| private Date dateTest; |
Code Block |
---|
| @Temporal(TemporalType.DATE)
@Column(name = "`DateTest`", length = 13)
public Date getDateTest() {
return this.dateTest;
} |
|
|
DOUBLE PRECISION A user-specified precision, exact number Range: 15 decimal digits precision Storage: 8 bytes |
| Code Block |
---|
| private Double doublePrecisionTest; |
Code Block |
---|
| @Column(name = "`Double_precisionTest`", precision = 17,
scale = 17)
public Double getDoublePrecisionTest() {
return this.doublePrecisionTest;
} |
|
|
INTEGER A normal integer Range: -2147483648 to +2147483647 Storage: 4 bytes |
| Code Block |
---|
| private Integer integerTest; |
Code Block |
---|
| @Column(name = "`IntegerTest`")
public Integer getIntegerTest() {
return this.integerTest;
} |
|
|
NUMERIC A user-specified precision, exact number Range: no limit Storage: variable |
| Code Block |
---|
| private BigDecimal numericTest; |
Code Block |
---|
| @Column(name = "`NumericTest`", precision = 131089,
scale = 0)
public BigDecimal getNumericTest() {
return this.numericTest;
} |
|
|
REAL A user-specified precision, exact number Range: 6 decimal digits precision Storage: 4 bytes | - - | Code Block |
---|
| private Float realTest; |
Code Block |
---|
| @Column(name = "`RealTest`", precision = 8,
scale = 8)
public Float getRealTest() {
return this.realTest;
} |
|
|
SERIAL Autoincrementing integer Range: 1 to 2147483647 Storage: 4 bytes | Code Block |
---|
| visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
new String[]{"SERIAL"},new String[]{"java.lang.Integer","int"},"int2")); |
| Code Block |
---|
| private int serialTest; |
Code Block |
---|
| @Column(name = "`SerialTest`", nullable = false)
public int getSerialTest() {
return this.serialTest;
} |
|
|
SMALLINT Small-range integer Range: -32768 to +32767 Storage: 2 bytes |
| Code Block |
---|
| private Short smallintTest; |
Code Block |
---|
| @Column(name = "`SmallintTest`")
public Short getSmallintTest() {
return this.smallintTest;
} |
|
|
TEXT Character string with variable unlimited length. |
| Code Block |
---|
| private BigDecimal moneyTest; |
Code Block |
---|
| @Column(name = "`TextTest`")
public String getTextTest() {
return this.textTest;
} |
|
|
TIME WITH TIME ZONE Time of day with time zone. Storage: 12 bytes Range: 00:00:00+1459 - 24:00:00-1459 Resolution: 1 microsecond / 14 digits |
| Code Block |
---|
| private Date timeWithTimeZoneTest; |
Code Block |
---|
| @Temporal(TemporalType.TIME)
@Column(name = "`Time_with_time_zoneTest`", length = 21)
public Date getTimeWithTimeZoneTest() {
return this.timeWithTimeZoneTest;
} |
|
|
TIME WITH TIME ZONE
Time of day without time zone. Storage: 8 bytes Range: 00:00:00 - 24:00:00 Resolution: 1 microsecond / 14 digits |
| Code Block |
---|
| private Date timeWithoutTimeZoneTest; |
Code Block |
---|
| @Temporal(TemporalType.TIME)
@Column(name = "`Time_without_time_zoneTest`", length = 15)
public Date getTimeWithoutTimeZoneTest() {
return this.timeWithoutTimeZoneTest;
} |
|
|
TIMESTAMP WITH TIME ZONE
Date and time with time zone. Storage: 8 bytes Range: 4713 BC - 294276 AD Resolution: 1 microsecond / 14 digits |
| Code Block |
---|
| private Date timestampWithTimeZoneTest; |
Code Block |
---|
| @Temporal(TemporalType.TIMESTAMP)
@Column(name = "`Timestamp_with_time_zoneTest`", length = 35)
public Date getTimestampWithTimeZoneTest() {
return this.timestampWithTimeZoneTest;
} |
|
|
TIMESTAMP WITHOUT TIME ZONE
Date and time without time zone. Storage: 8 bytes Range: 4713 BC - 294276 AD Resolution: 1 microsecond / 14 digits |
| Code Block |
---|
| private Date timestampWithoutTimeZoneTest; |
Code Block |
---|
| @Temporal(TemporalType.TIMESTAMP)
@Column(name = "`Timestamp_without_time_zoneTest`", length = 29)
public Date getTimestampWithoutTimeZoneTest() {
return this.timestampWithoutTimeZoneTest;
} |
|
|