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

Public Member Functions

String getId ()
 
ProcedenceId getChallengeId ()
 
void setChallengeId (ProcedenceId challengeId)
 
Long getCategoryId ()
 
void setCategoryId (Long categoryId)
 
String getIdChallenger ()
 
void setIdChallenger (String idChallenger)
 
String getName ()
 
void setName (String name)
 
String getFace ()
 
void setFace (String face)
 
String getCompany ()
 
void setCompany (String company)
 
String getQuestion ()
 
void setQuestion (String question)
 
Date getCreation ()
 
void setCreation (Date creation)
 
Date getDeadline ()
 
void setDeadline (Date deadline)
 
String getText ()
 
void setText (String text)
 
AxTalentCategory getCategory ()
 
void setCategory (AxTalentCategory category)
 
String getSourceLink ()
 
void setSourceLink (String sourceLink)
 
Set< AxResponsegetResponses ()
 
void setResponses (Set< AxResponse > responses)
 
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 AxChallenge from (long memberId, WsServer server, Challenge challenge, AxChallengeCategory pc)
 
static AxChallenge fromJson (JsonValue value)
 

Detailed Description

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

Definition at line 56 of file AxChallenge.java.

Member Function Documentation

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 223 of file AxChallenge.java.

223  {
224  return challengeId;
225  }

◆ equals()

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

Definition at line 259 of file AxChallenge.java.

