Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
700e8691
o2oa
项目概览
fuyue82
/
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,发现更多精彩内容 >>
提交
700e8691
编写于
10月 14, 2020
作者:
O
o2sword
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
云文件增加管理配置
上级
f852c384
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
151 addition
and
0 deletion
+151
-0
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/PersistenceProperties.java
...in/java/com/x/file/core/entity/PersistenceProperties.java
+3
-0
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/open/FileConfigProperties.java
...ava/com/x/file/core/entity/open/FileConfigProperties.java
+34
-0
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/open/FileConifg.java
...src/main/java/com/x/file/core/entity/open/FileConifg.java
+114
-0
未找到文件。
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/PersistenceProperties.java
浏览文件 @
700e8691
...
...
@@ -40,6 +40,9 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public
static
class
Link
{
public
static
final
String
table
=
"FILE_LINK"
;
}
public
static
class
Config
{
public
static
final
String
table
=
"FILE_CONFIG"
;
}
}
...
...
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/open/FileConfigProperties.java
0 → 100644
浏览文件 @
700e8691
package
com.x.file.core.entity.open
;
import
com.x.base.core.entity.JsonProperties
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FileConfigProperties
extends
JsonProperties
{
private
static
final
long
serialVersionUID
=
-
1259157593040432239L
;
@FieldDescribe
(
"只允许上传的文件后缀"
)
private
List
<
String
>
fileTypeIncludes
=
new
ArrayList
<>();
@FieldDescribe
(
"不允许上传的文件后缀"
)
private
List
<
String
>
fileTypeExcludes
=
new
ArrayList
<>();
public
List
<
String
>
getFileTypeIncludes
()
{
return
fileTypeIncludes
;
}
public
void
setFileTypeIncludes
(
List
<
String
>
fileTypeIncludes
)
{
this
.
fileTypeIncludes
=
fileTypeIncludes
;
}
public
List
<
String
>
getFileTypeExcludes
()
{
return
fileTypeExcludes
;
}
public
void
setFileTypeExcludes
(
List
<
String
>
fileTypeExcludes
)
{
this
.
fileTypeExcludes
=
fileTypeExcludes
;
}
}
o2server/x_file_core_entity/src/main/java/com/x/file/core/entity/open/FileConifg.java
0 → 100644
浏览文件 @
700e8691
package
com.x.file.core.entity.open
;
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
com.x.file.core.entity.PersistenceProperties
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.openjpa.persistence.Persistent
;
import
org.apache.openjpa.persistence.jdbc.Index
;
import
org.apache.openjpa.persistence.jdbc.Strategy
;
import
javax.persistence.*
;
@ContainerEntity
(
dumpSize
=
1000
,
type
=
ContainerEntity
.
Type
.
content
,
reference
=
ContainerEntity
.
Reference
.
strong
)
@Entity
@Table
(
name
=
PersistenceProperties
.
Open
.
Config
.
table
,
uniqueConstraints
=
{
@UniqueConstraint
(
name
=
PersistenceProperties
.
Personal
.
Folder
.
table
+
JpaObject
.
IndexNameMiddle
+
JpaObject
.
DefaultUniqueConstraintSuffix
,
columnNames
=
{
JpaObject
.
IDCOLUMN
,
JpaObject
.
CREATETIMECOLUMN
,
JpaObject
.
UPDATETIMECOLUMN
,
JpaObject
.
SEQUENCECOLUMN
})
})
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
public
class
FileConifg
extends
SliceJpaObject
{
private
static
final
long
serialVersionUID
=
-
2266232193925155825L
;
private
static
final
String
TABLE
=
PersistenceProperties
.
Open
.
Config
.
table
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
@FieldDescribe
(
"数据库主键,自动生成."
)
@Id
@Column
(
length
=
length_id
,
name
=
ColumnNamePrefix
+
id_FIELDNAME
)
private
String
id
=
createId
();
/* 以上为 JpaObject 默认字段 */
public
void
onPersist
()
throws
Exception
{
}
public
FileConifg
()
{
this
.
properties
=
new
FileConfigProperties
();
}
/* 更新运行方法 */
public
static
final
String
person_FIELDNAME
=
"person"
;
@FieldDescribe
(
"所属用户."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
person_FIELDNAME
)
@Index
(
name
=
TABLE
+
IndexNameMiddle
+
person_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
String
person
;
public
static
final
String
name_FIELDNAME
=
"name"
;
@FieldDescribe
(
"分类名称."
)
@Column
(
length
=
length_255B
,
name
=
ColumnNamePrefix
+
name_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
String
name
;
public
static
final
String
capacity_FIELDNAME
=
"capacity"
;
@FieldDescribe
(
"容量(单位M)."
)
@Column
(
name
=
ColumnNamePrefix
+
capacity_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
false
)
private
Integer
capacity
;
public
static
final
String
properties_FIELDNAME
=
"properties"
;
@FieldDescribe
(
"属性对象存储字段."
)
@Persistent
(
fetch
=
FetchType
.
EAGER
)
@Strategy
(
JsonPropertiesValueHandler
)
@Column
(
length
=
JpaObject
.
length_4K
,
name
=
ColumnNamePrefix
+
properties_FIELDNAME
)
@CheckPersist
(
allowEmpty
=
true
)
private
FileConfigProperties
properties
;
public
String
getPerson
()
{
return
person
;
}
public
void
setPerson
(
String
person
)
{
this
.
person
=
person
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getCapacity
()
{
return
capacity
;
}
public
void
setCapacity
(
Integer
capacity
)
{
this
.
capacity
=
capacity
;
}
public
FileConfigProperties
getProperties
()
{
if
(
null
==
this
.
properties
)
{
this
.
properties
=
new
FileConfigProperties
();
}
return
this
.
properties
;
}
public
void
setProperties
(
FileConfigProperties
properties
)
{
this
.
properties
=
properties
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录