◆ axAllParticipations()
Jsons org.turro.alliance.provider.Projects.axAllParticipations |
( |
String |
projectId | ) |
|
Definition at line 88 of file provider/Projects.java.
90 SqlClause.select(
"p").from(
"AxParticipationRequest p")
91 .where().equal(
"id", correctId(projectId))
93 .resultList(AxParticipationRequest.class)
97 SqlClause.select(
"p").from(
"AxAllianceParticipation p")
98 .where().equal(
"id", correctId(projectId))
100 .resultList(AxAllianceParticipation.class)
Jsons participations(String projectId)
◆ axAskParticipate()
void org.turro.alliance.provider.Projects.axAskParticipate |
( |
Jsons |
request | ) |
|
Definition at line 130 of file provider/Projects.java.
131 AxParticipationRequest axp =
new AxParticipationRequest();
132 RelationId ri =
new RelationId();
133 ri.setRelatedEntityId(request.getString(
"contactId"));
136 axp.setId(request.getString(
"axId"));
137 switch(request.getString(
"as")) {
138 case "Beneficiary" -> axp.setBeneficiary(
true);
139 case "Offerer" -> axp.setOfferer(
true);
140 case "Consortium" -> axp.setConsortium(
true);
142 axp.setName(request.getString(
"contactName"));
143 axp.setFace(request.getString(
"contactFace"));
144 axp.setCompany(request.getString(
"companyName"));
145 axp.setCompanyFace(request.getString(
"companyFace"));
147 Participations.from(axp).add();
◆ axDeleteParticipation()
void org.turro.alliance.provider.Projects.axDeleteParticipation |
( |
Jsons |
axRequest | ) |
|
Definition at line 182 of file provider/Projects.java.
183 if(axRequest.getBoolean(
"validated")) {
184 AxAllianceParticipation ap = AxAllianceParticipation.fromJson(axRequest.asJsonValue());
185 dao.get().deleteObject(ap);
187 AxParticipationRequest pr = AxParticipationRequest.fromJson(axRequest.asJsonValue());
188 dao.get().deleteObject(pr);
◆ axFullParticipations()
Jsons org.turro.alliance.provider.Projects.axFullParticipations |
( |
| ) |
|
Definition at line 107 of file provider/Projects.java.
109 SqlClause.select(
"p").from(
"AxParticipationRequest p")
110 .where().equal(
"mainMemberId", member.
getMemberId())
111 .or().equal(
"relatedMemberId", member.
getMemberId())
112 .orderBy(
"p.creation desc")
114 .resultList(AxParticipationRequest.class)
118 SqlClause.select(
"p").from(
"AxAllianceParticipation p")
119 .where().equal(
"mainMemberId", member.
getMemberId())
120 .or().equal(
"relatedMemberId", member.
getMemberId())
121 .orderBy(
"p.creation desc")
123 .resultList(AxAllianceParticipation.class)
◆ axParticipations()
Jsons org.turro.alliance.provider.Projects.axParticipations |
( |
String |
projectId, |
|
|
String |
as |
|
) |
| |
Definition at line 61 of file provider/Projects.java.
63 SqlClause.select(
"p").from(
"AxAllianceParticipation p")
64 .where().equal(
"id", correctId(projectId))
65 .startIf(!Strings.isBlank(as))
66 .and().isTrue(Strings.lowerCase(as))
69 .resultList(AxAllianceParticipation.class)
◆ axPendingParticipations()
Jsons org.turro.alliance.provider.Projects.axPendingParticipations |
( |
| ) |
|
Definition at line 76 of file provider/Projects.java.
78 SqlClause.select(
"p").from(
"AxParticipationRequest p")
79 .where().equal(
"mainMemberId", member.
getMemberId())
81 .resultList(AxParticipationRequest.class)
◆ axValidatePending()
void org.turro.alliance.provider.Projects.axValidatePending |
( |
Jsons |
axPending | ) |
|
Definition at line 176 of file provider/Projects.java.
177 AxParticipationRequest pr = AxParticipationRequest.fromJson(axPending.asJsonValue());
178 Participations.from(pr).validate();
179 dao.get().deleteObject(pr);
◆ from()
◆ hasRequested()
boolean org.turro.alliance.provider.Projects.hasRequested |
( |
Jsons |
request | ) |
|
Definition at line 160 of file provider/Projects.java.
161 return !SqlClause.select(
"p").from(
"AxParticipationRequest p")
162 .where().equal(
"id", request.getString(
"axId"))
163 .and().equal(
"relatedEntityId", request.getString(
"contactId"))
164 .and().equal(
"relatedMemberId", member.
getMemberId())
165 .and().isTrue(request.getString(
"as").toLowerCase())
167 .resultList(AxParticipationRequest.class).isEmpty();
◆ isParticipant()
boolean org.turro.alliance.provider.Projects.isParticipant |
( |
Jsons |
request | ) |
|
Definition at line 150 of file provider/Projects.java.
151 return !SqlClause.select(
"p").from(
"AxAllianceParticipation p")
152 .where().equal(
"id", request.getString(
"axId"))
153 .and().equal(
"relatedEntityId", request.getString(
"contactId"))
154 .and().equal(
"relatedMemberId", member.
getMemberId())
155 .and().isTrue(request.getString(
"as").toLowerCase())
157 .resultList(AxAllianceParticipation.class).isEmpty();
◆ participations()
Jsons org.turro.alliance.provider.Projects.participations |
( |
String |
projectId | ) |
|
Definition at line 49 of file provider/Projects.java.
51 SqlClause.select(
"p").from(
"AxParticipation p")
52 .where().equal(
"id", projectId)
54 .resultList(AxParticipation.class)
◆ project()
Jsons org.turro.alliance.provider.Projects.project |
( |
String |
projectId | ) |
|
Definition at line 41 of file provider/Projects.java.
42 AxProject
project = SqlClause.select(
"p").from(
"AxProject p")
43 .where().equal(
"id", projectId)
45 .singleResult(AxProject.class);
46 return Jsons.read(
project.toJson());
Jsons project(String projectId)
◆ save()
boolean org.turro.alliance.provider.Projects.save |
( |
Jsons |
request | ) |
|
Definition at line 170 of file provider/Projects.java.
171 AxAllianceParticipation ap = AxAllianceParticipation.fromJson(request.asJsonValue());
172 dao.get().saveObject(ap);
The documentation for this class was generated from the following file: