uuidsupport.java
来自「spring+acegi编写的网上书城」· Java 代码 · 共 27 行
JAVA
27 行
package net.livebookstore.domain;
import javax.persistence.*;
import org.compass.annotations.SearchableId;
import org.hibernate.annotations.GenericGenerator;
/**
* UUID primary key.
*
* @author Liao Xuefeng
*/
@MappedSuperclass
public abstract class UUIDSupport {
protected String id;
@SearchableId
@Id
@Column(nullable=false, updatable=false, length=32)
@GeneratedValue(generator="system-uuid")
@GenericGenerator(name="system-uuid", strategy="uuid")
public String getId() { return id; }
public void setId(String id) { this.id = id; }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?