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

📄 owners.java

📁 随书光盘:精通Sping 2.0 的随书源代码
💻 JAVA
字号:
package org.springframework.samples.annotations;
// Generated 2006-10-27 18:36:22 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;

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

    // Fields    

     private int id;
     private String firstName;
     private String lastName;
     private String address;
     private String city;
     private String telephone;
     private Set<Pets> petses = new HashSet<Pets>(0);

     // Constructors

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

	/** minimal constructor */
    public Owners(int id) {
        this.id = id;
    }
    /** full constructor */
    public Owners(int id, String firstName, String lastName, String address, String city, String telephone, Set<Pets> petses) {
       this.id = id;
       this.firstName = firstName;
       this.lastName = lastName;
       this.address = address;
       this.city = city;
       this.telephone = telephone;
       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="FIRST_NAME", unique=false, nullable=true, insertable=true, updatable=true, length=30)
    public String getFirstName() {
        return this.firstName;
    }
    
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }
    
    @Column(name="LAST_NAME", unique=false, nullable=true, insertable=true, updatable=true, length=30)
    public String getLastName() {
        return this.lastName;
    }
    
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
    
    @Column(name="ADDRESS", unique=false, nullable=true, insertable=true, updatable=true)
    public String getAddress() {
        return this.address;
    }
    
    public void setAddress(String address) {
        this.address = address;
    }
    
    @Column(name="CITY", unique=false, nullable=true, insertable=true, updatable=true, length=80)
    public String getCity() {
        return this.city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }
    
    @Column(name="TELEPHONE", unique=false, nullable=true, insertable=true, updatable=true, length=20)
    public String getTelephone() {
        return this.telephone;
    }
    
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }
    @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.LAZY, mappedBy="owners")
    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 + -