提交 66a1f6a5 编写于 作者: O o2null

Merge branch 'cherry-pick-71f230c2' into 'release'

Merge branch 'fix/dumpSize' into 'develop'

See merge request o2oa/o2oa!1652
......@@ -12,5 +12,6 @@
"###mode": "导出数据模式,lite|full,默认使用lite###",
"###parallel": "使用并行导出,默认true###",
"###redistribute": "是否进行重新分布.###",
"###exceptionInvalidStorage": "无法获取storage是否升起错误.###"
"###exceptionInvalidStorage": "无法获取storage是否升起错误.###",
"###restoreOverride": "数据导入方式,clean:清空重新导入,skipExisted:如果有相同id的数据跳过.默认方式为clean.###"
}
\ No newline at end of file
......@@ -113,7 +113,7 @@ public abstract class StorageObject extends SliceJpaObject {
public Long saveContent(StorageMapping mapping, InputStream input, String name) throws Exception {
this.setName(name);
this.setDeepPath(mapping.getDeepPath());
this.setExtension(StringUtils.lowerCase(FilenameUtils.getExtension(name)));
this.setExtension(StringUtils.lowerCase(StringUtils.substringAfterLast(name, ".")));
return this.updateContent(mapping, input);
}
......@@ -325,38 +325,38 @@ public abstract class StorageObject extends SliceJpaObject {
throw new Exception("storage protocol is null.");
}
switch (mapping.getProtocol()) {
// bzip2,file, ftp, ftps, gzip, hdfs, http, https, jar, ram, res, sftp,
// tar, temp, webdav, zip, cifs, mime;
case ftp:
// ftp://[ username[: password]@] hostname[: port][ relative-path]
prefix = "ftp://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case ftps:
// ftps://[ username[: password]@] hostname[: port][ relative-path]
prefix = "ftps://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case cifs:
// smb://[ username[: password]@] hostname[: port][ absolute-path]
prefix = "smb://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case webdav:
// webdav://[ username[: password]@] hostname[: port][ absolute-path]
prefix = "webdav://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case file:
// [file://] absolute-path
prefix = "file://";
break;
default:
break;
// bzip2,file, ftp, ftps, gzip, hdfs, http, https, jar, ram, res, sftp,
// tar, temp, webdav, zip, cifs, mime;
case ftp:
// ftp://[ username[: password]@] hostname[: port][ relative-path]
prefix = "ftp://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case ftps:
// ftps://[ username[: password]@] hostname[: port][ relative-path]
prefix = "ftps://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case cifs:
// smb://[ username[: password]@] hostname[: port][ absolute-path]
prefix = "smb://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case webdav:
// webdav://[ username[: password]@] hostname[: port][ absolute-path]
prefix = "webdav://" + URLEncoder.encode(mapping.getUsername(), DefaultCharset.name) + ":"
+ URLEncoder.encode(mapping.getPassword(), DefaultCharset.name) + "@" + mapping.getHost() + ":"
+ mapping.getPort();
break;
case file:
// [file://] absolute-path
prefix = "file://";
break;
default:
break;
}
return prefix + (StringUtils.isEmpty(mapping.getPrefix()) ? "" : ("/" + mapping.getPrefix()));
}
......@@ -367,60 +367,60 @@ public abstract class StorageObject extends SliceJpaObject {
throw new Exception("storage protocol is null.");
}
switch (mapping.getProtocol()) {
// bzip2,file, ftp, ftps, gzip, hdfs, http, https, jar, ram, res, sftp,
// tar, temp, webdav, zip, cifs, mime;
case ftp:
FtpFileSystemConfigBuilder ftpBuilder = FtpFileSystemConfigBuilder.getInstance();
/*
* 如果使用被动模式在阿里云centos7下会经常性出现无法连接 Caused by: java.net.ConnectException:
* Connection timed out (Connection timed out) at
* java.net.PlainSocketImpl.socketConnect(Native Method) at
* java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
* at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.
* java:206) at
* java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at
* java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at
* java.net.Socket.connect(Socket.java:589)
*/
ftpBuilder.setPassiveMode(opts, Config.vfs().getFtp().getPassive());
// builder.setPassiveMode(opts, false);
// builder.setPassiveMode(opts, true);
/** 强制不校验IP */
ftpBuilder.setRemoteVerification(opts, false);
// FtpFileType.BINARY is the default
ftpBuilder.setFileType(opts, FtpFileType.BINARY);
ftpBuilder.setConnectTimeout(opts, 10000);
ftpBuilder.setSoTimeout(opts, 10000);
ftpBuilder.setControlEncoding(opts, DefaultCharset.name);
break;
case ftps:
FtpsFileSystemConfigBuilder ftpsBuilder = FtpsFileSystemConfigBuilder.getInstance();
ftpsBuilder.setPassiveMode(opts, Config.vfs().getFtp().getPassive());
/** 强制不校验IP */
ftpsBuilder.setRemoteVerification(opts, false);
// FtpFileType.BINARY is the default
ftpsBuilder.setFileType(opts, FtpFileType.BINARY);
ftpsBuilder.setConnectTimeout(opts, 10000);
ftpsBuilder.setSoTimeout(opts, 10000);
ftpsBuilder.setControlEncoding(opts, DefaultCharset.name);
break;
case cifs:
break;
case webdav:
WebdavFileSystemConfigBuilder webdavBuilder = (WebdavFileSystemConfigBuilder) WebdavFileSystemConfigBuilder
.getInstance();
webdavBuilder.setConnectionTimeout(opts, 10000);
webdavBuilder.setSoTimeout(opts, 10000);
webdavBuilder.setUrlCharset(opts, DefaultCharset.name);
webdavBuilder.setMaxConnectionsPerHost(opts, 200);
webdavBuilder.setMaxTotalConnections(opts, 200);
webdavBuilder.setFollowRedirect(opts, true);
// webdavBuilder.setVersioning(opts, true);
break;
case file:
break;
default:
break;
// bzip2,file, ftp, ftps, gzip, hdfs, http, https, jar, ram, res, sftp,
// tar, temp, webdav, zip, cifs, mime;
case ftp:
FtpFileSystemConfigBuilder ftpBuilder = FtpFileSystemConfigBuilder.getInstance();
/*
* 如果使用被动模式在阿里云centos7下会经常性出现无法连接 Caused by: java.net.ConnectException:
* Connection timed out (Connection timed out) at
* java.net.PlainSocketImpl.socketConnect(Native Method) at
* java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
* at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.
* java:206) at
* java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at
* java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at
* java.net.Socket.connect(Socket.java:589)
*/
ftpBuilder.setPassiveMode(opts, Config.vfs().getFtp().getPassive());
// builder.setPassiveMode(opts, false);
// builder.setPassiveMode(opts, true);
/** 强制不校验IP */
ftpBuilder.setRemoteVerification(opts, false);
// FtpFileType.BINARY is the default
ftpBuilder.setFileType(opts, FtpFileType.BINARY);
ftpBuilder.setConnectTimeout(opts, 10000);
ftpBuilder.setSoTimeout(opts, 10000);
ftpBuilder.setControlEncoding(opts, DefaultCharset.name);
break;
case ftps:
FtpsFileSystemConfigBuilder ftpsBuilder = FtpsFileSystemConfigBuilder.getInstance();
ftpsBuilder.setPassiveMode(opts, Config.vfs().getFtp().getPassive());
/** 强制不校验IP */
ftpsBuilder.setRemoteVerification(opts, false);
// FtpFileType.BINARY is the default
ftpsBuilder.setFileType(opts, FtpFileType.BINARY);
ftpsBuilder.setConnectTimeout(opts, 10000);
ftpsBuilder.setSoTimeout(opts, 10000);
ftpsBuilder.setControlEncoding(opts, DefaultCharset.name);
break;
case cifs:
break;
case webdav:
WebdavFileSystemConfigBuilder webdavBuilder = (WebdavFileSystemConfigBuilder) WebdavFileSystemConfigBuilder
.getInstance();
webdavBuilder.setConnectionTimeout(opts, 10000);
webdavBuilder.setSoTimeout(opts, 10000);
webdavBuilder.setUrlCharset(opts, DefaultCharset.name);
webdavBuilder.setMaxConnectionsPerHost(opts, 200);
webdavBuilder.setMaxTotalConnections(opts, 200);
webdavBuilder.setFollowRedirect(opts, true);
// webdavBuilder.setVersioning(opts, true);
break;
case file:
break;
default:
break;
}
return opts;
}
......
......@@ -19,27 +19,27 @@ import java.lang.annotation.Target;
public @interface ContainerEntity {
/**
* 执行dump时分组数量
*/
public int dumpSize() default 1000;
/**
* 执行dump时分组数量
*/
public int dumpSize() default 200;
/**
* 类型
*/
public Type type() default Type.content;
/**
* 类型
*/
public Type type() default Type.content;
/**
* 引用,强数据,软数据(软数据不会影响系统运行)
*/
/**
* 引用,强数据,软数据(软数据不会影响系统运行)
*/
public Reference reference() default Reference.strong;
public Reference reference() default Reference.strong;
public enum Type {
element, content, log, custom;
}
public enum Type {
element, content, log, custom;
}
public enum Reference {
strong, soft;
}
public enum Reference {
strong, soft;
}
}
......@@ -27,7 +27,6 @@ import com.x.base.core.project.config.Components;
import com.x.base.core.project.config.ConfigObject;
import com.x.base.core.project.config.Dingding;
import com.x.base.core.project.config.DumpRestoreData;
import com.x.base.core.project.config.DumpRestoreStorage;
import com.x.base.core.project.config.Exmail;
import com.x.base.core.project.config.LogLevel;
import com.x.base.core.project.config.Meeting;
......@@ -64,7 +63,7 @@ public class CreateConfigSample {
classes.add(Components.class);
classes.add(Dingding.class);
classes.add(DumpRestoreData.class);
classes.add(DumpRestoreStorage.class);
// classes.add(DumpRestoreStorage.class);
classes.add(Exmail.class);
classes.add(LogLevel.class);
classes.add(Meeting.class);
......
......@@ -740,23 +740,23 @@ public class Config {
return instance().dumpRestoreData;
}
public DumpRestoreStorage dumpRestoreStorage;
public static DumpRestoreStorage dumpRestoreStorage() throws Exception {
if (null == instance().dumpRestoreStorage) {
synchronized (Config.class) {
if (null == instance().dumpRestoreStorage) {
DumpRestoreStorage obj = BaseTools.readConfigObject(PATH_CONFIG_DUMPRESTORESTORAGE,
DumpRestoreStorage.class);
if (null == obj) {
obj = DumpRestoreStorage.defaultInstance();
}
instance().dumpRestoreStorage = obj;
}
}
}
return instance().dumpRestoreStorage;
}
// public DumpRestoreStorage dumpRestoreStorage;
//
// public static DumpRestoreStorage dumpRestoreStorage() throws Exception {
// if (null == instance().dumpRestoreStorage) {
// synchronized (Config.class) {
// if (null == instance().dumpRestoreStorage) {
// DumpRestoreStorage obj = BaseTools.readConfigObject(PATH_CONFIG_DUMPRESTORESTORAGE,
// DumpRestoreStorage.class);
// if (null == obj) {
// obj = DumpRestoreStorage.defaultInstance();
// }
// instance().dumpRestoreStorage = obj;
// }
// }
// }
// return instance().dumpRestoreStorage;
// }
public String initialScriptText;
......
......@@ -36,7 +36,7 @@ public class CreateSample {
classes.add(Collect.class);
classes.add(Dingding.class);
classes.add(DumpRestoreData.class);
classes.add(DumpRestoreStorage.class);
//classes.add(DumpRestoreStorage.class);
classes.add(LogLevel.class);
classes.add(Meeting.class);
classes.add(Messages.class);
......
......@@ -19,6 +19,9 @@ public class DumpRestoreData extends ConfigObject {
public static final String TYPE_FULL = "full";
public static final String TYPE_LITE = "lite";
public static final String RESTOREOVERRIDE_CLEAN = "clean";
public static final String RESTOREOVERRIDE_SKIPEXISTED = "skipExisted";
public static final String DEFAULT_TYPE = TYPE_LITE;
public static final Boolean DEFAULT_PARALLEL = true;
public static final Boolean DEFAULT_REDISTRIBUTE = true;
......@@ -55,6 +58,9 @@ public class DumpRestoreData extends ConfigObject {
@FieldDescribe("无法获取storage是否升起错误.")
private Boolean exceptionInvalidStorage;
@FieldDescribe("数据导入方式,clean:清空重新导入,skipExisted:如果有相同id的数据跳过.默认方式为clean.")
private String restoreOverride;
public Boolean getRedistribute() {
return BooleanUtils.isNotFalse(redistribute);
}
......@@ -119,4 +125,12 @@ public class DumpRestoreData extends ConfigObject {
this.mode = mode;
}
public String getRestoreOverride() {
return restoreOverride;
}
public void setRestoreOverride(String restoreOverride) {
this.restoreOverride = restoreOverride;
}
}
package com.x.base.core.project.config;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.BooleanUtils;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.gson.GsonPropertyObject;
import com.x.base.core.project.tools.ListTools;
public class DumpRestoreStorage extends GsonPropertyObject {
public static DumpRestoreStorage defaultInstance() {
return new DumpRestoreStorage();
}
public static final int default_batchSize = 100;
public DumpRestoreStorage() {
this.includes = new ArrayList<String>();
this.excludes = new ArrayList<String>();
this.batchSize = default_batchSize;
this.redistribute = true;
this.exceptionInvalidStorage = true;
}
@FieldDescribe("是否启用.")
private Boolean enable;
@FieldDescribe("导出导入包含对象,可以使用通配符*.")
private List<String> includes;
@FieldDescribe("导出导入排除对象,可以使用通配符*.")
private List<String> excludes;
@FieldDescribe("批量对象数量.")
private Integer batchSize;
@FieldDescribe("是否进行重新分布.")
private Boolean redistribute;
@FieldDescribe("无法获取storage是否升起错误.")
private Boolean exceptionInvalidStorage;
public Boolean getEnable() {
return BooleanUtils.isTrue(this.enable);
}
public List<String> getIncludes() {
List<String> list = new ArrayList<>();
for (String str : ListTools.trim(this.includes, true, true)) {
list.add(str);
}
return list;
}
public List<String> getExcludes() {
List<String> list = new ArrayList<>();
for (String str : ListTools.trim(this.excludes, true, true)) {
list.add(str);
}
return list;
}
public Boolean getRedistribute() {
return BooleanUtils.isNotFalse(this.redistribute);
}
/** 默认为true */
public Boolean getExceptionInvalidStorage() {
return BooleanUtils.isNotFalse(this.exceptionInvalidStorage);
}
public Integer getBatchSize() {
if ((null == this.batchSize) || (this.batchSize < 1)) {
return 500;
}
return this.batchSize;
}
public void setIncludes(List<String> includes) {
this.includes = includes;
}
public void setExcludes(List<String> excludes) {
this.excludes = excludes;
}
public void setBatchSize(Integer batchSize) {
this.batchSize = batchSize;
}
public void setRedistribute(Boolean redistribute) {
this.redistribute = redistribute;
}
public void setExceptionInvalidStorage(Boolean exceptionInvalidStorage) {
this.exceptionInvalidStorage = exceptionInvalidStorage;
}
public void setEnable(Boolean enable) {
this.enable = enable;
}
}
package com.x.base.core.project.jaxrs;
import java.net.URI;
import java.util.Date;
import java.util.Objects;
import java.util.zip.CRC32;
......@@ -9,15 +10,15 @@ import javax.ws.rs.core.CacheControl;
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Response;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jetty.http.HttpHeader;
import com.x.base.core.project.exception.CallbackPromptException;
import com.x.base.core.project.gson.XGsonBuilder;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.HttpMediaType;
import com.x.base.core.project.tools.DefaultCharset;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jetty.http.HttpHeader;
public class ResponseFactory {
private static CacheControl defaultCacheControl = CacheControlFactory.getDefault();
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSConfigSetting.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSConfigSetting.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import java.util.List;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSForumInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSForumInfo.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSOperationRecord.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSOperationRecord.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSPermissionInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSPermissionInfo.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSPermissionRole.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSPermissionRole.table + JpaObject.IndexNameMiddle
......
......@@ -24,7 +24,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSReplyInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSReplyInfo.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSRoleInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSRoleInfo.table + JpaObject.IndexNameMiddle
......
......@@ -20,7 +20,7 @@ import java.util.List;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSSectionInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSSectionInfo.table + JpaObject.IndexNameMiddle
......
......@@ -29,7 +29,7 @@ import com.x.base.core.project.tools.DateTools;
/**
* 附件信息管理表
*/
@ContainerEntity(dumpSize = 10, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSSubjectAttachment.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSSubjectAttachment.table + JpaObject.IndexNameMiddle
......
......@@ -33,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSSubjectInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSSubjectInfo.table + JpaObject.IndexNameMiddle
......
......@@ -24,7 +24,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSSubjectVoteResult.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSSubjectVoteResult.table + JpaObject.IndexNameMiddle
......
......@@ -28,7 +28,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSUserInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSUserInfo.table + JpaObject.IndexNameMiddle
......@@ -180,7 +180,7 @@ public class BBSUserInfo extends SliceJpaObject {
@FieldDescribe("上次访问时间")
@Temporal(TemporalType.TIMESTAMP)
@Column(name = ColumnNamePrefix + lastVisitTime_FIELDNAME)
@CheckPersist(allowEmpty = false)
@CheckPersist(allowEmpty = true)
private Date lastVisitTime = null;
public static final String lastOperationTime_FIELDNAME = "lastOperationTime";
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSUserRole.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSUserRole.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSVoteOption.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSVoteOption.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSVoteOptionGroup.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSVoteOptionGroup.table + JpaObject.IndexNameMiddle
......
......@@ -21,7 +21,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
* @author LIYI
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.BBSVoteRecord.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.BBSVoteRecord.table + JpaObject.IndexNameMiddle
......@@ -169,7 +169,11 @@ public class BBSVoteRecord extends SliceJpaObject {
this.optionId = optionId;
}
public String getOptionGroupId() { return this.optionGroupId; }
public String getOptionGroupId() {
return this.optionGroupId;
}
public void setOptionGroupId(final String optionGroupId) { this.optionGroupId = optionGroupId; }
public void setOptionGroupId(final String optionGroupId) {
this.optionGroupId = optionGroupId;
}
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ import java.util.List;
* @author O2LEE
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.AppInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.AppInfo.table + JpaObject.IndexNameMiddle
......
......@@ -14,7 +14,7 @@ import javax.persistence.*;
* @author O2LEE
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.AppInfoConfig.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.AppInfoConfig.table + JpaObject.IndexNameMiddle
......
......@@ -20,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* 内容管理应用目录分类扩展信息
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.CategoryExt.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.CategoryExt.table + JpaObject.IndexNameMiddle
......
......@@ -36,7 +36,7 @@ import com.x.base.core.project.tools.ListTools;
* @author O2LEE
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.CategoryInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.CategoryInfo.table + JpaObject.IndexNameMiddle
......
......@@ -18,7 +18,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* 数据指处理,比如修改栏目名称引起的所有分类 和文档别名需要修改
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.CmsBatchOperation.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.CmsBatchOperation.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -37,7 +37,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Document.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Document.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -22,7 +22,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* @author O2LEE
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.DocumentCommend.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.DocumentCommend.table + JpaObject.IndexNameMiddle
......
......@@ -22,7 +22,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* @author O2LEE
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.DocumentCommentCommend.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.DocumentCommentCommend.table + JpaObject.IndexNameMiddle
......
......@@ -20,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
/**
* 信息评论内容表
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.DocumentCommentContent.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.DocumentCommentContent.table + JpaObject.IndexNameMiddle
......
......@@ -19,7 +19,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
/**
* 信息评论表
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.DocumentCommentInfo.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.DocumentCommentInfo.table + JpaObject.IndexNameMiddle
......
......@@ -24,7 +24,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* 内容管理日志信息表
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.DocumentViewRecord.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.DocumentViewRecord.table + JpaObject.IndexNameMiddle
......
......@@ -20,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
* 内容管理日志信息表
*
*/
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.Log.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Log.table + JpaObject.IndexNameMiddle
......
......@@ -28,7 +28,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
*
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.ReadRemind.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.ReadRemind.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Review.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Review.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......@@ -598,9 +598,9 @@ public class Review extends SliceJpaObject {
return sequence_FIELDNAME;
}
private String getSequenceString(String sequenceString ) {
if( StringUtils.length(sequenceString) > 60 ){
return StringUtils.substring(sequenceString, 0, 60 );
private String getSequenceString(String sequenceString) {
if (StringUtils.length(sequenceString) > 60) {
return StringUtils.substring(sequenceString, 0, 60);
}
return sequenceString;
}
......
......@@ -22,7 +22,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.Element.AppDict.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.AppDict.table + JpaObject.IndexNameMiddle
......
......@@ -36,7 +36,7 @@ import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.AppDictItem.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.AppDictItem.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -39,7 +39,7 @@ import com.x.cms.core.entity.PersistenceProperties;
*
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.File.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.File.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -25,7 +25,7 @@ import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.Form.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.Form.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -21,7 +21,7 @@ import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.FormField.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.FormField.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -33,7 +33,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.QueryView.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.QueryView.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -36,7 +36,7 @@ import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.Script.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.Script.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -24,7 +24,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.TemplateForm.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.TemplateForm.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -34,7 +34,7 @@ import com.x.cms.core.entity.AppInfo;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.View.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.View.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -20,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.ViewCategory.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.ViewCategory.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -20,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.cms.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Element.ViewFieldConfig.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Element.ViewFieldConfig.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -27,7 +27,7 @@ import org.apache.openjpa.persistence.jdbc.ElementColumn;
import org.apache.openjpa.persistence.jdbc.ElementIndex;
import org.apache.openjpa.persistence.jdbc.Index;
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Entity
@Table(name = PersistenceProperties.Component.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Component.table + JpaObject.IndexNameMiddle
......
......@@ -96,8 +96,8 @@ public class DumpData {
EntityManagerFactory emf = null;
EntityManager em = null;
try {
Thread.currentThread().setContextClassLoader(ClassLoaderTools.urlClassLoader(false,false,false,
false, false, Config.dir_local_temp_classes().toPath()));
Thread.currentThread().setContextClassLoader(ClassLoaderTools.urlClassLoader(false, false,
false, false, false, Config.dir_local_temp_classes().toPath()));
Thread.currentThread().setName(DumpData.class.getName() + ":" + className);
@SuppressWarnings("unchecked")
Class<JpaObject> cls = (Class<JpaObject>) Thread.currentThread().getContextClassLoader()
......@@ -208,7 +208,7 @@ public class DumpData {
StorageObject s = (StorageObject) t;
String name = s.getStorage();
StorageMapping mapping = storageMappings.get(s.getClass(), name);
if (null == mapping && Config.dumpRestoreStorage().getExceptionInvalidStorage()) {
if (null == mapping && Config.dumpRestoreData().getExceptionInvalidStorage()) {
throw new ExceptionInvalidStorage(s);
}
if (null != mapping) {
......
......@@ -9,6 +9,7 @@ import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Stream;
......@@ -33,6 +34,7 @@ import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.StorageObject;
import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.config.DumpRestoreData;
import com.x.base.core.project.config.StorageMapping;
import com.x.base.core.project.config.StorageMappings;
import com.x.base.core.project.gson.XGsonBuilder;
......@@ -41,6 +43,9 @@ import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.ClassLoaderTools;
import com.x.base.core.project.tools.DateTools;
import com.x.base.core.project.tools.ListTools;
import com.x.base.core.project.tools.StringTools;
import net.sf.ehcache.hibernate.management.impl.BeanUtils;
public class RestoreData {
......@@ -150,8 +155,11 @@ public class RestoreData {
throw new ExceptionDirectoryNotExist(directory);
}
StorageMappings storageMappings = Config.storageMappings();
this.clean(cls, em, storageMappings, cls.getAnnotation(ContainerEntity.class));
em.clear();
if (!Objects.equals(Config.dumpRestoreData().getRestoreOverride(),
DumpRestoreData.RESTOREOVERRIDE_SKIPEXISTED)) {
this.clean(cls, em, storageMappings, cls.getAnnotation(ContainerEntity.class));
em.clear();
}
List<Path> paths = this.list(directory);
paths.stream().forEach(o -> {
logger.print("restore {}/{} part of data:{}.", batch.getAndAdd(1), paths.size(), cls.getName());
......@@ -160,6 +168,11 @@ public class RestoreData {
JsonArray raws = this.convert(o);
for (JsonElement json : raws) {
Object t = gson.fromJson(json, cls);
if (Objects.equals(Config.dumpRestoreData().getRestoreOverride(),
DumpRestoreData.RESTOREOVERRIDE_SKIPEXISTED)
&& (null != em.find(cls, BeanUtils.getBeanProperty(t, JpaObject.id_FIELDNAME)))) {
continue;
}
if (StorageObject.class.isAssignableFrom(cls)) {
Path sub = o.resolveSibling(FilenameUtils.getBaseName(o.getFileName().toString()));
this.binary(t, cls, sub, storageMappings);
......
......@@ -35,7 +35,7 @@ public abstract class JettySeverTools {
sslContextFactory.setTrustAll(true);
HttpConfiguration config = new HttpConfiguration();
config.setSecureScheme("https");
config.setOutputBufferSize(32768);
config.setOutputBufferSize(1024 * 2048);
config.setRequestHeaderSize(8192 * 2);
config.setResponseHeaderSize(8192 * 2);
config.setSendServerVersion(true);
......@@ -52,7 +52,7 @@ public abstract class JettySeverTools {
protected static void addHttpConnector(Server server, Integer port) throws Exception {
HttpConfiguration config = new HttpConfiguration();
config.setOutputBufferSize(32768);
config.setOutputBufferSize(1024 * 2048);
config.setRequestHeaderSize(8192 * 2);
config.setResponseHeaderSize(8192 * 2);
config.setSendServerVersion(true);
......
......@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.project.config.StorageMapping;
import com.x.base.core.project.exception.PromptException;
import com.x.base.core.project.gson.GsonPropertyObject;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.organization.OrganizationDefinition;
import com.x.base.core.project.tools.ListTools;
......@@ -1228,7 +1229,8 @@ public class Business {
}
try (ZipOutputStream zos = new ZipOutputStream(os)) {
for (Map.Entry<String, Attachment> entry : filePathMap.entrySet()) {
zos.putNextEntry(new ZipEntry(new ZipEntry(StringUtils.replaceEach(entry.getKey(), new String[]{"/","\\"}, new String[]{"-","-"}))));
zos.putNextEntry(new ZipEntry(new ZipEntry(StringUtils.replaceEach(entry.getKey(),
new String[] { "/", "\\" }, new String[] { "-", "-" }))));
StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class,
entry.getValue().getStorage());
try (ByteArrayOutputStream os1 = new ByteArrayOutputStream()) {
......@@ -1241,7 +1243,8 @@ public class Business {
if (otherAttMap != null) {
for (Map.Entry<String, byte[]> entry : otherAttMap.entrySet()) {
zos.putNextEntry(new ZipEntry(StringUtils.replaceEach(entry.getKey(), new String[]{"/","\\"}, new String[]{"-","-"})));
zos.putNextEntry(new ZipEntry(StringUtils.replaceEach(entry.getKey(), new String[] { "/", "\\" },
new String[] { "-", "-" })));
zos.write(entry.getValue());
}
}
......
......@@ -47,7 +47,9 @@ class ActionListWithPerson extends BaseAction {
List<String> ids = this.list(business, effectivePerson, roles, identities, units);
for (String id : ids) {
Application o = business.application().pick(id);
wos.add(Wo.copier.copy(o));
if (null != o) {
wos.add(Wo.copier.copy(o));
}
}
wos = business.application().sort(wos);
result.setData(wos);
......
......@@ -211,7 +211,7 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
return this.canManageApplicationOrProcess;
}
public static class Wo extends Control {
public static class Wo extends AbstractControl {
}
......
......@@ -5,7 +5,7 @@ import com.x.base.core.project.jaxrs.StandardJaxrsAction;
abstract class BaseAction extends StandardJaxrsAction {
public static class Control extends GsonPropertyObject {
protected static class AbstractControl extends GsonPropertyObject {
/* 是否可以看到 */
private Boolean allowVisit = false;
/* 是否可以直接流转 */
......
package com.x.processplatform.assemble.surface.jaxrs.form;
import java.util.Map.Entry;
import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonElement;
import com.x.base.core.container.EntityManagerContainer;
import com.x.base.core.container.factory.EntityManagerContainerFactory;
import com.x.base.core.project.exception.ExceptionAccessDenied;
import com.x.base.core.project.exception.ExceptionEntityNotExist;
import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.logger.Audit;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;
import com.x.base.core.project.tools.PropertyTools;
import com.x.processplatform.assemble.surface.Business;
import com.x.processplatform.core.entity.content.Work;
import com.x.processplatform.core.entity.content.WorkCompleted;
import com.x.processplatform.core.entity.content.WorkCompletedProperties;
import com.x.processplatform.core.entity.element.Activity;
import com.x.processplatform.core.entity.element.Form;
import com.x.processplatform.core.entity.element.Script;
class V2FindWithWorkOrWorkCompleted2 extends BaseAction {
private static Logger logger = LoggerFactory.getLogger(V2FindWithWorkOrWorkCompleted2.class);
ActionResult<JsonElement> execute(EffectivePerson effectivePerson, String workOrWorkCompleted) throws Exception {
try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
Audit audit = logger.audit(effectivePerson);
ActionResult<JsonElement> result = new ActionResult<>();
Business business = new Business(emc);
if (!business.readableWithWorkOrWorkCompleted(effectivePerson, workOrWorkCompleted,
new ExceptionEntityNotExist(workOrWorkCompleted))) {
throw new ExceptionAccessDenied(effectivePerson);
}
JsonElement wo = null;
Work work = emc.find(workOrWorkCompleted, Work.class);
if (null != work) {
wo = gson.toJsonTree(this.work(business, work));
} else {
wo = gson.toJsonTree(this.workCompleted(business, emc.flag(workOrWorkCompleted, WorkCompleted.class)));
}
audit.log(null, "查看");
result.setData(wo);
return result;
}
}
private Wo work(Business business, Work work) throws Exception {
Wo wo = new Wo();
String id = work.getForm();
if (StringUtils.isEmpty(id)) {
Activity activity = business.getActivity(work);
id = PropertyTools.getOrElse(activity, Activity.form_FIELDNAME, String.class, "");
}
if (StringUtils.isNotEmpty(id)) {
Form form = business.form().pick(id);
if (null != form) {
wo.setForm(toWoFormDataOrMobileData(form));
related(business, wo, form);
}
}
return wo;
}
private Wo workCompleted(Business business, WorkCompleted workCompleted) throws Exception {
Wo wo = new Wo();
// 先使用当前库的表单,如果不存在使用储存的表单.
if (StringUtils.isNotEmpty(workCompleted.getForm())) {
Form form = business.form().pick(workCompleted.getForm());
if (null != form) {
wo.setForm(toWoFormDataOrMobileData(form));
related(business, wo, form);
}
} else if (null != workCompleted.getProperties().getForm()) {
wo.setForm(toWoFormDataOrMobileData(workCompleted.getProperties().getForm()));
if (StringUtils.isNotBlank(workCompleted.getProperties().getForm().getData())) {
workCompleted.getProperties().getRelatedFormList()
.forEach(o -> wo.getRelatedFormMap().put(o.getId(), toWoFormDataOrMobileData(o)));
} else {
workCompleted.getProperties().getMobileRelatedFormList()
.forEach(o -> wo.getRelatedFormMap().put(o.getId(), toWoFormMobileDataOrData(o)));
}
}
workCompleted.getProperties().getRelatedScriptList().stream()
.forEach(o -> wo.getRelatedScriptMap().put(o.getId(), toWoScript(o)));
return wo;
}
private void related(Business business, Wo wo, Form form) throws Exception {
if (StringUtils.isNotBlank(form.getData())) {
for (String relatedFormId : form.getProperties().getRelatedFormList()) {
Form relatedForm = business.form().pick(relatedFormId);
if (null != relatedForm) {
wo.getRelatedFormMap().put(relatedFormId, toWoFormDataOrMobileData(relatedForm));
}
}
} else {
for (String mobileRelatedFormId : form.getProperties().getMobileRelatedFormList()) {
Form mobileRelatedForm = business.form().pick(mobileRelatedFormId);
if (null != mobileRelatedForm) {
wo.getRelatedFormMap().put(mobileRelatedFormId, toWoFormMobileDataOrData(mobileRelatedForm));
}
}
}
relatedScript(business, wo, form);
}
protected void relatedScript(Business business, AbstractWo wo, Form form) throws Exception {
for (Entry<String, String> entry : form.getProperties().getRelatedScriptMap().entrySet()) {
switch (entry.getValue()) {
case WorkCompletedProperties.Script.TYPE_PROCESSPLATFORM:
Script relatedScript = business.script().pick(entry.getKey());
if (null != relatedScript) {
wo.getRelatedScriptMap().put(entry.getKey(), toWoScript(relatedScript));
}
break;
case WorkCompletedProperties.Script.TYPE_CMS:
com.x.cms.core.entity.element.Script relatedCmsScript = business.cms().script().pick(entry.getKey());
if (null != relatedCmsScript) {
wo.getRelatedScriptMap().put(entry.getKey(), toWoScript(relatedCmsScript));
}
break;
case WorkCompletedProperties.Script.TYPE_PORTAL:
com.x.portal.core.entity.Script relatedPortalScript = business.portal().script().pick(entry.getKey());
if (null != relatedPortalScript) {
wo.getRelatedScriptMap().put(entry.getKey(), toWoScript(relatedPortalScript));
}
break;
default:
break;
}
}
}
public static class Wo extends AbstractWo {
}
}
\ No newline at end of file
......@@ -42,10 +42,10 @@ import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
class ActionManageRetract extends BaseAction {
class V2ManageRetract extends BaseAction {
@ActionLogger
private static Logger logger = LoggerFactory.getLogger(ActionManageRetract.class);
private static Logger logger = LoggerFactory.getLogger(V2ManageRetract.class);
private WorkLog workLog;
private TaskCompleted taskCompleted;
......
package com.x.processplatform.assemble.surface.jaxrs.work;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
......@@ -995,18 +996,18 @@ public class WorkAction extends StandardJaxrsAction {
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "管理员替代person操作工作召回。", action = ActionManageRetract.class)
@JaxrsMethodDescribe(value = "管理员替代person操作工作召回。", action = V2ManageRetract.class)
@PUT
@Path("v2/{id}/person/{person}/retract/manage")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void manageRetract(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
public void V2ManageRetract(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
@JaxrsParameterDescribe("工作标识") @PathParam("id") String id,
@JaxrsParameterDescribe("召回工作已办人员(根据流转记录确认)") @PathParam("person") String person, JsonElement jsonElement) {
ActionResult<ActionManageRetract.Wo> result = new ActionResult<>();
ActionResult<V2ManageRetract.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
try {
result = new ActionManageRetract().execute(effectivePerson, id, person);
result = new V2ManageRetract().execute(effectivePerson, id, person);
} catch (Exception e) {
logger.error(e, effectivePerson, request, jsonElement);
result.error(e);
......@@ -1014,4 +1015,30 @@ public class WorkAction extends StandardJaxrsAction {
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
@JaxrsMethodDescribe(value = "V2_根据Work或workCompleted取得内容.", action = V2GetWorkOrWorkCompleted.class)
@GET
@Path("v2/workorworkcompleted/{workOrWorkCompleted}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void V2GetWorkOrWorkCompleted(@Suspended final AsyncResponse asyncResponse,
@Context HttpServletRequest request,
@JaxrsParameterDescribe("工作标识") @PathParam("workOrWorkCompleted") String workOrWorkCompleted) {
// Date s = new Date();
ActionResult<V2GetWorkOrWorkCompleted.Wo> result = new ActionResult<>();
EffectivePerson effectivePerson = this.effectivePerson(request);
// System.out.println("!!!!!!!!!!!!!!!!V2GetWorkOrWorkCompleted1:" + ((new
// Date()).getTime() - s.getTime()));
try {
result = new V2GetWorkOrWorkCompleted().execute(effectivePerson, workOrWorkCompleted);
// System.out.println("!!!!!!!!!!!!!!!!V2GetWorkOrWorkCompleted2:" + ((new
// Date()).getTime() - s.getTime()));
} catch (Exception e) {
logger.error(e, effectivePerson, request, null);
result.error(e);
}
asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
// System.out.println("!!!!!!!!!!!!!!!!V2GetWorkOrWorkCompleted3:" + ((new
// Date()).getTime() - s.getTime()));
}
}
\ No newline at end of file
......@@ -24,7 +24,7 @@ import com.x.processplatform.core.entity.PersistenceProperties;
import com.x.processplatform.core.entity.element.ActivityType;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.DocumentVersion.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.DocumentVersion.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.Draft.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.Draft.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -18,7 +18,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.KeyLock.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.KeyLock.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -34,7 +34,7 @@ import org.apache.openjpa.persistence.jdbc.Index;
import org.apache.openjpa.persistence.jdbc.Strategy;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.Read.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.Read.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -40,7 +40,7 @@ import org.apache.openjpa.persistence.jdbc.Strategy;
*
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.ReadCompleted.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.ReadCompleted.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......@@ -169,7 +169,7 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
}
return this.properties;
}
public void setProperties(ReadCompletedProperties properties) {
this.properties = properties;
}
......@@ -1146,6 +1146,4 @@ public class ReadCompleted extends SliceJpaObject implements ProjectionInterface
this.currentActivityName = currentActivityName;
}
}
\ No newline at end of file
......@@ -29,7 +29,7 @@ import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.Review.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.Review.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
package com.x.processplatform.core.entity.content;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -22,7 +20,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.SerialNumber.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.SerialNumber.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -43,7 +43,7 @@ import org.apache.openjpa.persistence.jdbc.Index;
import org.apache.openjpa.persistence.jdbc.Strategy;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.Task.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.Task.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -45,7 +45,7 @@ import com.x.processplatform.core.entity.element.Route;
*
*/
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.TaskCompleted.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.TaskCompleted.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -45,7 +45,7 @@ import com.x.processplatform.core.entity.PersistenceProperties;
import com.x.processplatform.core.entity.element.ActivityType;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.Work.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.Work.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -33,7 +33,7 @@ import org.apache.openjpa.persistence.jdbc.Index;
import org.apache.openjpa.persistence.jdbc.Strategy;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 100, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.WorkCompleted.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.WorkCompleted.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......@@ -137,7 +137,7 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
}
return this.properties;
}
public void setProperties(WorkCompletedProperties properties) {
this.properties = properties;
}
......@@ -1053,8 +1053,6 @@ public class WorkCompleted extends SliceJpaObject implements ProjectionInterface
this.merged = merged;
}
public String getActivity() {
return activity;
}
......
......@@ -29,7 +29,7 @@ import com.x.processplatform.core.entity.element.Activity;
import com.x.processplatform.core.entity.element.ActivityType;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.WorkLog.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.WorkLog.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -23,7 +23,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Temporary.ServiceValue.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Temporary.ServiceValue.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
......@@ -18,7 +18,7 @@ import com.x.base.core.project.annotation.FieldDescribe;
import com.x.processplatform.core.entity.PersistenceProperties;
@Entity
@ContainerEntity(dumpSize = 1000, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@ContainerEntity(dumpSize = 200, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Temporary.TriggerWorkRecord.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Temporary.TriggerWorkRecord.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册