⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 types.java

📁 随书光盘:精通Sping 2.0 的随书源代码
💻 JAVA
字号:
package test.entityjpa;
// Generated 2006-10-29 13:14:57 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.OneToMany;
import javax.persistence.Table;

/**
 * Types generated by hbm2java
 */
@Entity
@Table(name="TYPES"
    , uniqueConstraints = {  }
)
public class Types  implements java.io.Serializable {

    // Fields    

     private int id;
     private String name;
     private Set<Pets> petses = new HashSet<Pets>(0);

     // Constructors

    /** default constructor */
    public Types() {
    }

	/** minimal constructor */
    public Types(int id) {
        this.id = id;
    }
    /** full constructor */
    public Types(int id, String name, Set<Pets> petses) {
       this.id = id;
       this.name = name;
       this.petses = petses;
    }
   
    // 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;
    }
    @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY, mappedBy="types")
    public Set<Pets> getPetses() {
        return this.petses;
    }
    
    public void setPetses(Set<Pets> petses) {
        this.petses = petses;
    }




}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -