specialties.java
来自「随书光盘:精通Sping 2.0 的随书源代码」· Java 代码 · 共 82 行
JAVA
82 行
package org.springframework.samples.jpaentity;
// Generated 2006-10-29 16:27:40 by Hibernate Tools 3.2.0.beta8
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
/**
* Specialties generated by hbm2java
*/
@Entity
@Table(name="SPECIALTIES"
, uniqueConstraints = { }
)
public class Specialties implements java.io.Serializable {
// Fields
private int id;
private String name;
private Set<Vets> vetses = new HashSet<Vets>(0);
// Constructors
/** default constructor */
public Specialties() {
}
/** minimal constructor */
public Specialties(int id) {
this.id = id;
}
/** full constructor */
public Specialties(int id, String name, Set<Vets> vetses) {
this.id = id;
this.name = name;
this.vetses = vetses;
}
// Property accessors
@Id
@Column(name="ID", unique=true, nullable=false, insertable=true, updatable=true)
public int getId() {
return this.id;
}
public void setId(int id) {
this.id = id;
}
@Column(name="NAME", unique=false, nullable=true, insertable=true, updatable=true, length=80)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@ManyToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY, mappedBy="specialtieses")
public Set<Vets> getVetses() {
return this.vetses;
}
public void setVetses(Set<Vets> vetses) {
this.vetses = vetses;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?