Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
e77921d8
o2oa
项目概览
weixin_42566577
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e77921d8
编写于
5月 14, 2021
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据中心导入模块1
上级
da0e7039
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
268 addition
and
1 deletion
+268
-1
o2server/x_query_core_entity/src/main/java/com/x/query/core/entity/ImportModel.java
...ty/src/main/java/com/x/query/core/entity/ImportModel.java
+263
-0
o2server/x_query_core_entity/src/main/java/com/x/query/core/entity/PersistenceProperties.java
...n/java/com/x/query/core/entity/PersistenceProperties.java
+5
-1
未找到文件。
o2server/x_query_core_entity/src/main/java/com/x/query/core/entity/ImportModel.java
0 → 100644
浏览文件 @
e77921d8
package
com.x.query.core.entity
;
import
com.x.base.core.entity.JpaObject
;
import
com.x.base.core.entity.SliceJpaObject
;
import
com.x.base.core.entity.annotation.*
;
import
com.x.base.core.project.annotation.FieldDescribe
;
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
;
import
javax.persistence.*
;
import
java.util.List
;
@Entity
@ContainerEntity
(
dumpSize
=
10
,
type
=
ContainerEntity
.
Type
.
content
,
reference
=
ContainerEntity
.
Reference
.
strong
)
@Table
(
name
=
PersistenceProperties
.
ImportModel
.
table
,
uniqueConstraints
=
{
@UniqueConstraint
(
name
=
PersistenceProperties
.
ImportModel
.
table
+
JpaObject
.
IndexNameMiddle
+
JpaObject
.
DefaultUniqueConstraintSuffix
,
columnNames
=
{
JpaObject
.
IDCOLUMN
,
JpaObject
.
CREATETIMECOLUMN
,
JpaObject
.
UPDATETIMECOLUMN
,
JpaObject
.
SEQUENCECOLUMN
})
})
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
public
class
ImportModel
extends
SliceJpaObject
{
private
static
final
long
serialVersionUID
=
-
7520516033901189347L
;
private
static
final
String
TABLE
=
PersistenceProperties
.
ImportModel
.
table
;
public
static
final
Integer
MAX_COUNT
=
5000
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
@FieldDescribe
(
"数据库主键,自动生成."
)
@Id
@Column
(
length
=
length_id
,
name
=
ColumnNamePrefix
+
id_FIELDNAME
)
@CheckRemove
(
citationNotExists
=
/* 已经没有Stat使用View了 */
@CitationNotExist
(
type
=
Stat
.
class
,
fields
=
Stat
.
view_FIELDNAME
))
private
String
id
=
createId
();
/* 以上为 JpaObject 默认字段 */
public
void
onPersist
()
throws
Exception
{
if
((
this
.
count
==
null
)
||
(
this
.
count
<
1
))
{
this
.
count
=
MAX_COUNT
;
}
}
public
Integer
getCount
()
{
if
((
this
.
count
==
null
)
||
(
this
.
count
<
1
))
{
return
MAX_COUNT
;
}
else
{
return
this
.
count
;
}
}
/* 更新运行方法 */
/* Entity 默认字段结束 */
/* 为了和前台对应 */
public
static
final
String
TYPE_PROCESSPLATFORM
=
"process"
;
public
static
final
String
TYPE_CMS
=
"cms"
;
public
static
final
String
TYPE_DYNAMIC_TABLE
=
"dynamicTable"
;
public
static
final
String
name_FIELDNAME
=
"name"
;
@Flag
@FieldDescribe
(
"名称."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
name_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
,
simplyString
=
false
,
citationNotExists
=
/* 验证不可重名 */
@CitationNotExist
(
fields
=
{
"name"
,
"id"
,
"alias"
},
type
=
ImportModel
.
class
,
equals
=
@Equal
(
field
=
"query"
,
property
=
"query"
)))
private
String
name
;
public
static
final
String
alias_FIELDNAME
=
"alias"
;
@Flag
@FieldDescribe
(
"别名."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
alias_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
,
simplyString
=
false
,
citationNotExists
=
/* 验证不可重名 */
@CitationNotExist
(
fields
=
{
"name"
,
"id"
,
"alias"
},
type
=
ImportModel
.
class
,
equals
=
@Equal
(
field
=
"query"
,
property
=
"query"
)))
private
String
alias
;
public
static
final
String
description_FIELDNAME
=
"description"
;
@FieldDescribe
(
"描述."
)
@Column
(
length
=
JpaObject
.
length_255B
,
name
=
ColumnNamePrefix
+
description_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
description
;
public
static
final
String
query_FIELDNAME
=
"query"
;
@FieldDescribe
(
"所属查询."
)
@Column
(
length
=
JpaObject
.
length_id
,
name
=
ColumnNamePrefix
+
query_FIELDNAME
)
@Index
(
name
=
TABLE
+
ColumnNamePrefix
+
query_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
,
citationExists
=
{
@CitationExist
(
type
=
Query
.
class
)
})
private
String
query
;
public
static
final
String
layout_FIELDNAME
=
"layout"
;
@FieldDescribe
(
"显示布局."
)
@Lob
@Basic
(
fetch
=
FetchType
.
EAGER
)
@Column
(
length
=
JpaObject
.
length_1M
,
name
=
ColumnNamePrefix
+
layout_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
layout
;
public
static
final
String
data_FIELDNAME
=
"data"
;
@FieldDescribe
(
"访问方案."
)
@Lob
@Basic
(
fetch
=
FetchType
.
EAGER
)
@Column
(
length
=
JpaObject
.
length_10M
,
name
=
ColumnNamePrefix
+
data_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
data
;
public
static
final
String
code_FIELDNAME
=
"code"
;
@FieldDescribe
(
"前台运行脚本."
)
@Lob
@Basic
(
fetch
=
FetchType
.
EAGER
)
@Column
(
length
=
JpaObject
.
length_1M
,
name
=
ColumnNamePrefix
+
code_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
code
;
public
static
final
String
enableCheck_FIELDNAME
=
"enableCheck"
;
@FieldDescribe
(
"是否启用校验."
)
@Column
(
name
=
ColumnNamePrefix
+
enableCheck_FIELDNAME
)
private
Boolean
enableCheck
;
public
static
final
String
type_FIELDNAME
=
"type"
;
@FieldDescribe
(
"类型."
)
@Column
(
length
=
length_32B
,
name
=
ColumnNamePrefix
+
type_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
,
simplyString
=
false
)
private
String
type
;
public
static
final
String
availableIdentityList_FIELDNAME
=
"availableIdentityList"
;
@FieldDescribe
(
"允许使用的用户."
)
@PersistentCollection
(
fetch
=
FetchType
.
EAGER
)
@ContainerTable
(
name
=
TABLE
+
ContainerTableNameMiddle
+
availableIdentityList_FIELDNAME
,
joinIndex
=
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
availableIdentityList_FIELDNAME
+
JoinIndexNameSuffix
))
@OrderColumn
(
name
=
ORDERCOLUMNCOLUMN
)
@ElementColumn
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
availableIdentityList_FIELDNAME
)
@ElementIndex
(
name
=
TABLE
+
IndexNameMiddle
+
availableIdentityList_FIELDNAME
+
ElementIndexNameSuffix
)
@CheckPersist
(
allowEmpty
=
true
)
private
List
<
String
>
availableIdentityList
;
public
static
final
String
availableUnitList_FIELDNAME
=
"availableUnitList"
;
@FieldDescribe
(
"允许使用的组织."
)
@PersistentCollection
(
fetch
=
FetchType
.
EAGER
)
@ContainerTable
(
name
=
TABLE
+
ContainerTableNameMiddle
+
availableUnitList_FIELDNAME
,
joinIndex
=
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
availableUnitList_FIELDNAME
+
JoinIndexNameSuffix
))
@OrderColumn
(
name
=
ORDERCOLUMNCOLUMN
)
@ElementColumn
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
availableUnitList_FIELDNAME
)
@ElementIndex
(
name
=
TABLE
+
IndexNameMiddle
+
availableUnitList_FIELDNAME
+
ElementIndexNameSuffix
)
@CheckPersist
(
allowEmpty
=
true
)
private
List
<
String
>
availableUnitList
;
public
static
final
String
count_FIELDNAME
=
"count"
;
@FieldDescribe
(
"最大导入数量."
)
@Column
(
name
=
ColumnNamePrefix
+
count_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
Integer
count
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getAlias
()
{
return
alias
;
}
public
void
setAlias
(
String
alias
)
{
this
.
alias
=
alias
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getQuery
()
{
return
query
;
}
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getLayout
()
{
return
layout
;
}
public
void
setLayout
(
String
layout
)
{
this
.
layout
=
layout
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
Boolean
getEnableCheck
()
{
return
enableCheck
;
}
public
void
setEnableCheck
(
Boolean
enableCheck
)
{
this
.
enableCheck
=
enableCheck
;
}
public
String
getData
()
{
return
data
;
}
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
public
List
<
String
>
getAvailableIdentityList
()
{
return
availableIdentityList
;
}
public
void
setAvailableIdentityList
(
List
<
String
>
availableIdentityList
)
{
this
.
availableIdentityList
=
availableIdentityList
;
}
public
List
<
String
>
getAvailableUnitList
()
{
return
availableUnitList
;
}
public
void
setAvailableUnitList
(
List
<
String
>
availableUnitList
)
{
this
.
availableUnitList
=
availableUnitList
;
}
public
void
setCount
(
Integer
count
)
{
this
.
count
=
count
;
}
}
o2server/x_query_core_entity/src/main/java/com/x/query/core/entity/PersistenceProperties.java
浏览文件 @
e77921d8
...
...
@@ -12,6 +12,10 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public
static
final
String
table
=
"QRY_VIEW"
;
}
public
static
class
ImportModel
{
public
static
final
String
table
=
"QRY_IMPORT_MODEL"
;
}
public
static
class
Stat
{
public
static
final
String
table
=
"QRY_STAT"
;
}
...
...
@@ -88,4 +92,4 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
}
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录