Hibernate version: 3.0.3, hibernate tools 3.0 alpha 1
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="de.volkswagen.ums.data.impl.SequenceData" table="ums_sequence">
<meta attribute="implements">de.volkswagen.ums.data.impl.IBaseDataObject</meta>
<meta attribute="implement-equals">true</meta>
<id name="oid" column="oid" type="string" unsaved-value="null">
<generator class="assigned"/>
</id>
<version name="version" column="version" type="int"/>
<property name="name" column="name" type="string" length="32" not-null="true"/>
<property name="valFrom" column="val_from" type="big_integer" not-null="true"/>
<property name="valTo" column="val_to" type="big_integer" length="15" not-null="true"/>
<property name="valNext" column="val_next" type="big_integer" length="15" not-null="true"/>
</class>
The Java code generated from this mapping (listed below) maps
the big_integer attributes to big_integer instead of java.math.BigInteger.
Mapping big_decimal to java.math.BigDecimal works as documented.
P.S. I just noticed that no equals() method is generated. I haven't checked
the documentation on this yet to see whether the mapping document
must be changed for this.
---------------------------------
package de.volkswagen.ums.data.impl;
/**
* de.volkswagen.ums.data.impl.SequenceData generated by hbm2java
*/
public class SequenceData implements de.volkswagen.ums.data.impl.IBaseDataObject,java.io.Serializable {
// Fields
private java.lang.String oid;
private java.lang.Integer version;
private java.lang.String name;
private big_integer valFrom;
private big_integer valTo;
private big_integer valNext;
// Constructors
/** default constructor */
public SequenceData() {
}
/** constructor with id */
public SequenceData(java.lang.String oid) {
this.oid = oid;
}
// Property accessors
/**
*/
public java.lang.String getOid () {
return this.oid;
}
public void setOid (java.lang.String oid) {
this.oid = oid;
}
/**
*/
public java.lang.Integer getVersion () {
return this.version;
}
public void setVersion (java.lang.Integer version) {
this.version = version;
}
/**
*/
public java.lang.String getName () {
return this.name;
}
public void setName (java.lang.String name) {
this.name = name;
}
/**
*/
public big_integer getValFrom () {
return this.valFrom;
}
public void setValFrom (big_integer valFrom) {
this.valFrom = valFrom;
}
/**
*/
public big_integer getValTo () {
return this.valTo;
}
public void setValTo (big_integer valTo) {
this.valTo = valTo;
}
/**
*/
public big_integer getValNext () {
return this.valNext;
}
public void setValNext (big_integer valNext) {
this.valNext = valNext;
}
}
|