note.java

来自「Hibernate基础教程一书源码.Hibernate是一个持久层开源框架」· Java 代码 · 共 44 行

JAVA
44
字号
package com.hibernatebook.tools;


import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;


@Entity
public class Note {
	
	private String note;
	private Integer id;
	
	protected Note() {
	}
	
	Note(String note) {
		this.note = note;
	}

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public String getNote() {
		return note;
	}

	protected void setId(Integer id) {
		this.id = id;
	}

	protected void setNote(String note) {
		this.note = note;
	}
	
	public String toString() {
		return "Note: " + this.note;
	}
}

⌨️ 快捷键说明

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