BrightSide Workbench Full Report + Source Code
org.turro.alliance.db.entities.AxProject Class Reference
Inheritance diagram for org.turro.alliance.db.entities.AxProject:
Collaboration diagram for org.turro.alliance.db.entities.AxProject:

Public Member Functions

ProcedenceId getProjectId ()
 
void setProjectId (ProcedenceId projectId)
 
Long getCategoryId ()
 
void setCategoryId (Long categoryId)
 
String getId ()
 
Date getCreation ()
 
void setCreation (Date creation)
 
int getPhaseIndex ()
 
void setPhaseIndex (int phaseIndex)
 
String getCode ()
 
void setCode (String code)
 
String getName ()
 
void setName (String name)
 
String getSummary ()
 
void setSummary (String summary)
 
String getSearching ()
 
void setSearching (String searching)
 
Set< AxParticipationgetParticipations ()
 
void setParticipations (Set< AxParticipation > participations)
 
Set< AxDescriptorgetDescriptors ()
 
void setDescriptors (Set< AxDescriptor > descriptors)
 
AxCategory getCategory ()
 
void setCategory (AxCategory category)
 
String getSourceLink ()
 
void setSourceLink (String sourceLink)
 
String getFriendlyName ()
 
Set< AxDescriptorgetSortedDescriptors ()
 
List< AxContactgetDrivers ()
 
List< AxContactgetBeneficiaries ()
 
List< AxContactgetOfferers ()
 
List< AxContactgetConsortium ()
 
List< AxContactgetCoordinators ()
 
List< AxContactgetFunding ()
 
List< AxContactgetResearch ()
 
List< AxContactgetSupport ()
 
List< AxParticipationgetDriverParticipations ()
 
List< AxParticipationgetBeneficiaryParticipations ()
 
List< AxParticipationgetOffererParticipations ()
 
List< AxParticipationgetConsortiumParticipations ()
 
List< AxParticipationgetCoordinatorParticipations ()
 
List< AxParticipationgetFundingParticipations ()
 
List< AxParticipationgetResearchParticipations ()
 
List< AxParticipationgetSupportParticipations ()
 
List< AxAllianceParticipationgetAllianceParticipations ()
 
List< AxAllianceParticipationgetBeneficiaryAxParticipations ()
 
List< AxAllianceParticipationgetOffererAxParticipations ()
 
List< AxAllianceParticipationgetConsortiumAxParticipations ()
 
PhaseDefinition getPhase ()
 
Object entityId ()
 
boolean isEmpty ()
 
String toJson ()
 
String toJson (Map< String, Object > properties)
 
int hashCode ()
 
boolean equals (Object obj)
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Static Public Member Functions

static AxProject from (long memberId, WsServer server, Dossier dossier, AxProjectCategory pc)
 
static AxProject from (long memberId, ImporterRegister register)
 
static AxProject fromJson (JsonValue value)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 60 of file AxProject.java.

Member Function Documentation

◆ entityId()

Object org.turro.alliance.db.entities.AxProject.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 349 of file AxProject.java.

349  {
350  return projectId;
351  }

◆ equals()

boolean org.turro.alliance.db.entities.AxProject.equals ( Object  obj)

Definition at line 385 of file AxProject.java.

385  {
386  if (this == obj) {
387  return true;
388  }
389  if (obj == null) {
390  return false;
391  }
392  if (getClass() != obj.getClass()) {
393  return false;
394  }
395  final AxProject other = (AxProject) obj;
396  return Objects.equals(this.projectId, other.projectId);
397  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from() [1/2]

static AxProject org.turro.alliance.db.entities.AxProject.from ( long  memberId,
ImporterRegister  register 
)
static

Definition at line 330 of file AxProject.java.

330  {
331  AxProject axp = new AxProject();
332  ProcedenceId id = new ProcedenceId();
333  id.setMemberId(memberId);
334  id.setEntityId(register.getString("projectId"));
335  axp.setProjectId(id);
336  axp.setCreation(register.getDate("creation"));
337  axp.setPhaseIndex(register.getInteger("phaseIndex"));
338  axp.setCode(register.getString("projectCode"));
339  axp.setName(register.getString("name"));
340  axp.setSummary(register.getString("summary"));
341  axp.setCategoryId(register.getLong("categoryId"));
342  axp.setSourceLink(register.getString("source"));
343  return axp;
344  }
Here is the call graph for this function:

◆ from() [2/2]

static AxProject org.turro.alliance.db.entities.AxProject.from ( long  memberId,
WsServer  server,
Dossier  dossier,
AxProjectCategory  pc 
)
static

Definition at line 311 of file AxProject.java.

311  {
312  AxProject axp = new AxProject();
313  ProcedenceId id = new ProcedenceId();
314  id.setMemberId(memberId);
315  id.setEntityId(Long.toString(dossier.getId()));
316  axp.setProjectId(id);
317  axp.setCreation(dossier.getCreation());
318  axp.setPhaseIndex(PhaseDefinitions.instance().getMapping(dossier.getProject().getPhase(), server.getServerStrId()));
319  axp.setCode(dossier.getProject().getProjectCode());
320  axp.setName(dossier.getProject().getProjectTitle());
321  axp.setSummary(dossier.getProject().getGoal());
322  axp.setSearching(dossier.getSearching());
323  axp.setCategoryId(pc.getCategoryId());
324  axp.setSourceLink(ElephantContext.getServerUrl("http") + Entities.getController(dossier).getEntityUrl());
325  axp.setParticipations(AxParticipation.from(memberId, dossier));
326  axp.setDescriptors(AxDescriptor.from(axp, dossier));
327  return axp;
328  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromJson()

static AxProject org.turro.alliance.db.entities.AxProject.fromJson ( JsonValue  value)
static

Definition at line 371 of file AxProject.java.

371  {
372  return IJSONizable.fromJson(value.toString(), AxProject.class);
373  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllianceParticipations()

List<AxAllianceParticipation> org.turro.alliance.db.entities.AxProject.getAllianceParticipations ( )

Definition at line 280 of file AxProject.java.

280  {
281  if(allianceParticipations == null) {
282  allianceParticipations = SqlClause.select("p").from("AxAllianceParticipation p")
283  .where().equal("mainEntityId", projectId.getEntityId())
284  .and().equal("mainMemberId", projectId.getMemberId())
285  .dao(new AlliancePU())
286  .resultList(AxAllianceParticipation.class);
287  }
288  return allianceParticipations;
289  }
Here is the caller graph for this function:

◆ getBeneficiaries()

List<AxContact> org.turro.alliance.db.entities.AxProject.getBeneficiaries ( )

Definition at line 209 of file AxProject.java.

209  {
210  return getParticipations().stream().filter(p -> p.isBeneficiary())
211  .map(p -> p.getContact()).toList();
212  }
Set< AxParticipation > getParticipations()
Definition: AxProject.java:160
Here is the call graph for this function:

◆ getBeneficiaryAxParticipations()

List<AxAllianceParticipation> org.turro.alliance.db.entities.AxProject.getBeneficiaryAxParticipations ( )

Definition at line 291 of file AxProject.java.

291  {
292  return getAllianceParticipations().stream().filter(p -> p.isBeneficiary()).toList();
293  }
List< AxAllianceParticipation > getAllianceParticipations()
Definition: AxProject.java:280
Here is the call graph for this function:

◆ getBeneficiaryParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getBeneficiaryParticipations ( )

Definition at line 248 of file AxProject.java.

248  {
249  return getParticipations().stream().filter(p -> p.isBeneficiary()).toList();
250  }
Here is the call graph for this function:

◆ getCategory()

AxCategory org.turro.alliance.db.entities.AxProject.getCategory ( )

Definition at line 176 of file AxProject.java.

176  {
177  return new AlliancePU().find(AxCategory.class, categoryId);
178  }
Here is the caller graph for this function:

◆ getCategoryId()

Long org.turro.alliance.db.entities.AxProject.getCategoryId ( )

Definition at line 100 of file AxProject.java.

100  {
101  return categoryId;
102  }

◆ getCode()

String org.turro.alliance.db.entities.AxProject.getCode ( )

Definition at line 128 of file AxProject.java.

128  {
129  return code;
130  }

◆ getConsortium()

List<AxContact> org.turro.alliance.db.entities.AxProject.getConsortium ( )

Definition at line 219 of file AxProject.java.

219  {
220  return getParticipations().stream().filter(p -> p.isConsortium())
221  .map(p -> p.getContact()).toList();
222  }
Here is the call graph for this function:

◆ getConsortiumAxParticipations()

List<AxAllianceParticipation> org.turro.alliance.db.entities.AxProject.getConsortiumAxParticipations ( )

Definition at line 299 of file AxProject.java.

299  {
300  return getAllianceParticipations().stream().filter(p -> p.isConsortium()).toList();
301  }
Here is the call graph for this function:

◆ getConsortiumParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getConsortiumParticipations ( )

Definition at line 256 of file AxProject.java.

256  {
257  return getParticipations().stream().filter(p -> p.isConsortium()).toList();
258  }
Here is the call graph for this function:

◆ getCoordinatorParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getCoordinatorParticipations ( )

Definition at line 260 of file AxProject.java.

260  {
261  return getParticipations().stream().filter(p -> p.isCoordinator()).toList();
262  }
Here is the call graph for this function:

◆ getCoordinators()

List<AxContact> org.turro.alliance.db.entities.AxProject.getCoordinators ( )

Definition at line 224 of file AxProject.java.

224  {
225  return getParticipations().stream().filter(p -> p.isCoordinator())
226  .map(p -> p.getContact()).toList();
227  }
Here is the call graph for this function:

◆ getCreation()

Date org.turro.alliance.db.entities.AxProject.getCreation ( )

Definition at line 112 of file AxProject.java.

112  {
113  return creation;
114  }

◆ getDescriptors()

Set<AxDescriptor> org.turro.alliance.db.entities.AxProject.getDescriptors ( )

Definition at line 168 of file AxProject.java.

168  {
169  return descriptors;
170  }
Here is the caller graph for this function:

◆ getDriverParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getDriverParticipations ( )

Definition at line 244 of file AxProject.java.

244  {
245  return getParticipations().stream().filter(p -> p.isDriver()).toList();
246  }
Here is the call graph for this function:

◆ getDrivers()

List<AxContact> org.turro.alliance.db.entities.AxProject.getDrivers ( )

Definition at line 204 of file AxProject.java.

204  {
205  return getParticipations().stream().filter(p -> p.isDriver())
206  .map(p -> p.getContact()).toList();
207  }
Here is the call graph for this function:

◆ getFriendlyName()

String org.turro.alliance.db.entities.AxProject.getFriendlyName ( )

Definition at line 192 of file AxProject.java.

192  {
193  return Phrases.start(code, name).toString();
194  }

◆ getFunding()

List<AxContact> org.turro.alliance.db.entities.AxProject.getFunding ( )

Definition at line 229 of file AxProject.java.

229  {
230  return getParticipations().stream().filter(p -> p.isFunding())
231  .map(p -> p.getContact()).toList();
232  }
Here is the call graph for this function:

◆ getFundingParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getFundingParticipations ( )

Definition at line 264 of file AxProject.java.

264  {
265  return getParticipations().stream().filter(p -> p.isFunding()).toList();
266  }
Here is the call graph for this function:

◆ getId()

String org.turro.alliance.db.entities.AxProject.getId ( )

Definition at line 108 of file AxProject.java.

108  {
109  return id;
110  }
Here is the caller graph for this function:

◆ getName()

String org.turro.alliance.db.entities.AxProject.getName ( )

Definition at line 136 of file AxProject.java.

136  {
137  return name;
138  }
Here is the caller graph for this function:

◆ getOffererAxParticipations()

List<AxAllianceParticipation> org.turro.alliance.db.entities.AxProject.getOffererAxParticipations ( )

Definition at line 295 of file AxProject.java.

295  {
296  return getAllianceParticipations().stream().filter(p -> p.isOfferer()).toList();
297  }
Here is the call graph for this function:

◆ getOffererParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getOffererParticipations ( )

Definition at line 252 of file AxProject.java.

252  {
253  return getParticipations().stream().filter(p -> p.isOfferer()).toList();
254  }
Here is the call graph for this function:

◆ getOfferers()

List<AxContact> org.turro.alliance.db.entities.AxProject.getOfferers ( )

Definition at line 214 of file AxProject.java.

214  {
215  return getParticipations().stream().filter(p -> p.isOfferer())
216  .map(p -> p.getContact()).toList();
217  }
Here is the call graph for this function:

◆ getParticipations()

Set<AxParticipation> org.turro.alliance.db.entities.AxProject.getParticipations ( )

Definition at line 160 of file AxProject.java.

160  {
161  return participations;
162  }
Here is the caller graph for this function:

◆ getPhase()

PhaseDefinition org.turro.alliance.db.entities.AxProject.getPhase ( )

Definition at line 305 of file AxProject.java.

305  {
306  return AlliancePhaseDefinitions.instance().get(phaseIndex);
307  }
Here is the call graph for this function:

◆ getPhaseIndex()

int org.turro.alliance.db.entities.AxProject.getPhaseIndex ( )

Definition at line 120 of file AxProject.java.

120  {
121  return phaseIndex;
122  }

◆ getProjectId()

ProcedenceId org.turro.alliance.db.entities.AxProject.getProjectId ( )

Definition at line 92 of file AxProject.java.

92  {
93  return projectId;
94  }
Here is the caller graph for this function:

◆ getResearch()

List<AxContact> org.turro.alliance.db.entities.AxProject.getResearch ( )

Definition at line 234 of file AxProject.java.

234  {
235  return getParticipations().stream().filter(p -> p.isResearch())
236  .map(p -> p.getContact()).toList();
237  }
Here is the call graph for this function:

◆ getResearchParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getResearchParticipations ( )

Definition at line 268 of file AxProject.java.

268  {
269  return getParticipations().stream().filter(p -> p.isResearch()).toList();
270  }
Here is the call graph for this function:

◆ getSearching()

String org.turro.alliance.db.entities.AxProject.getSearching ( )

Definition at line 152 of file AxProject.java.

152  {
153  return searching;
154  }

◆ getSortedDescriptors()

Set<AxDescriptor> org.turro.alliance.db.entities.AxProject.getSortedDescriptors ( )

Definition at line 198 of file AxProject.java.

198  {
199  return new TreeSet<>(descriptors);
200  }

◆ getSourceLink()

String org.turro.alliance.db.entities.AxProject.getSourceLink ( )

Definition at line 184 of file AxProject.java.

184  {
185  return sourceLink;
186  }

◆ getSummary()

String org.turro.alliance.db.entities.AxProject.getSummary ( )

Definition at line 144 of file AxProject.java.

144  {
145  return summary;
146  }
Here is the caller graph for this function:

◆ getSupport()

List<AxContact> org.turro.alliance.db.entities.AxProject.getSupport ( )

Definition at line 239 of file AxProject.java.

239  {
240  return getParticipations().stream().filter(p -> p.isSupport())
241  .map(p -> p.getContact()).toList();
242  }
Here is the call graph for this function:

◆ getSupportParticipations()

List<AxParticipation> org.turro.alliance.db.entities.AxProject.getSupportParticipations ( )

Definition at line 272 of file AxProject.java.

272  {
273  return getParticipations().stream().filter(p -> p.isSupport()).toList();
274  }
Here is the call graph for this function:

◆ hashCode()

int org.turro.alliance.db.entities.AxProject.hashCode ( )

Definition at line 378 of file AxProject.java.

378  {
379  int hash = 3;
380  hash = 79 * hash + Objects.hashCode(this.projectId);
381  return hash;
382  }

◆ isEmpty()

boolean org.turro.alliance.db.entities.AxProject.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 354 of file AxProject.java.

354  {
355  return projectId.isEmpty() ||
356  Strings.isBlank(name);
357  }

◆ setCategory()

void org.turro.alliance.db.entities.AxProject.setCategory ( AxCategory  category)

Definition at line 180 of file AxProject.java.

180  {
181  categoryId = category.getCategoryId();
182  }
Here is the call graph for this function:

◆ setCategoryId()

void org.turro.alliance.db.entities.AxProject.setCategoryId ( Long  categoryId)

Definition at line 104 of file AxProject.java.

104  {
105  this.categoryId = categoryId;
106  }
Here is the caller graph for this function:

◆ setCode()

void org.turro.alliance.db.entities.AxProject.setCode ( String  code)

Definition at line 132 of file AxProject.java.

132  {
133  this.code = code;
134  }
Here is the caller graph for this function:

◆ setCreation()

void org.turro.alliance.db.entities.AxProject.setCreation ( Date  creation)

Definition at line 116 of file AxProject.java.

116  {
117  this.creation = creation;
118  }
Here is the caller graph for this function:

◆ setDescriptors()

void org.turro.alliance.db.entities.AxProject.setDescriptors ( Set< AxDescriptor descriptors)

Definition at line 172 of file AxProject.java.

172  {
173  this.descriptors = descriptors;
174  }
Here is the caller graph for this function:

◆ setName()

void org.turro.alliance.db.entities.AxProject.setName ( String  name)

Definition at line 140 of file AxProject.java.

140  {
141  this.name = name;
142  }
Here is the caller graph for this function:

◆ setParticipations()

void org.turro.alliance.db.entities.AxProject.setParticipations ( Set< AxParticipation participations)

Definition at line 164 of file AxProject.java.

164  {
165  this.participations = participations;
166  }
Here is the caller graph for this function:

◆ setPhaseIndex()

void org.turro.alliance.db.entities.AxProject.setPhaseIndex ( int  phaseIndex)

Definition at line 124 of file AxProject.java.

124  {
125  this.phaseIndex = phaseIndex;
126  }
Here is the caller graph for this function:

◆ setProjectId()

void org.turro.alliance.db.entities.AxProject.setProjectId ( ProcedenceId  projectId)

Definition at line 96 of file AxProject.java.

96  {
97  this.projectId = projectId;
98  }
Here is the caller graph for this function:

◆ setSearching()

void org.turro.alliance.db.entities.AxProject.setSearching ( String  searching)

Definition at line 156 of file AxProject.java.

156  {
157  this.searching = searching;
158  }
Here is the caller graph for this function:

◆ setSourceLink()

void org.turro.alliance.db.entities.AxProject.setSourceLink ( String  sourceLink)

Definition at line 188 of file AxProject.java.

188  {
189  this.sourceLink = sourceLink;
190  }
Here is the caller graph for this function:

◆ setSummary()

void org.turro.alliance.db.entities.AxProject.setSummary ( String  summary)

Definition at line 148 of file AxProject.java.

148  {
149  this.summary = summary;
150  }
Here is the caller graph for this function:

◆ toJson() [1/2]

String org.turro.alliance.db.entities.AxProject.toJson ( )

Definition at line 362 of file AxProject.java.

362  {
363  return toJson(this);
364  }
Here is the caller graph for this function:

◆ toJson() [2/2]

String org.turro.alliance.db.entities.AxProject.toJson ( Map< String, Object >  properties)

Definition at line 367 of file AxProject.java.

367  {
368  return toJson(this, properties);
369  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: