Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neo4jRelation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qiuchaofei
neo4jRelation
Commits
7351c570
Commit
7351c570
authored
Dec 02, 2021
by
qiuchaofei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,返回结果的数量控制
parent
c0d91f59
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
MetaDataController.java
...adata/metadataRelation/controller/MetaDataController.java
+10
-5
MetadataServiceImpl.java
...ta/metadataRelation/service/impl/MetadataServiceImpl.java
+1
-7
No files found.
src/main/java/com/keymobile/metadata/metadataRelation/controller/MetaDataController.java
View file @
7351c570
...
...
@@ -150,12 +150,8 @@ public class MetaDataController {
Map
<
String
,
List
<
String
>>
target2Source
=
new
HashMap
<>();
Map
<
String
,
MetaModel
>
metaModelMap
=
new
HashMap
<>();
int
count
=
0
;
int
count
=
1
;
for
(
MetaData
metaData
:
metaDataList
)
{
if
(
count
>=
sizeInt
){
break
;
}
count
++;
Node
node
=
new
Node
();
String
[]
strings
=
metaData
.
getMetadataId
().
split
(
"="
);
...
...
@@ -185,6 +181,11 @@ public class MetaDataController {
systemNode
.
setType
(
"MetaData"
);
returnReslult
.
getNodes
().
add
(
systemNode
);
nodeMap
.
put
(
""
+
systemNode
.
getId
(),
systemNode
);
count
++;
if
(
count
>=
sizeInt
){
break
;
}
child2Parent
.
put
(
""
+
metaData
.
getId
(),
systemNode
.
getId
());
}
...
...
@@ -202,6 +203,10 @@ public class MetaDataController {
node
.
setName
(
metaData
.
getName
());
node
.
setType
(
"MetaData"
);
returnReslult
.
getNodes
().
add
(
node
);
count
++;
if
(
count
>=
sizeInt
){
break
;
}
nodeMap
.
put
(
""
+
metaData
.
getId
(),
node
);
}
...
...
src/main/java/com/keymobile/metadata/metadataRelation/service/impl/MetadataServiceImpl.java
View file @
7351c570
...
...
@@ -175,7 +175,7 @@ public class MetadataServiceImpl implements IMetadataService {
Driver
neo4jConnection
=
neo4jConfig
.
getNeo4jConnection
();
Session
session
=
neo4jConnection
.
session
();
// match (n:MetaData ) where n.metadataId =~"Table=.*" return n
String
cypher
=
"match (n:MetaData ) where n.metadataId =~\""
+
modelName
+
".*\" return n
"
;
String
cypher
=
"match (n:MetaData ) where n.metadataId =~\""
+
modelName
+
".*\" return n
limit "
+
size
;
logger
.
info
(
"cypher:"
+
cypher
);
Map
<
String
,
MetaModel
>
metaModelMap
=
new
HashMap
<>();
long
starttime
=
System
.
currentTimeMillis
();
...
...
@@ -185,14 +185,8 @@ public class MetadataServiceImpl implements IMetadataService {
List
<
String
>
metadataIdList
=
new
ArrayList
<>();
int
count0
=
0
;
while
(
result
.
hasNext
())
{
if
(
count0
>=
size
){
break
;
}
count0
++;
Record
record
=
result
.
next
();
List
<
Value
>
values
=
record
.
values
();
for
(
Value
value
:
values
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment