Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
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
dataplatform
atlas
Commits
c5ea4f0e
Commit
c5ea4f0e
authored
Feb 15, 2017
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1547: update setter name for rename of EntityMutationResponse.mutatedEntities
parent
9b8a5ddc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
28 deletions
+34
-28
EntityMutationResponse.java
...g/apache/atlas/model/instance/EntityMutationResponse.java
+34
-28
No files found.
intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
View file @
c5ea4f0e
...
...
@@ -44,48 +44,61 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
@XmlAccessorType
(
XmlAccessType
.
PROPERTY
)
public
class
EntityMutationResponse
{
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
entitiesMutated
;
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
mutatedEntities
;
Map
<
String
,
String
>
guidAssignments
;
public
EntityMutationResponse
()
{
}
public
EntityMutationResponse
(
final
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
opVsEntityMap
)
{
this
.
entitiesMutated
=
opVsEntityMap
;
public
EntityMutationResponse
(
final
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
mutatedEntities
)
{
this
.
mutatedEntities
=
mutatedEntities
;
}
public
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
getMutatedEntities
()
{
return
entitiesMutated
;
return
mutatedEntities
;
}
public
void
set
EntitiesMutated
(
final
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
opVsEntityMap
)
{
this
.
entitiesMutated
=
opVsEntityMap
;
public
void
set
MutatedEntities
(
final
Map
<
EntityMutations
.
EntityOperation
,
List
<
AtlasEntityHeader
>>
mutatedEntities
)
{
this
.
mutatedEntities
=
mutatedEntities
;
}
public
void
setGuidAssignments
(
Map
<
String
,
String
>
guidAssignments
)
{
this
.
guidAssignments
=
guidAssignments
;
}
public
Map
<
String
,
String
>
getGuidAssignments
()
{
return
guidAssignments
;
}
@JsonIgnore
public
List
<
AtlasEntityHeader
>
getEntitiesByOperation
(
EntityMutations
.
EntityOperation
op
)
{
if
(
entitiesMutated
!=
null
)
{
return
entitiesMutated
.
get
(
op
);
if
(
mutatedEntities
!=
null
)
{
return
mutatedEntities
.
get
(
op
);
}
return
null
;
}
@JsonIgnore
public
List
<
AtlasEntityHeader
>
getCreatedEntities
()
{
if
(
entitiesMutated
!=
null
)
{
return
entitiesMutated
.
get
(
EntityMutations
.
EntityOperation
.
CREATE
);
if
(
mutatedEntities
!=
null
)
{
return
mutatedEntities
.
get
(
EntityMutations
.
EntityOperation
.
CREATE
);
}
return
null
;
}
@JsonIgnore
public
List
<
AtlasEntityHeader
>
getUpdatedEntities
()
{
if
(
entitiesMutated
!=
null
)
{
return
entitiesMutated
.
get
(
EntityMutations
.
EntityOperation
.
UPDATE
);
if
(
mutatedEntities
!=
null
)
{
return
mutatedEntities
.
get
(
EntityMutations
.
EntityOperation
.
UPDATE
);
}
return
null
;
}
@JsonIgnore
public
List
<
AtlasEntityHeader
>
getDeletedEntities
()
{
if
(
entitiesMutated
!=
null
)
{
return
entitiesMutated
.
get
(
EntityMutations
.
EntityOperation
.
DELETE
);
if
(
mutatedEntities
!=
null
)
{
return
mutatedEntities
.
get
(
EntityMutations
.
EntityOperation
.
DELETE
);
}
return
null
;
}
...
...
@@ -151,15 +164,15 @@ public class EntityMutationResponse {
}
public
void
addEntity
(
EntityMutations
.
EntityOperation
op
,
AtlasEntityHeader
header
)
{
if
(
entitiesMutated
==
null
)
{
entitiesMutated
=
new
HashMap
<>();
if
(
mutatedEntities
==
null
)
{
mutatedEntities
=
new
HashMap
<>();
}
List
<
AtlasEntityHeader
>
opEntities
=
entitiesMutated
.
get
(
op
);
List
<
AtlasEntityHeader
>
opEntities
=
mutatedEntities
.
get
(
op
);
if
(
opEntities
==
null
)
{
opEntities
=
new
ArrayList
<>();
entitiesMutated
.
put
(
op
,
opEntities
);
mutatedEntities
.
put
(
op
,
opEntities
);
}
opEntities
.
add
(
header
);
...
...
@@ -171,7 +184,7 @@ public class EntityMutationResponse {
sb
=
new
StringBuilder
();
}
AtlasBaseTypeDef
.
dumpObjects
(
entitiesMutated
,
sb
);
AtlasBaseTypeDef
.
dumpObjects
(
mutatedEntities
,
sb
);
return
sb
;
}
...
...
@@ -181,13 +194,13 @@ public class EntityMutationResponse {
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
EntityMutationResponse
that
=
(
EntityMutationResponse
)
o
;
return
Objects
.
equals
(
entitiesMutated
,
that
.
entitiesMutated
)
&&
return
Objects
.
equals
(
mutatedEntities
,
that
.
mutatedEntities
)
&&
Objects
.
equals
(
guidAssignments
,
that
.
guidAssignments
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
entitiesMutated
,
guidAssignments
);
return
Objects
.
hash
(
mutatedEntities
,
guidAssignments
);
}
@Override
...
...
@@ -231,11 +244,4 @@ public class EntityMutationResponse {
}
return
null
;
}
public
void
setGuidAssignments
(
Map
<
String
,
String
>
guidAssignments
)
{
this
.
guidAssignments
=
guidAssignments
;
}
public
Map
<
String
,
String
>
getGuidAssignments
()
{
return
guidAssignments
;
}
}
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