一个xdoclet技术,注释的例子

package com.bjsxt.oa.model;

import java.util.Date;
import java.util.Map;
/**
*
* @author lucky
*@hibernate.class table="T_Document"
*/
public class Document {
public static final String STATUS_NEW = "新建";
public static final String STATUS_END = "完成";

/**
* @hibernate.id
* generator-class = "native";
*/
private int id;
/**
* @hibernate.property
*/
private String title;
/**
* @hibernate.property
*/
private String description;
/**
* @hibernate.property
* type="binary"
* length="9999999"
*/
private byte[] content;
/**
* 创建者
* @hibernate.many-to-one
*/
private User creator;
/**
* @hibernate.property
*/
private Date createTime;
/**
* 公文所走的流程
* @hibernate.many-to-one
*/
private Workflow workflow;
/**
* 流程实例的标识
* @hibernate.property
*/
private long processInstanceId;
/**
* @hibernate.property
*/
private String status;
/**
* 表单的动态属性,key:String , value: DocumentProperty
* @hibernate.map table="T_Document_Properties"
* @hibernate.key column="documentId"
* @hibernate.map-key type="string" column="propertyName"
* @hibernate.composite-element class="com.bjsxt.oa.model.DocumentProperty"
*/
private Map props;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public byte[] getContent() {
return content;
}
public void setContent(byte[] content) {
this.content = content;
}
public User getCreator() {
return creator;
}
public void setCreator(User creator) {
this.creator = creator;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Workflow getWorkflow() {
return workflow;
}
public void setWorkflow(Workflow workflow) {
this.workflow = workflow;
}
public long getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(long processInstanceId) {
this.processInstanceId = processInstanceId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public static String getSTATUS_NEW() {
return STATUS_NEW;
}
public static String getSTATUS_END() {
return STATUS_END;
}

}

你可能感兴趣的:(Hibernate,workflow)