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

Public Member Functions

RelationId getRelation ()
 
void setRelation (RelationId relation)
 
Date getCreation ()
 
void setCreation (Date creation)
 
boolean isDriver ()
 
void setDriver (boolean driver)
 
boolean isCoordinator ()
 
void setCoordinator (boolean coordinator)
 
boolean isBeneficiary ()
 
void setBeneficiary (boolean beneficiary)
 
boolean isOfferer ()
 
void setOfferer (boolean offerer)
 
boolean isResearch ()
 
void setResearch (boolean research)
 
boolean isFunding ()
 
void setFunding (boolean funding)
 
boolean isSupport ()
 
void setSupport (boolean support)
 
boolean isConsortium ()
 
void setConsortium (boolean consortium)
 
boolean isAdmin ()
 
void setAdmin (boolean admin)
 
String getCompany ()
 
void setCompany (String company)
 
String getCompanyFace ()
 
void setCompanyFace (String companyFace)
 
AxProject getProject ()
 
AxContact getContact ()
 
AllianceContact getIContact ()
 
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 Set< AxParticipationfrom (long memberId, Dossier dossier)
 
static AxParticipation from (long memberId, ImporterRegister register)
 
static AxParticipation fromJson (JsonValue value)
 

Detailed Description

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

Definition at line 47 of file AxParticipation.java.

Member Function Documentation

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 241 of file AxParticipation.java.

241  {
242  return relation;
243  }

◆ equals()

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

Definition at line 274 of file AxParticipation.java.