259  {
260  if (this == obj) {
261  return true;
262  }
263  if (obj == null) {
264  return false;
265  }
266  if (getClass() != obj.getClass()) {
267  return false;
268  }
269  final AxChallenge other = (AxChallenge) obj;
270  return Objects.equals(this.challengeId, other.challengeId);
271  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

static AxChallenge org.turro.alliance.db.entities.AxChallenge.from ( long  memberId,
WsServer  server,
Challenge  challenge,
AxChallengeCategory  pc 
)
static

Definition at line 199 of file AxChallenge.java.

199  {
200  AxChallenge axp = new AxChallenge();
201  ProcedenceId id = new ProcedenceId();
202  id.setMemberId(memberId);
203  id.setEntityId(Long.toString(challenge.getId()));
204  axp.setChallengeId(id);
205  axp.setCreation(challenge.getCreation());
206  axp.setDeadline(challenge.getDeadline());
207  axp.setCategoryId(pc.getCategoryId());
208  IContact challenger = challenge.getContact();
209  axp.setIdChallenger(challenger.getId());
210  axp.setName(challenger.getName());
211  axp.setFace(Faces.of(challenger).getUrl());
212  axp.setCompany(Relations.companies(challenger).date(challenge.getCreation()).getOptCompany().map(c -> c.getName()).orElse(null));
213  axp.setQuestion(challenge.getQuestion());
214  axp.setText(challenge.getText());
215  axp.setSourceLink(ElephantContext.getServerUrl("http") + Entities.getController(challenge).getEntityUrl());
216  axp.setResponses(AxResponse.from(memberId, challenge));
217  return axp;
218  }
Here is the call graph for this function:

◆ fromJson()

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

Definition at line 245 of file AxChallenge.java.

245  {
246  return IJSONizable.fromJson(value.toString(), AxChallenge.class);
247  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCategory()

AxTalentCategory org.turro.alliance.db.entities.AxChallenge.getCategory ( )

Definition at line 173 of file AxChallenge.java.

173  {
174  return new AlliancePU().find(AxTalentCategory.class, categoryId);
175  }
Here is the caller graph for this function:

◆ getCategoryId()

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

Definition at line 101 of file AxChallenge.java.

101  {
102  return categoryId;
103  }

◆ getChallengeId()

ProcedenceId org.turro.alliance.db.entities.AxChallenge.getChallengeId ( )

Definition at line 93 of file AxChallenge.java.

93  {
94  return challengeId;
95  }
Here is the caller graph for this function:

◆ getCompany()

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

Definition at line 133 of file AxChallenge.java.

133  {
134  return company;
135  }

◆ getCreation()

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

Definition at line 149 of file AxChallenge.java.

149  {
150  return creation;
151  }

◆ getDeadline()

Date org.turro.alliance.db.entities.AxChallenge.getDeadline ( )

Definition at line 157 of file AxChallenge.java.

157  {
158  return deadline;
159  }

◆ getFace()

String org.turro.alliance.db.entities.AxChallenge.getFace ( )

Definition at line 125 of file AxChallenge.java.

125  {
126  return face;
127  }

◆ getId()

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

Definition at line 89 of file AxChallenge.java.

89  {
90  return id;
91  }
Here is the caller graph for this function:

◆ getIdChallenger()

String org.turro.alliance.db.entities.AxChallenge.getIdChallenger ( )

Definition at line 109 of file AxChallenge.java.

109  {
110  return idChallenger;
111  }

◆ getName()

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

Definition at line 117 of file AxChallenge.java.

117  {
118  return name;
119  }
Here is the caller graph for this function:

◆ getQuestion()

String org.turro.alliance.db.entities.AxChallenge.getQuestion ( )

Definition at line 141 of file AxChallenge.java.

141  {
142  return question;
143  }
Here is the caller graph for this function:

◆ getResponses()

Set<AxResponse> org.turro.alliance.db.entities.AxChallenge.getResponses ( )

Definition at line 189 of file AxChallenge.java.

189  {
190  return responses;
191  }
Here is the caller graph for this function:

◆ getSourceLink()

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

Definition at line 181 of file AxChallenge.java.

181  {
182  return sourceLink;
183  }

◆ getText()

String org.turro.alliance.db.entities.AxChallenge.getText ( )

Definition at line 165 of file AxChallenge.java.

165  {
166  return text;
167  }

◆ hashCode()

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

Definition at line 252 of file AxChallenge.java.

252  {
253  int hash = 3;
254  hash = 79 * hash + Objects.hashCode(this.challengeId);
255  return hash;
256  }

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 228 of file AxChallenge.java.

228  {
229  return challengeId.isEmpty() ||
230  Strings.isBlank(name);
231  }

◆ setCategory()

void org.turro.alliance.db.entities.AxChallenge.setCategory ( AxTalentCategory  category)

Definition at line 177 of file AxChallenge.java.

177  {
178  categoryId = category.getCategoryId();
179  }
Here is the call graph for this function:

◆ setCategoryId()

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

Definition at line 105 of file AxChallenge.java.

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

◆ setChallengeId()

void org.turro.alliance.db.entities.AxChallenge.setChallengeId ( ProcedenceId  challengeId)

Definition at line 97 of file AxChallenge.java.

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

◆ setCompany()

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

Definition at line 137 of file AxChallenge.java.

137  {
138  this.company = company;
139  }
Here is the caller graph for this function:

◆ setCreation()

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

Definition at line 153 of file AxChallenge.java.

153  {
154  this.creation = creation;
155  }
Here is the caller graph for this function:

◆ setDeadline()

void org.turro.alliance.db.entities.AxChallenge.setDeadline ( Date  deadline)

Definition at line 161 of file AxChallenge.java.

161  {
162  this.deadline = deadline;
163  }
Here is the caller graph for this function:

◆ setFace()

void org.turro.alliance.db.entities.AxChallenge.setFace ( String  face)

Definition at line 129 of file AxChallenge.java.

129  {
130  this.face = face;
131  }
Here is the caller graph for this function:

◆ setIdChallenger()

void org.turro.alliance.db.entities.AxChallenge.setIdChallenger ( String  idChallenger)

Definition at line 113 of file AxChallenge.java.

113  {
114  this.idChallenger = idChallenger;
115  }
Here is the caller graph for this function:

◆ setName()

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

Definition at line 121 of file AxChallenge.java.

121  {
122  this.name = name;
123  }
Here is the caller graph for this function:

◆ setQuestion()

void org.turro.alliance.db.entities.AxChallenge.setQuestion ( String  question)

Definition at line 145 of file AxChallenge.java.

145  {
146  this.question = question;
147  }
Here is the caller graph for this function:

◆ setResponses()

void org.turro.alliance.db.entities.AxChallenge.setResponses ( Set< AxResponse responses)

Definition at line 193 of file AxChallenge.java.

193  {
194  this.responses = responses;
195  }
Here is the caller graph for this function:

◆ setSourceLink()

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

Definition at line 185 of file AxChallenge.java.

185  {
186  this.sourceLink = sourceLink;
187  }
Here is the caller graph for this function:

◆ setText()

void org.turro.alliance.db.entities.AxChallenge.setText ( String  text)

Definition at line 169 of file AxChallenge.java.

169  {
170  this.text = text;
171  }
Here is the caller graph for this function:

◆ toJson() [1/2]

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

Definition at line 236 of file AxChallenge.java.

236  {
237  return toJson(this);
238  }
Here is the caller graph for this function:

◆ toJson() [2/2]

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

Definition at line 241 of file AxChallenge.java.

241  {
242  return toJson(this, properties);
243  }
Here is the call graph for this function:

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