📄 visits.java
字号:
package org.springframework.samples.annotations;
// Generated 2006-10-27 18:36:22 by Hibernate Tools 3.2.0.beta8
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* Visits generated by hbm2java
*/
@Entity
@Table(name="VISITS"
, uniqueConstraints = { }
)
public class Visits implements java.io.Serializable {
// Fields
private int id;
private Pets pets;
private Date visitDate;
private String description;
// Constructors
/** default constructor */
public Visits() {
}
/** minimal constructor */
public Visits(int id, Pets pets) {
this.id = id;
this.pets = pets;
}
/** full constructor */
public Visits(int id, Pets pets, Date visitDate, String description) {
this.id = id;
this.pets = pets;
this.visitDate = visitDate;
this.description = description;
}
// 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;
}
@ManyToOne(cascade={},
fetch=FetchType.LAZY)
@JoinColumn(name="PET_ID", unique=false, nullable=false, insertable=true, updatable=true)
public Pets getPets() {
return this.pets;
}
public void setPets(Pets pets) {
this.pets = pets;
}
@Temporal(TemporalType.DATE)
@Column(name="VISIT_DATE", unique=false, nullable=true, insertable=true, updatable=true, length=0)
public Date getVisitDate() {
return this.visitDate;
}
public void setVisitDate(Date visitDate) {
this.visitDate = visitDate;
}
@Column(name="DESCRIPTION", unique=false, nullable=true, insertable=true, updatable=true)
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -