comment.java
来自「hibernate-3.0.5 中文文档」· Java 代码 · 共 50 行
JAVA
50 行
//$Id: Comment.java,v 1.1 2005/05/16 12:08:03 oneovthafew Exp $
package org.hibernate.test.joinfetch;
import java.util.Calendar;
/**
* @author Gavin King
*/
public class Comment {
private String text;
private Item item;
private Calendar timestamp;
private Long id;
public Item getItem() {
return item;
}
public void setItem(Item item) {
this.item = item;
}
public Calendar getTimestamp() {
return timestamp;
}
public void setTimestamp(Calendar timestamp) {
this.timestamp = timestamp;
}
Comment() {}
public Comment(Item item, String comment) {
this.text = comment;
this.item = item;
item.getComments().add(this);
this.timestamp = Calendar.getInstance();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?