◆ PreferencesProvider()
org.turro.alliance.provider.PreferencesProvider.PreferencesProvider |
( |
WsMember |
member, |
|
|
String |
reason, |
|
|
Jsons |
criteria |
|
) |
| |
◆ count()
long org.turro.alliance.provider.PreferencesProvider.count |
( |
WsMember |
member, |
|
|
String |
reason, |
|
|
Jsons |
criteria |
|
) |
| |
|
protected |
Definition at line 56 of file PreferencesProvider.java.
57 List<Long> ids = criteria.getArrayValues(
"categoryIds", Long.class);
58 String search = criteria.getString(
"search",
"");
59 int phase = criteria.getInt(
"phase", -1);
60 return SqlClause.select(
"count(p)").from(
"AxProject p")
61 .startIf(ids !=
null && !ids.isEmpty())
62 .where().in(
"categoryId", ids)
64 .startIf(!Strings.isBlank(search))
65 .whereOrAnd().partial(search,
"p.code",
"p.name",
"p.summary")
68 .whereOrAnd().equal(
"p.phaseIndex", phase)
71 .singleResult(Long.class, 0L);
◆ loadData()
Jsons org.turro.alliance.provider.PreferencesProvider.loadData |
( |
WsMember |
member, |
|
|
String |
reason, |
|
|
Jsons |
criteria |
|
) |
| |
|
protected |
Definition at line 43 of file PreferencesProvider.java.
44 AxMemberPreferences preferences = SqlClause.select(
"p").from(
"AxMemberPreferences p")
45 .where().equal(
"memberId", member.getMemberId())
47 .singleResult(AxMemberPreferences.class,
null);
48 if(preferences ==
null) {
49 preferences =
new AxMemberPreferences();
50 preferences.setMemberId(member.getMemberId());
52 return Jsons.read(preferences.toJson());
The documentation for this class was generated from the following file: