提交 797c7997 编写于 作者: O o2null

Merge branch 'fix/#335' into 'wrdp'

part two

See merge request o2oa/o2oa!1494

(cherry picked from commit d2f9ce8682b56ad23ec0ac88e92f74582ccf580c)

a57fb1c6 part two
上级 1685a927
package com.x.processplatform.core.entity.element;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.persistence.Basic;
......@@ -11,12 +12,10 @@ import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Lob;
import javax.persistence.OrderColumn;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import org.apache.commons.lang3.StringUtils;
import org.apache.openjpa.persistence.jdbc.Index;
import com.x.base.core.entity.AbstractPersistenceProperties;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.SliceJpaObject;
......@@ -32,6 +31,13 @@ import com.x.base.core.entity.annotation.RestrictFlag;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.openjpa.persistence.PersistentCollection;
import org.apache.openjpa.persistence.jdbc.ContainerTable;
import org.apache.openjpa.persistence.jdbc.ElementColumn;
import org.apache.openjpa.persistence.jdbc.ElementIndex;
import org.apache.openjpa.persistence.jdbc.Index;
@Entity
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.element, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.Form.table, uniqueConstraints = {
......@@ -200,6 +206,29 @@ public class Form extends SliceJpaObject {
@Column(name = ColumnNamePrefix + hasMobile_FIELDNAME)
private Boolean hasMobile;
public static final String relatedFormList_FIELDNAME = "relatedFormList";
@FieldDescribe("related form.")
@PersistentCollection(fetch = FetchType.EAGER)
@ContainerTable(name = TABLE + ContainerTableNameMiddle + relatedFormList_FIELDNAME, joinIndex = @Index(name = TABLE
+ IndexNameMiddle + relatedFormList_FIELDNAME + JoinIndexNameSuffix))
@OrderColumn(name = ORDERCOLUMNCOLUMN)
@ElementColumn(length = length_255B, name = ColumnNamePrefix + relatedFormList_FIELDNAME)
@ElementIndex(name = TABLE + IndexNameMiddle + relatedFormList_FIELDNAME + ElementIndexNameSuffix)
@CheckPersist(allowEmpty = true)
private List<String> relatedFormList;
public static final String relatedScriptList_FIELDNAME = "relatedScriptList";
@FieldDescribe("related form.")
@PersistentCollection(fetch = FetchType.EAGER)
@ContainerTable(name = TABLE + ContainerTableNameMiddle
+ relatedScriptList_FIELDNAME, joinIndex = @Index(name = TABLE + IndexNameMiddle
+ relatedScriptList_FIELDNAME + JoinIndexNameSuffix))
@OrderColumn(name = ORDERCOLUMNCOLUMN)
@ElementColumn(length = length_255B, name = ColumnNamePrefix + relatedScriptList_FIELDNAME)
@ElementIndex(name = TABLE + IndexNameMiddle + relatedScriptList_FIELDNAME + ElementIndexNameSuffix)
@CheckPersist(allowEmpty = true)
private List<String> relatedScriptList;
public void setCategory(String category) {
this.category = category;
}
......@@ -284,4 +313,20 @@ public class Form extends SliceJpaObject {
this.hasMobile = hasMobile;
}
public List<String> getRelatedFormList() {
return relatedFormList;
}
public void setRelatedFormList(List<String> relatedFormList) {
this.relatedFormList = relatedFormList;
}
public List<String> getRelatedScriptList() {
return relatedScriptList;
}
public void setRelatedScriptList(List<String> relatedScriptList) {
this.relatedScriptList = relatedScriptList;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册