📄 eventwithalongname.java
字号:
package com.manning.hq.ch09;
import java.io.Serializable;
import java.util.Date;
/**
* A persistant Hibernate object.
*
* @author Patrick Peak
* @author Nick Heudecker
*
* @hibernate.class table="events_with_long_names"
*/
public class EventWithALongName implements Serializable {
private Long id;
private int duration;
private String name;
private Date startDate;
private Location location;
/**
* @hibernate.id generator-class="native" column="uid"
* @return
*/
public Long getId() { return id; }
public void setId(Long id) { this.id = id; }
/**
* @hibernate.property
* @hibernate.column name="name" sql-type="TEXT"
* @return
*/
public String getName() { return name; }
public void setName(String name) { this.name = name; }
/**
* @hibernate.property column="start_date"
* @return
*/
public Date getStartDate() { return startDate; }
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
/**
* @hibernate.property column="duration"
* @return
*/
public int getDuration() { return duration; }
public void setDuration(int duration) {
this.duration = duration;
}
/**
* @hibernate.many-to-one column="location_id" cascade="save-update"
* @return
*/
public Location getLocation() { return location; }
public void setLocation(Location location) {
this.location = location;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -