- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 35 of file Relateds.java.
◆ add()
Related org.turro.related.Relateds.add |
( |
String |
origin, |
|
|
String |
destination, |
|
|
String |
description |
|
) |
| |
Definition at line 77 of file Relateds.java.
78 if(!
exists(origin, destination)) {
79 Related re =
new Related();
81 re.setDestination(destination);
82 re.setDescription(description);
84 re.setCreation(
new Date());
85 return dao.get().saveObject(re);
◆ addDestination()
Related org.turro.related.Relateds.addDestination |
( |
String |
destination, |
|
|
String |
description |
|
) |
| |
Definition at line 41 of file Relateds.java.
42 return add(entityPath, destination, description);
◆ addOrigin()
Related org.turro.related.Relateds.addOrigin |
( |
String |
origin, |
|
|
String |
description |
|
) |
| |
Definition at line 37 of file Relateds.java.
38 return add(origin, entityPath, description);
◆ destinations()
List<Related> org.turro.related.Relateds.destinations |
( |
| ) |
|
Definition at line 68 of file Relateds.java.
69 return SqlClause.select(
"p").from(
"Related p")
70 .where().equal(
"origin", entityPath)
72 .resultList(Related.class);
◆ empty()
static Relateds org.turro.related.Relateds.empty |
( |
| ) |
|
|
static |
◆ exists()
boolean org.turro.related.Relateds.exists |
( |
String |
origin, |
|
|
String |
destination |
|
) |
| |
Definition at line 109 of file Relateds.java.
110 return SqlClause.count().from(
"Related")
111 .where().equal(
"origin", origin)
112 .and().equal(
"destination", destination)
114 .singleResult(Long.class) > 0;
◆ existsAny()
boolean org.turro.related.Relateds.existsAny |
( |
String |
existPath | ) |
|
Definition at line 117 of file Relateds.java.
118 return SqlClause.count().from(
"Related")
119 .where().equal(
"origin", existPath)
120 .or().equal(
"destination", existPath)
122 .singleResult(Long.class) > 0;
◆ existsDestination()
boolean org.turro.related.Relateds.existsDestination |
( |
String |
destination | ) |
|
◆ existsOrigin()
boolean org.turro.related.Relateds.existsOrigin |
( |
String |
origin | ) |
|
◆ from()
static Relateds org.turro.related.Relateds.from |
( |
String |
entityPath | ) |
|
|
static |
Definition at line 145 of file Relateds.java.
146 return new Relateds(entityPath);
◆ getAllPaths()
static Set<String> org.turro.related.Relateds.getAllPaths |
( |
String |
root | ) |
|
|
static |
Definition at line 125 of file Relateds.java.
126 Set<String> all =
new HashSet<>(
127 SqlClause.select(
"distinct origin").from(
"Related")
128 .where().startsWith(
"origin",
"/" + root +
"/")
129 .dao(
new ElephantPU())
130 .resultList(String.class));
132 SqlClause.select(
"distinct destination").from(
"Related")
133 .where().startsWith(
"destination",
"/" + root +
"/")
134 .dao(
new ElephantPU())
135 .resultList(String.class));
◆ origins()
List<Related> org.turro.related.Relateds.origins |
( |
| ) |
|
Definition at line 61 of file Relateds.java.
62 return SqlClause.select(
"p").from(
"Related p")
63 .where().equal(
"destination", entityPath)
65 .resultList(Related.class);
◆ remove()
Relateds org.turro.related.Relateds.remove |
( |
String |
origin, |
|
|
String |
destination |
|
) |
| |
Definition at line 91 of file Relateds.java.
92 SqlClause.delete(
"Related")
93 .where().equal(
"origin", origin)
94 .and().equal(
"destination", destination)
◆ removeAny()
Relateds org.turro.related.Relateds.removeAny |
( |
String |
removePath | ) |
|
Definition at line 100 of file Relateds.java.
101 SqlClause.delete(
"Related")
102 .where().equal(
"origin", removePath)
103 .or().equal(
"destination", removePath)
◆ removeDestination()
Relateds org.turro.related.Relateds.removeDestination |
( |
String |
destination | ) |
|
Definition at line 49 of file Relateds.java.
50 return remove(entityPath, destination);
◆ removeOrigin()
Relateds org.turro.related.Relateds.removeOrigin |
( |
String |
origin | ) |
|
Definition at line 45 of file Relateds.java.
46 return remove(origin, entityPath);
The documentation for this class was generated from the following file: