|
static Object | getObject (String path) |
|
static IElephantEntity | getMainEntity (Object entity) |
|
static IElephantEntity | emptyController () |
|
static IElephantEntity | getController (String path) |
|
static IElephantEntity | getController (Object entity) |
|
static Collection< Object > | getEntities (String search, int maxResults) |
|
static Collection< Object > | getEntities (String root, String search, int maxResults) |
|
static Collection< Object > | getEntities (String search, int maxResults, KeyValueMap kvm) |
|
static Collection< Object > | getEntities (String root, String search, int maxResults, KeyValueMap kvm) |
|
static Object | getSingleRelatedByRole (EntityRole role, IContact contact) |
|
static Collection< Object > | getRelatedByRole (EntityRole role, IContact contact) |
|
static boolean | hasRelatedRole (EntityRole role, IContact contact) |
|
static Set< String > | getEntityPaths (Collection entitites) |
|
static Set< String > | getEntityPaths (Object[] entitites) |
|
static Set< String > | getEntityPaths (Object entity) |
|
static Set< String > | getAllowedRoots () |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 37 of file Entities.java.
◆ emptyController()
◆ getAllowedRoots()
static Set<String> org.turro.entities.Entities.getAllowedRoots |
( |
| ) |
|
|
static |
Definition at line 194 of file Entities.java.
195 HashSet<String>
set =
new HashSet<>();
196 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
197 set.addAll(iElEntity.getAllowedRoots());
◆ getController() [1/2]
static IElephantEntity org.turro.entities.Entities.getController |
( |
Object |
entity | ) |
|
|
static |
Definition at line 90 of file Entities.java.
91 if(entity instanceof String) {
93 }
else if(entity instanceof Path) {
95 }
else if(entity !=
null) {
96 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
97 IElephantEntity ei = iElEntity.getController(entity);
static IElephantEntity getController(String path)
◆ getController() [2/2]
static IElephantEntity org.turro.entities.Entities.getController |
( |
String |
path | ) |
|
|
static |
Definition at line 78 of file Entities.java.
79 if(!Strings.isBlank(path)) {
80 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
81 IElephantEntity ei = iElEntity.getController(path);
◆ getEntities() [1/4]
static Collection<Object> org.turro.entities.Entities.getEntities |
( |
String |
root, |
|
|
String |
search, |
|
|
int |
maxResults |
|
) |
| |
|
static |
Definition at line 110 of file Entities.java.
111 return getEntities(root, search, maxResults,
null);
static Collection< Object > getEntities(String search, int maxResults)
◆ getEntities() [2/4]
static Collection<Object> org.turro.entities.Entities.getEntities |
( |
String |
root, |
|
|
String |
search, |
|
|
int |
maxResults, |
|
|
KeyValueMap |
kvm |
|
) |
| |
|
static |
Definition at line 125 of file Entities.java.
126 if(kvm ==
null) { kvm =
new KeyValueMap(
new HashMap()); }
127 ArrayList<Object> list =
new ArrayList<>();
128 if(!Strings.isBlank(search)) {
129 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
130 for(String entityRoot : Strings.csvToList(root)) {
131 list.addAll(iElEntity.getEntitites(entityRoot, search, maxResults, kvm));
◆ getEntities() [3/4]
static Collection<Object> org.turro.entities.Entities.getEntities |
( |
String |
search, |
|
|
int |
maxResults |
|
) |
| |
|
static |
◆ getEntities() [4/4]
static Collection<Object> org.turro.entities.Entities.getEntities |
( |
String |
search, |
|
|
int |
maxResults, |
|
|
KeyValueMap |
kvm |
|
) |
| |
|
static |
Definition at line 114 of file Entities.java.
115 if(kvm ==
null) { kvm =
new KeyValueMap(
new HashMap()); }
116 ArrayList<Object> list =
new ArrayList<>();
117 if(!Strings.isBlank(search)) {
118 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
119 list.addAll(iElEntity.getEntitites(search, maxResults, kvm));
◆ getEntityPaths() [1/3]
static Set<String> org.turro.entities.Entities.getEntityPaths |
( |
Collection |
entitites | ) |
|
|
static |
Definition at line 163 of file Entities.java.
164 HashSet<String>
set =
new HashSet<>();
165 for(Object entity : entitites) {
166 String path = Entities.getController(entity).getPath();
167 if(!Strings.isBlank(path)) {
◆ getEntityPaths() [2/3]
static Set<String> org.turro.entities.Entities.getEntityPaths |
( |
Object |
entity | ) |
|
|
static |
Definition at line 185 of file Entities.java.
186 HashSet<String>
set =
new HashSet<>();
187 String path = Entities.getController(entity).getPath();
188 if(!Strings.isBlank(path)) {
◆ getEntityPaths() [3/3]
static Set<String> org.turro.entities.Entities.getEntityPaths |
( |
Object[] |
entitites | ) |
|
|
static |
Definition at line 174 of file Entities.java.
175 HashSet<String>
set =
new HashSet<>();
176 for(Object entity : entitites) {
177 String path = Entities.getController(entity).getPath();
178 if(!Strings.isBlank(path)) {
◆ getMainEntity()
static IElephantEntity org.turro.entities.Entities.getMainEntity |
( |
Object |
entity | ) |
|
|
static |
Definition at line 60 of file Entities.java.
62 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
63 IElephantEntity ei = iElEntity.getMain(entity);
◆ getObject()
static Object org.turro.entities.Entities.getObject |
( |
String |
path | ) |
|
|
static |
Definition at line 43 of file Entities.java.
44 if(!Strings.isBlank(path)) {
45 Path entityPath = Path.pathFrom(path);
46 for(IElephantEntity iElEntity : Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)) {
47 IElephantEntity ei = iElEntity.getController(path);
49 return ei.getEntity();
51 Object obj = iElEntity.getObject(entityPath);
◆ getRelatedByRole()
static Collection<Object> org.turro.entities.Entities.getRelatedByRole |
( |
EntityRole |
role, |
|
|
IContact |
contact |
|
) |
| |
|
static |
Definition at line 148 of file Entities.java.
149 ArrayList<Object> list =
new ArrayList<>();
150 Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class).forEach((iElEntity) -> {
151 list.addAll(iElEntity.getRelatedByRole(role, contact));
◆ getSingleRelatedByRole()
static Object org.turro.entities.Entities.getSingleRelatedByRole |
( |
EntityRole |
role, |
|
|
IContact |
contact |
|
) |
| |
|
static |
Definition at line 140 of file Entities.java.
141 Collection<Object> list = Entities.getRelatedByRole(role, contact);
142 if(!list.isEmpty()) {
143 return list.stream().findFirst().get();
◆ hasRelatedRole()
static boolean org.turro.entities.Entities.hasRelatedRole |
( |
EntityRole |
role, |
|
|
IContact |
contact |
|
) |
| |
|
static |
Definition at line 156 of file Entities.java.
157 return Instances.cached().byAnnotation(ElephantEntity.class, IElephantEntity.class)
158 .stream().map((iElEntity) -> iElEntity.hasRelatedRole(role, contact)).anyMatch((has) -> (has));
The documentation for this class was generated from the following file: