- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 33 of file Secs.java.
◆ getAvailables()
static SecSet org.turro.security.Secs.getAvailables |
( |
| ) |
|
|
static |
Definition at line 49 of file Secs.java.
50 Dao dao =
new ContactsPU();
51 WhereClause wc =
new WhereClause();
52 wc.addClause(
"select new org.turro.security.SecItem(s.name, count(s))");
53 wc.addClause(
"from Syndication s");
54 wc.addClause(
"where 1=1");
55 wc.addClause(
"group by s.name");
56 return new SecSet(dao.getResultList(wc));
◆ getIdentifiers()
static List<String> org.turro.security.Secs.getIdentifiers |
( |
Dao |
dao, |
|
|
Set< SecItem > |
sets |
|
) |
| |
|
static |
Definition at line 85 of file Secs.java.
86 WhereClause wc =
new WhereClause();
87 wc.addClause(
"select distinct s.contact.id from Syndication s");
88 wc.addClause(
"where 1=1");
90 for(SecItem sec : sets) {
91 wc.addClause(
"and exists (");
92 wc.addClause(
"select s.name from Syndication s2");
93 wc.addClause(
"where s2.contact = s.contact");
94 wc.addClause(
"and s2.name = :name" + count);
95 wc.addNamedValue(
"name" + count, sec.getSecName());
99 return dao.getResultList(String.class, wc);
◆ getSiblings()
static SecSet org.turro.security.Secs.getSiblings |
( |
Set< String > |
secNames | ) |
|
|
static |
Definition at line 59 of file Secs.java.
60 Dao dao =
new ContactsPU();
61 SecSet finalSet =
null;
62 for(String sec : secNames) {
64 if(finalSet !=
null) {
65 finalSet.retainAll(
set);
70 return Optional.ofNullable(finalSet).orElseGet(() -> SecSet.empty());
static SecSet getSiblings(Set< String > secNames)
◆ removeSyndication()
static void org.turro.security.Secs.removeSyndication |
( |
Dao |
dao, |
|
|
String |
syndication |
|
) |
| |
|
static |
Definition at line 102 of file Secs.java.
103 WhereClause wc =
new WhereClause();
104 wc.addClause(
"delete from Syndication s");
105 wc.addClause(
"where s.name = :name");
106 wc.addNamedValue(
"name", syndication);
107 dao.executeUpdate(wc);
◆ search()
static SecSet org.turro.security.Secs.search |
( |
String |
root, |
|
|
String |
value, |
|
|
int |
max |
|
) |
| |
|
static |
Definition at line 35 of file Secs.java.
36 Dao dao =
new ContactsPU();
37 WhereClause wc =
new WhereClause();
38 wc.addClause(
"select new org.turro.security.SecItem(s.name, count(s))");
39 wc.addClause(
"from Syndication s");
40 wc.addClause(
"where 1=1");
41 if(!Strings.isBlank(value)) {
42 wc.addLikeFields(
new String[]{
"s.name" }, value.toString());
44 wc.addClause(
"group by s.name");
45 wc.addClause(
"order by s.name");
46 return new SecSet(dao.getResultList(wc, max));
The documentation for this class was generated from the following file: