-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JNG-5742 fix eager relation action lifecycle (#407)
- Loading branch information
Showing
46 changed files
with
1,342 additions
and
924 deletions.
There are no files selected for viewing
130 changes: 65 additions & 65 deletions
130
judo-ui-react-itest/ActionGroupTest/model/ActionGroupTest-ui.model
Large diffs are not rendered by default.
Oops, something went wrong.
130 changes: 65 additions & 65 deletions
130
judo-ui-react-itest/ActionGroupTestPro/model/ActionGroupTestPro-ui.model
Large diffs are not rendered by default.
Oops, something went wrong.
484 changes: 242 additions & 242 deletions
484
judo-ui-react-itest/CRUDActionsTest/model/CRUDActionsTest-ui.model
Large diffs are not rendered by default.
Oops, something went wrong.
455 changes: 230 additions & 225 deletions
455
judo-ui-react-itest/OperationParametersTest/model/OperationParametersTest-ui.model
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
judo-ui-react/src/main/java/hu/blackbelt/judo/ui/generator/react/mask/MaskEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package hu.blackbelt.judo.ui.generator.react.mask; | ||
|
||
import java.util.Comparator; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
public class MaskEntry { | ||
private final Set<String> primitives = new LinkedHashSet<>(); | ||
private String relationName; | ||
private final Set<MaskEntry> relations = new LinkedHashSet<>(); | ||
|
||
public MaskEntry(Set<String> primitives, String relationName) { | ||
if (primitives != null && !primitives.isEmpty()) { | ||
this.primitives.addAll(primitives); | ||
} | ||
if (relationName != null) { | ||
this.relationName = relationName; | ||
} | ||
} | ||
|
||
public String getRelationName() { | ||
return relationName; | ||
} | ||
|
||
public MaskEntry setRelationName(String rn) { | ||
relationName = rn; | ||
return this; | ||
} | ||
|
||
public Set<String> getPrimitives() { | ||
return primitives; | ||
} | ||
|
||
public Set<MaskEntry> getRelations() { | ||
return relations; | ||
} | ||
|
||
public MaskEntry addPrimitives(String... p) { | ||
primitives.addAll(Set.of(p)); | ||
return this; | ||
} | ||
|
||
public MaskEntry addPrimitives(Set<String> ps) { | ||
primitives.addAll(ps); | ||
return this; | ||
} | ||
|
||
public MaskEntry addRelations(MaskEntry... r) { | ||
relations.addAll(Set.of(r)); | ||
return this; | ||
} | ||
|
||
public MaskEntry addRelations(Set<MaskEntry> rs) { | ||
relations.addAll(rs); | ||
return this; | ||
} | ||
|
||
public String serialize() { | ||
String p = primitives.stream() | ||
.sorted() | ||
.collect(Collectors.joining(",")); | ||
p += (!p.isEmpty() && !relations.isEmpty()) ? "," : ""; | ||
String r = relations.stream() | ||
.sorted(Comparator.comparing(MaskEntry::getRelationName)) | ||
.map(MaskEntry::serialize) | ||
.collect(Collectors.joining(",")); | ||
if (relationName != null) { | ||
return relationName + "{" + p + r + "}"; | ||
} | ||
return p + r; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.