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

Public Member Functions

ProcedenceId getStudentId ()
 
void setStudentId (ProcedenceId studentId)
 
String getId ()
 
String getName ()
 
void setName (String name)
 
String getEmail ()
 
void setEmail (String email)
 
String getCenter ()
 
void setCenter (String center)
 
String getCourse ()
 
void setCourse (String course)
 
String getFace ()
 
void setFace (String face)
 
String getCenterFace ()
 
void setCenterFace (String centerFace)
 
boolean isActive ()
 
void setActive (boolean active)
 
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 AxStudent from (long memberId, String contactId)
 
static AxStudent from (long memberId, IContact contact)
 
static AxStudent fromJson (JsonValue value)
 

Detailed Description

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

Definition at line 43 of file AxStudent.java.

Member Function Documentation

◆ entityId()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 161 of file AxStudent.java.

161  {
162  return studentId;
163  }

◆ equals()

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

Definition at line 197 of file AxStudent.java.

197  {
198  if (this == obj) {
199  return true;
200  }
201  if (obj == null) {
202  return false;
203  }
204  if (getClass() != obj.getClass()) {
205  return false;
206  }
207  final AxStudent other = (AxStudent) obj;
208  return Objects.equals(this.studentId, other.studentId);
209  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ from() [1/2]

static AxStudent org.turro.alliance.db.entities.AxStudent.from ( long  memberId,
IContact  contact 
)
static

Definition at line 133 of file AxStudent.java.

133  {
134  if(contact.isValid()) {
135  AxStudent axc = new AxStudent();
136  ProcedenceId id = new ProcedenceId();
137  id.setMemberId(memberId);
138  id.setEntityId(contact.getId());
139  axc.setStudentId(id);
140  axc.setName(contact.getName());
141  axc.setEmail(contact.getEmail());
142  axc.setActive(!contact.isDeactivated());
143  String serverURL = ElephantContext.getServerUrl("http");
144  axc.setFace(Strings.isBlank(contact.getFace()) ? null : serverURL + contact.getFace());
145  IContactRelation cr = contact.getCompanyRelations().getCompanyRelation();
146  if(cr != null) {
147  IContact business = cr.getRelatedIContact();
148  BusinessRelation br = (BusinessRelation) cr.getRelation();
149  axc.setCenter(business.getName());
150  axc.setCourse(Phrases.start(cr.getDatesString()).add(br.getDescription()).toString());
151  axc.setCenterFace(Strings.isBlank(business.getFace()) ? null : serverURL + business.getFace());
152  }
153  return axc;
154  }
155  return null;
156  }
Here is the call graph for this function:

◆ from() [2/2]

static AxStudent org.turro.alliance.db.entities.AxStudent.from ( long  memberId,
String  contactId 
)
static

Definition at line 126 of file AxStudent.java.

126  {
127  if(!Strings.isBlank(contactId)) {
128  return from(memberId, Contacts.getContactById(contactId));
129  }
130  return null;
131  }
static AxStudent from(long memberId, String contactId)
Definition: AxStudent.java:126
Here is the call graph for this function:

◆ fromJson()

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

Definition at line 183 of file AxStudent.java.

183  {
184  return IJSONizable.fromJson(value.toString(), AxStudent.class);
185  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCenter()

String org.turro.alliance.db.entities.AxStudent.getCenter ( )

Definition at line 84 of file AxStudent.java.

84  {
85  return center;
86  }

◆ getCenterFace()

String org.turro.alliance.db.entities.AxStudent.getCenterFace ( )

Definition at line 108 of file AxStudent.java.

108  {
109  return centerFace;
110  }

◆ getCourse()

String org.turro.alliance.db.entities.AxStudent.getCourse ( )

Definition at line 92 of file AxStudent.java.

92  {
93  return course;
94  }

◆ getEmail()

String org.turro.alliance.db.entities.AxStudent.getEmail ( )

Definition at line 76 of file AxStudent.java.

76  {
77  return email;
78  }

◆ getFace()

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

Definition at line 100 of file AxStudent.java.

100  {
101  return face;
102  }

◆ getId()

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

Definition at line 64 of file AxStudent.java.

64  {
65  return id;
66  }

◆ getName()

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

Definition at line 68 of file AxStudent.java.

68  {
69  return name;
70  }

◆ getStudentId()

ProcedenceId org.turro.alliance.db.entities.AxStudent.getStudentId ( )

Definition at line 56 of file AxStudent.java.

56  {
57  return studentId;
58  }

◆ hashCode()

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

Definition at line 190 of file AxStudent.java.

190  {
191  int hash = 7;
192  hash = 83 * hash + Objects.hashCode(this.studentId);
193  return hash;
194  }

◆ isActive()

boolean org.turro.alliance.db.entities.AxStudent.isActive ( )

Definition at line 116 of file AxStudent.java.

116  {
117  return active;
118  }

◆ isEmpty()

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

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 166 of file AxStudent.java.

166  {
167  return studentId.isEmpty() ||
168  Strings.isBlank(name);
169  }

◆ setActive()

void org.turro.alliance.db.entities.AxStudent.setActive ( boolean  active)

Definition at line 120 of file AxStudent.java.

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

◆ setCenter()

void org.turro.alliance.db.entities.AxStudent.setCenter ( String  center)

Definition at line 88 of file AxStudent.java.

88  {
89  this.center = center;
90  }
Here is the caller graph for this function:

◆ setCenterFace()

void org.turro.alliance.db.entities.AxStudent.setCenterFace ( String  centerFace)

Definition at line 112 of file AxStudent.java.

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

◆ setCourse()

void org.turro.alliance.db.entities.AxStudent.setCourse ( String  course)

Definition at line 96 of file AxStudent.java.

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

◆ setEmail()

void org.turro.alliance.db.entities.AxStudent.setEmail ( String  email)

Definition at line 80 of file AxStudent.java.

80  {
81  this.email = email;
82  }
Here is the caller graph for this function:

◆ setFace()

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

Definition at line 104 of file AxStudent.java.

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

◆ setName()

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

Definition at line 72 of file AxStudent.java.

72  {
73  this.name = name;
74  }
Here is the caller graph for this function:

◆ setStudentId()

void org.turro.alliance.db.entities.AxStudent.setStudentId ( ProcedenceId  studentId)

Definition at line 60 of file AxStudent.java.

60  {
61  this.studentId = studentId;
62  }
Here is the caller graph for this function:

◆ toJson() [1/2]

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

Definition at line 174 of file AxStudent.java.

174  {
175  return toJson(this);
176  }
Here is the caller graph for this function:

◆ toJson() [2/2]

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

Definition at line 179 of file AxStudent.java.

179  {
180  return toJson(this, properties);
181  }
Here is the call graph for this function:

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