第二个文件Catjava
package hb;
public class Cat {
private String id;
private String name;
public Cat() {
}
public String getId() {
return id;
}
public void setId(String id) {
thisid = id;
}
public String getName() {
return name;
}
public void setName(String name) {
thisname = name;
}
public String toString() {
String strCat = new StringBuffer()
append(thisgetId())append( )
append(thisgetName())append( )
toString();
return strCat;
}
}
第三个文件Cathbmxml
<?xml version= ?>
<!DOCTYPE hibernatemapping (View Source for full doctype)>
<hibernatemapping defaultcascade=none defaultaccess=property autoimport=true]
<class name=hbCat table=cat mutable=true polymorphism=implicit dynamicupdate=false dynamicinsert=false batchsize= selectbeforeupdate=false optimisticlock=version]
<id name=id type=javalangString unsavedvalue=null]
<column name=CAT_ID sqltype=varchar() notnull=true]
<generator class=uuidhex]
</id>
<property name=name notnull=false unique=false update=true insert=true]
<column name=NAME sqltype=varchar() notnull=true]
</property>
</class>
</hibernatemapping>
[] [] [] []