Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Data typeRapidClipse default mappingGenerated Java code Javacode (example)

MONEY

Currency amount

Range: -92233720368547758.08

to +92233720368547758.07

Storage: 8 bytes

Code Block
languagexml
<sql-type jdbc-type="NUMERIC" name="money" hibernate-type="java.math.BigDecimal" />
Code Block
languagejava
visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
	new String[]{"MONEY"},new String[]{"java.math.BigDecimal"},"money"));
Code Block
languagejava
private BigDecimal moneyTest;
Code Block
languagejava
@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
languagejava
private Long bigintTest;
Code Block
languagejava
@Column(name = "`BigintTest`")
public Long getBigintTest() {
	return this.bigintTest;
}

BIGSERIAL

Large autoincrementing integer

1 to 9223372036854775807

 Storage: 8 bytes


Code Block
languagejava
private long bigserial;
Code Block
languagejava
@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
languagejava
private Boolean booleanTest;
Code Block
languagejava
@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
languagejava
themeConfluence
private byte[] byteaTest;
Code Block
languagejava
@Column(name = "`ByteaTest`")
public byte[] getByteaTest() {
	return this.byteaTest;
}

CHARACTER

Character string with fixed-length

and blank padding.

Code Block
languagejava
visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
	new String[]{"BPCHAR"},new String[]{"java.lang.String"},"bpchar"));
Code Block
languagejava
private String characterTest;
Code Block
languagejava
@Column(name = "`CharacterTest`", length = 10, 
			columnDefinition = "bpchar")
public String getCharacterTest() {
	return this.characterTest;
}

CHARACTER VARYING

Character string with variable-length with

 limit.


Code Block
languagejava
private String characterVaryingTest;
Code Block
languagejava
@Column(name = "`Character_varyingTest`")
public String getCharacterVaryingTest() {
	return this.characterVaryingTest;
}

DATE

Storage: 4 bytes

Range: 4713 BC - 5874897 AD

Resolution: 1 day


Code Block
languagejava
private Date dateTest;
Code Block
languagejava
@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
languagejava
private Double doublePrecisionTest;
Code Block
languagejava
@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
languagejava
private Integer integerTest;
Code Block
languagejava
@Column(name = "`IntegerTest`")
public Integer getIntegerTest() {
	return this.integerTest;
}

NUMERIC

A user-specified precision, exact number

Range: no limit

Storage: variable


Code Block
languagejava
private BigDecimal numericTest;
Code Block
languagejava
@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
languagejava
private Float realTest;
Code Block
languagejava
@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
languagejava
visitor.addPropertyColumnDefinitionFix(new PropertyColumnDefinitionFix(
	new String[]{"SERIAL"},new String[]{"java.lang.Integer","int"},"int2"));
Code Block
languagejava
private int serialTest;
Code Block
languagejava
@Column(name = "`SerialTest`", nullable = false)
public int getSerialTest() {
	return this.serialTest;
}

SMALLINT

Small-range integer

Range: -32768 to +32767

Storage: 2 bytes


Code Block
languagejava
private Short smallintTest;
Code Block
languagejava
@Column(name = "`SmallintTest`")
public Short getSmallintTest() {
	return this.smallintTest;
}

TEXT

Character string with variable

unlimited length.


Code Block
languagejava
private BigDecimal moneyTest;
Code Block
languagejava
@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
languagejava
private Date timeWithTimeZoneTest;
Code Block
languagejava
@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
languagejava
private Date timeWithoutTimeZoneTest;
Code Block
languagejava
@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
languagejava
private Date timestampWithTimeZoneTest;
Code Block
languagejava
@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
languagejava
private Date timestampWithoutTimeZoneTest;
Code Block
languagejava
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "`Timestamp_without_time_zoneTest`", length = 29)
public Date getTimestampWithoutTimeZoneTest() {
	return this.timestampWithoutTimeZoneTest;
}