274  {
275  if (this == obj) {
276  return true;
277  }
278  if (obj == null) {
279  return false;
280  }
281  if (getClass() != obj.getClass()) {
282  return false;
283  }
284  final AxParticipation other = (AxParticipation) obj;
285  return Objects.equals(this.relation, other.relation);
286  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from() [1/2]

static Set<AxParticipation> org.turro.alliance.db.entities.AxParticipation.from ( long  memberId,
Dossier  dossier 
)
static

Definition at line 180 of file AxParticipation.java.

180  {
181  AxParticipationSet participations = new AxParticipationSet();
182  dossier.getFullParticipants().forEach(participant -> {
183  RelationId relation = new RelationId();
184  relation.setMainEntityId(Long.toString(dossier.getId()));
185  relation.setMainMemberId(memberId);
186  relation.setRelatedEntityId(participant.getIdContact());
187  relation.setRelatedMemberId(memberId);
188  AxParticipation participation = new AxParticipation();
189  participation.setRelation(relation);
190  participation.setCreation(participant.getCreation());
191  participation.setAdmin(participant.isAdmin());
192  participation.setBeneficiary(participant.isBeneficiary());
193  participation.setConsortium(participant.isConsortium());
194  participation.setCoordinator(participant.isCoordinator());
195  participation.setDriver(participant.isDriver());
196  participation.setFunding(participant.isFunding());
197  participation.setOfferer(participant.isOfferer());
198  participation.setResearch(participant.isResearch());
199  participation.setSupport(participant.isSupport());
200  IContactRelation cr = participant.getIContact().getCompanyRelations()
201  .date(participant.getCreation()).getCompanyRelation();
202  if(cr != null) {
203  IContact business = cr.getRelatedIContact();
204  participation.setCompany(business.getName());
205  if(!Strings.isBlank(business.getFace())) {
206  String serverURL = ElephantContext.getServerUrl("http");
207  participation.setCompanyFace(serverURL + business.getFace());
208  }
209  }
210  participations.add(participation);
211  });
212  return participations;
213  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from() [2/2]

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

Definition at line 215 of file AxParticipation.java.

215  {
216  RelationId relation = new RelationId();
217  relation.setMainEntityId(register.getString("projectId"));
218  relation.setMainMemberId(memberId);
219  relation.setRelatedEntityId(register.getString("contactId"));
220  relation.setRelatedMemberId(memberId);
221  AxParticipation participation = new AxParticipation();
222  participation.setRelation(relation);
223  participation.setCreation(register.getDate("creation"));
224  participation.setAdmin(register.getBoolean("admin"));
225  participation.setBeneficiary(register.getBoolean("beneficiary"));
226  participation.setConsortium(register.getBoolean("consortium"));
227  participation.setCoordinator(register.getBoolean("coordinator"));
228  participation.setDriver(register.getBoolean("driver"));
229  participation.setFunding(register.getBoolean("funding"));
230  participation.setOfferer(register.getBoolean("offerer"));
231  participation.setResearch(register.getBoolean("research"));
232  participation.setSupport(register.getBoolean("support"));
233  participation.setCompany(register.getString("company"));
234  participation.setCompanyFace(register.getString("companyFace"));
235  return participation;
236  }
Here is the call graph for this function:

◆ fromJson()

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

Definition at line 262 of file AxParticipation.java.

262  {
263  return IJSONizable.fromJson(value.toString(), AxParticipation.class);
264  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCompany()

String org.turro.alliance.db.entities.AxParticipation.getCompany ( )

Definition at line 146 of file AxParticipation.java.

146  {
147  return company;
148  }

◆ getCompanyFace()

String org.turro.alliance.db.entities.AxParticipation.getCompanyFace ( )

Definition at line 154 of file AxParticipation.java.

154  {
155  return companyFace;
156  }

◆ getContact()

AxContact org.turro.alliance.db.entities.AxParticipation.getContact ( )

Definition at line 170 of file AxParticipation.java.

170  {
171  return new AlliancePU().find(AxContact.class, relation.getRelatedProcedenceId());
172  }
Here is the caller graph for this function:

◆ getCreation()

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

Definition at line 66 of file AxParticipation.java.

66  {
67  return creation;
68  }

◆ getIContact()

AllianceContact org.turro.alliance.db.entities.AxParticipation.getIContact ( )

Definition at line 174 of file AxParticipation.java.

174  {
175  return new AllianceContact(getContact());
176  }
Here is the call graph for this function:

◆ getProject()

AxProject org.turro.alliance.db.entities.AxParticipation.getProject ( )

Definition at line 164 of file AxParticipation.java.

164  {
165  return new AlliancePU().find(AxProject.class, relation.getMainProcedenceId());
166  }

◆ getRelation()

RelationId org.turro.alliance.db.entities.AxParticipation.getRelation ( )

Definition at line 58 of file AxParticipation.java.

58  {
59  return relation;
60  }

◆ hashCode()

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

Definition at line 267 of file AxParticipation.java.

267  {
268  int hash = 3;
269  hash = 97 * hash + Objects.hashCode(this.relation);
270  return hash;
271  }

◆ isAdmin()

boolean org.turro.alliance.db.entities.AxParticipation.isAdmin ( )

Definition at line 138 of file AxParticipation.java.

138  {
139  return admin;
140  }
Here is the caller graph for this function:

◆ isBeneficiary()

boolean org.turro.alliance.db.entities.AxParticipation.isBeneficiary ( )

Definition at line 90 of file AxParticipation.java.

90  {
91  return beneficiary;
92  }
Here is the caller graph for this function:

◆ isConsortium()

boolean org.turro.alliance.db.entities.AxParticipation.isConsortium ( )

Definition at line 130 of file AxParticipation.java.

130  {
131  return consortium;
132  }
Here is the caller graph for this function:

◆ isCoordinator()

boolean org.turro.alliance.db.entities.AxParticipation.isCoordinator ( )

Definition at line 82 of file AxParticipation.java.

82  {
83  return coordinator;
84  }
Here is the caller graph for this function:

◆ isDriver()

boolean org.turro.alliance.db.entities.AxParticipation.isDriver ( )

Definition at line 74 of file AxParticipation.java.

74  {
75  return driver;
76  }
Here is the caller graph for this function:

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 246 of file AxParticipation.java.

246  {
247  return relation.isEmpty();
248  }

◆ isFunding()

boolean org.turro.alliance.db.entities.AxParticipation.isFunding ( )

Definition at line 114 of file AxParticipation.java.

114  {
115  return funding;
116  }
Here is the caller graph for this function:

◆ isOfferer()

boolean org.turro.alliance.db.entities.AxParticipation.isOfferer ( )

Definition at line 98 of file AxParticipation.java.

98  {
99  return offerer;
100  }
Here is the caller graph for this function:

◆ isResearch()

boolean org.turro.alliance.db.entities.AxParticipation.isResearch ( )

Definition at line 106 of file AxParticipation.java.

106  {
107  return research;
108  }
Here is the caller graph for this function:

◆ isSupport()

boolean org.turro.alliance.db.entities.AxParticipation.isSupport ( )

Definition at line 122 of file AxParticipation.java.

122  {
123  return support;
124  }
Here is the caller graph for this function:

◆ setAdmin()

void org.turro.alliance.db.entities.AxParticipation.setAdmin ( boolean  admin)

Definition at line 142 of file AxParticipation.java.

142  {
143  this.admin = admin;
144  }
Here is the caller graph for this function:

◆ setBeneficiary()

void org.turro.alliance.db.entities.AxParticipation.setBeneficiary ( boolean  beneficiary)

Definition at line 94 of file AxParticipation.java.

94  {
95  this.beneficiary = beneficiary;
96  }
Here is the caller graph for this function:

◆ setCompany()

void org.turro.alliance.db.entities.AxParticipation.setCompany ( String  company)

Definition at line 150 of file AxParticipation.java.

150  {
151  this.company = company;
152  }
Here is the caller graph for this function:

◆ setCompanyFace()

void org.turro.alliance.db.entities.AxParticipation.setCompanyFace ( String  companyFace)

Definition at line 158 of file AxParticipation.java.

158  {
159  this.companyFace = companyFace;
160  }
Here is the caller graph for this function:

◆ setConsortium()

void org.turro.alliance.db.entities.AxParticipation.setConsortium ( boolean  consortium)

Definition at line 134 of file AxParticipation.java.

134  {
135  this.consortium = consortium;
136  }
Here is the caller graph for this function:

◆ setCoordinator()

void org.turro.alliance.db.entities.AxParticipation.setCoordinator ( boolean  coordinator)

Definition at line 86 of file AxParticipation.java.

86  {
87  this.coordinator = coordinator;
88  }
Here is the caller graph for this function:

◆ setCreation()

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

Definition at line 70 of file AxParticipation.java.

70  {
71  this.creation = creation;
72  }
Here is the caller graph for this function:

◆ setDriver()

void org.turro.alliance.db.entities.AxParticipation.setDriver ( boolean  driver)

Definition at line 78 of file AxParticipation.java.

78  {
79  this.driver = driver;
80  }
Here is the caller graph for this function:

◆ setFunding()

void org.turro.alliance.db.entities.AxParticipation.setFunding ( boolean  funding)

Definition at line 118 of file AxParticipation.java.

118  {
119  this.funding = funding;
120  }
Here is the caller graph for this function:

◆ setOfferer()

void org.turro.alliance.db.entities.AxParticipation.setOfferer ( boolean  offerer)

Definition at line 102 of file AxParticipation.java.

102  {
103  this.offerer = offerer;
104  }
Here is the caller graph for this function:

◆ setRelation()

void org.turro.alliance.db.entities.AxParticipation.setRelation ( RelationId  relation)

Definition at line 62 of file AxParticipation.java.

62  {
63  this.relation = relation;
64  }
Here is the caller graph for this function:

◆ setResearch()

void org.turro.alliance.db.entities.AxParticipation.setResearch ( boolean  research)

Definition at line 110 of file AxParticipation.java.

110  {
111  this.research = research;
112  }
Here is the caller graph for this function:

◆ setSupport()

void org.turro.alliance.db.entities.AxParticipation.setSupport ( boolean  support)

Definition at line 126 of file AxParticipation.java.

126  {
127  this.support = support;
128  }
Here is the caller graph for this function:

◆ toJson() [1/2]

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

Definition at line 253 of file AxParticipation.java.

253  {
254  return toJson(this);
255  }
Here is the caller graph for this function:

◆ toJson() [2/2]

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

Definition at line 258 of file AxParticipation.java.

258  {
259  return toJson(this, properties);
260  }
Here is the call graph for this function:

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