Hibernate中使用Criteria查询及注解——(Dept.java)
生活随笔
收集整理的這篇文章主要介紹了
Hibernate中使用Criteria查询及注解——(Dept.java)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
Dept.java:
???? 部門表的實體類:
package cn.bdqn.hibernate_Criteria.entity;import java.util.HashSet; import java.util.Set;/*** 部門表的實體類* @author 1111**/ 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() {}/** minimal constructor */public Dept(Integer deptno) {this.deptno = deptno;}/** full constructor */public Dept(Integer deptno, String dname, String loc, Set emps) {this.deptno = deptno;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;}}
總結
以上是生活随笔為你收集整理的Hibernate中使用Criteria查询及注解——(Dept.java)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HostWinds vs HostGat
- 下一篇: 绝地求生配置要求高?