|
|
@@ -59,11 +59,19 @@ public class MindBaseInfo extends SliceJpaObject {
|
|
|
private String id = createId();
|
|
|
|
|
|
public void onPersist() throws Exception {
|
|
|
- composeSequnces();
|
|
|
+ if( null == this.getCreateTime() ) {
|
|
|
+ this.setCreateTime( new Date() );
|
|
|
+ }
|
|
|
+ this.setSequence(StringUtils.join(DateTools.compact(this.getCreateTime()), this.getId()));
|
|
|
+ this.creator_sequence = StringUtils.join(this.creator, this.getSequence());
|
|
|
+ this.folder_sequence = StringUtils.join(this.getFolderId(), this.getSequence());
|
|
|
+ this.creatorUnit_sequence = StringUtils.join(this.getCreatorUnit(), this.getSequence());
|
|
|
+ this.shared_sequence = StringUtils.join(this.getShared().toString(), this.getSequence());
|
|
|
+ this.cooperative_sequence = StringUtils.join(this.getCooperative().toString(), this.getSequence());
|
|
|
}
|
|
|
|
|
|
- public void composeSequnces() throws Exception {
|
|
|
- if( this.getCreateTime() == null ) {
|
|
|
+ public void composeSequnces() {
|
|
|
+ if( null == this.getCreateTime() ) {
|
|
|
this.setCreateTime( new Date() );
|
|
|
}
|
|
|
this.setSequence(StringUtils.join(DateTools.compact(this.getCreateTime()), this.getId()));
|
|
|
@@ -73,7 +81,6 @@ public class MindBaseInfo extends SliceJpaObject {
|
|
|
this.shared_sequence = StringUtils.join(this.getShared().toString(), this.getSequence());
|
|
|
this.cooperative_sequence = StringUtils.join(this.getCooperative().toString(), this.getSequence());
|
|
|
}
|
|
|
-
|
|
|
/*
|
|
|
* =============================================================================
|
|
|
* ===== 以上为 JpaObject 默认字段
|
|
|
@@ -102,6 +109,12 @@ public class MindBaseInfo extends SliceJpaObject {
|
|
|
@Index(name = TABLE + IndexNameMiddle + folderId_FIELDNAME)
|
|
|
@CheckPersist(allowEmpty = false)
|
|
|
private String folderId = "";
|
|
|
+
|
|
|
+ public static final String icon_FIELDNAME = "icon";
|
|
|
+ @FieldDescribe("缩略图信息")
|
|
|
+ @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + icon_FIELDNAME)
|
|
|
+ @CheckPersist(allowEmpty = true)
|
|
|
+ private String icon = "";
|
|
|
|
|
|
public static final String description_FIELDNAME = "description";
|
|
|
@FieldDescribe("备注信息")
|
|
|
@@ -366,4 +379,14 @@ public class MindBaseInfo extends SliceJpaObject {
|
|
|
public void setCooperative_sequence(String cooperative_sequence) {
|
|
|
this.cooperative_sequence = cooperative_sequence;
|
|
|
}
|
|
|
+
|
|
|
+ public String getIcon() {
|
|
|
+ return icon;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setIcon(String icon) {
|
|
|
+ this.icon = icon;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|