primaryentity.java

来自「SSHMail Ajax方式提交,自动抓取页面内容,统计关键字个数.」· Java 代码 · 共 41 行

JAVA
41
字号
/**
 * @author SuperLeo
 * @date 2007-6-15
 * @version 1.0
 * �实体类的父类,抽象出ID部分
 */
package com.leo.po;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * @author SuperLeo
 */
@MappedSuperclass
// 用来声明这个是父类,子类可以继承属
public abstract class PrimaryEntity {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;

	/**
	 * @return 返回id
	 */
	public long getId() {
		return id;
	}

	/**
	 * @param id
	 *            设置id
	 */
	public void setId(long id) {
		this.id = id;
	}

}

⌨️ 快捷键说明

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