struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
生活随笔
收集整理的這篇文章主要介紹了
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
??? 現(xiàn)在請(qǐng)大家看看Dept的實(shí)體類和對(duì)應(yīng)的映射信息:
Dept實(shí)體類
package org.entity;import java.util.HashSet; import java.util.Set;/*** Dept entity. @author MyEclipse Persistence Tools*/public class Dept implements java.io.Serializable {// Fieldsprivate Integer deptno;private String dname;private String loc;private Set emps = new HashSet(0);// Constructors/** default constructor */public Dept() {}/** full constructor */public Dept(String dname, String loc, Set emps) {this.dname = dname;this.loc = loc;this.emps = emps;}// Property accessorspublic Integer getDeptno() {return this.deptno;}public void setDeptno(Integer deptno) {this.deptno = deptno;}public String getDname() {return this.dname;}public void setDname(String dname) {this.dname = dname;}public String getLoc() {return this.loc;}public void setLoc(String loc) {this.loc = loc;}public Set getEmps() {return this.emps;}public void setEmps(Set emps) {this.emps = emps;}}
對(duì)應(yīng)的是Dept.hbm信息
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Mapping file autogenerated by MyEclipse Persistence Tools --> <hibernate-mapping><class name="org.entity.Dept" table="DEPT" schema="PRO"><id name="deptno" type="java.lang.Integer"><column name="DEPTNO" precision="6" scale="0" /><generator class="native" /></id><property name="dname" type="java.lang.String"><column name="DNAME" length="14" /></property><property name="loc" type="java.lang.String"><column name="LOC" length="13" /></property><set name="emps" inverse="true"><key><column name="DEPTNO" precision="6" scale="0" /></key><one-to-many class="org.entity.Emp" /></set></class> </hibernate-mapping>
總結(jié)
以上是生活随笔為你收集整理的struts+hibernate+oracle+easyui实现lazyout组件的简单案例——Dept实体类和对应的配置信息的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 手机怎么量尺寸 手机如何量尺寸
- 下一篇: struts+hibernate+ora