📄 uuidsupport.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -