Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_42566577
o2oa
提交
8d2d9cd7
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,发现更多精彩内容 >>
提交
8d2d9cd7
编写于
2月 22, 2019
作者:
R
roo00
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改动态表名称,为了统一去掉了首字母大写.
上级
208606b6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
13 deletion
+18
-13
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntity.java
...in/java/com/x/base/core/entity/dynamic/DynamicEntity.java
+3
-2
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java
.../com/x/base/core/entity/dynamic/DynamicEntityBuilder.java
+12
-6
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
...x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
+0
-2
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/Business.java
.../src/main/java/com/x/query/assemble/surface/Business.java
+3
-3
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntity.java
浏览文件 @
8d2d9cd7
...
...
@@ -54,16 +54,17 @@ public class DynamicEntity extends GsonPropertyObject {
if
(
StringUtils
.
isEmpty
(
name
))
{
throw
new
Exception
(
"name is empty."
);
}
return
StringUtils
.
capitalize
(
name
)
;
return
name
;
}
public
String
className
()
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
name
))
{
throw
new
Exception
(
"name is empty."
);
}
return
CLASS_PACKAGE
+
"."
+
StringUtils
.
capitalize
(
name
)
;
return
CLASS_PACKAGE
+
"."
+
name
;
}
@SuppressWarnings
(
"unchecked"
)
public
Class
<?
extends
JpaObject
>
getObjectClass
()
throws
Exception
{
return
(
Class
<?
extends
JpaObject
>)
Class
.
forName
(
this
.
className
());
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java
浏览文件 @
8d2d9cd7
...
...
@@ -52,11 +52,11 @@ import com.x.base.core.entity.dynamic.DynamicEntity.StringMapField;
import
com.x.base.core.entity.dynamic.DynamicEntity.TimeField
;
import
com.x.base.core.project.annotation.FieldDescribe
;
import
com.x.base.core.project.tools.ListTools
;
public
class
DynamicEntityBuilder
{
public
static
final
String
FIELDNAME_SUFFIX
=
"_FIELDNAME"
;
public
static
final
String
DOT_CLASS
=
".class"
;
private
DynamicEntity
dynamicEntity
;
private
File
dir
;
...
...
@@ -353,15 +353,21 @@ public class DynamicEntityBuilder {
.
build
();
AnnotationSpec
persistentCollection
=
AnnotationSpec
.
builder
(
PersistentCollection
.
class
)
.
addMember
(
"fetch"
,
"javax.persistence.FetchType.EAGER"
).
build
();
.
addMember
(
"fetch"
,
"javax.persistence.FetchType.EAGER"
)
.
addMember
(
"elementType"
,
typeClass
.
getSimpleName
()
+
DOT_CLASS
).
build
();
AnnotationSpec
orderColumn
=
AnnotationSpec
.
builder
(
OrderColumn
.
class
).
addMember
(
"name"
,
"ORDERCOLUMNCOLUMN"
)
.
build
();
AnnotationSpec
elementColumn
=
AnnotationSpec
.
builder
(
ElementColumn
.
class
).
addMember
(
"length"
,
"length_255B"
)
.
addMember
(
"name"
,
"ColumnNamePrefix + "
+
field
.
fieldName
()).
build
();
ClassName
type
=
ClassName
.
get
(
String
.
class
);
AnnotationSpec
elementColumn
=
null
;
if
(
CharSequence
.
class
.
isAssignableFrom
(
typeClass
))
{
elementColumn
=
AnnotationSpec
.
builder
(
ElementColumn
.
class
).
addMember
(
"length"
,
"length_255B"
)
.
addMember
(
"name"
,
"ColumnNamePrefix + "
+
field
.
fieldName
()).
build
();
}
else
{
elementColumn
=
AnnotationSpec
.
builder
(
ElementColumn
.
class
)
.
addMember
(
"name"
,
"ColumnNamePrefix + "
+
field
.
fieldName
()).
build
();
}
ClassName
type
=
ClassName
.
get
(
typeClass
);
ClassName
list
=
ClassName
.
get
(
List
.
class
);
TypeName
list_type
=
ParameterizedTypeName
.
get
(
list
,
type
);
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/jaxrs/table/ActionBuildAll.java
浏览文件 @
8d2d9cd7
package
com.x.query.assemble.designer.jaxrs.table
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.InputStreamReader
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.EnumSet
;
...
...
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/Business.java
浏览文件 @
8d2d9cd7
...
...
@@ -32,7 +32,7 @@ import net.sf.ehcache.Element;
public
class
Business
{
private
static
Ehcache
cache
=
ApplicationCache
.
instance
().
getCache
(
Query
.
class
,
View
.
class
,
Stat
.
class
,
Reveal
.
class
);
Reveal
.
class
,
Table
.
class
,
Statement
.
class
);
public
Ehcache
cache
()
{
return
cache
;
...
...
@@ -95,7 +95,7 @@ public class Business {
@SuppressWarnings
(
"unchecked"
)
public
<
T
extends
JpaObject
>
T
pick
(
String
flag
,
Class
<
T
>
cls
)
throws
Exception
{
String
cacheKey
=
ApplicationCache
.
concreteCacheKey
(
flag
);
String
cacheKey
=
ApplicationCache
.
concreteCacheKey
(
cls
,
flag
);
Element
element
=
cache
.
get
(
cacheKey
);
if
((
null
!=
element
)
&&
(
null
!=
element
.
getObjectValue
()))
{
return
(
T
)
element
.
getObjectValue
();
...
...
@@ -103,7 +103,7 @@ public class Business {
T
t
=
this
.
entityManagerContainer
().
flag
(
flag
,
cls
);
if
(
null
!=
t
)
{
entityManagerContainer
().
get
(
cls
).
detach
(
t
);
cache
.
put
(
new
Element
(
flag
,
t
));
cache
.
put
(
new
Element
(
cacheKey
,
t
));
return
t
;
}
return
null
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录