forest.java
来自「hibernate方便的操作数据库相当不错的 请各位下载看看啊」· Java 代码 · 共 66 行
JAVA
66 行
//$Id: Forest.java,v 1.3 2005/02/19 19:07:50 epbernard Exp $package org.hibernate.test.metadata.entity;import org.hibernate.annotations.OptimisticLockType;import org.hibernate.annotations.PolymorphismType;import org.hibernate.annotations.BatchSize;import org.hibernate.annotations.Type;import org.hibernate.annotations.Where;import javax.ejb.Entity;import javax.ejb.Id;import javax.ejb.GeneratorType;/** * Use hibernate specific annotations * @author Emmanuel Bernard */@Entity@BatchSize(size=5)@org.hibernate.annotations.Entity( selectBeforeUpdate = true, dynamicInsert = true, dynamicUpdate = true, optimisticLock = OptimisticLockType.ALL, polymorphism = PolymorphismType.EXPLICIT)@Where(clause="1=1")public class Forest { private Integer id; private String name; private long length; private String longDescription; @Type(type="text") public String getLongDescription() { return longDescription; } public void setLongDescription(String longDescription) { this.longDescription = longDescription; } public long getLength() { return length; } public void setLength(long length) { this.length = length; } @Id(generate = GeneratorType.AUTO) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?