19 package org.turro.alliance.db.entities;
21 import java.io.Serializable;
23 import java.util.Objects;
24 import javax.json.JsonValue;
25 import javax.persistence.EmbeddedId;
26 import javax.persistence.Entity;
27 import org.hibernate.annotations.Formula;
28 import org.turro.action.Contacts;
29 import org.turro.contacts.BusinessRelation;
30 import org.turro.elephant.context.ElephantContext;
31 import org.turro.jpa.entity.IDaoEntity;
32 import org.turro.json.IJSONizable;
33 import org.turro.plugin.contacts.IContact;
34 import org.turro.plugin.contacts.IContactRelation;
35 import org.turro.string.Phrases;
36 import org.turro.string.Strings;
47 @Formula(
"concat(entityId,'##',memberId)")
50 private String name, email;
51 private String center, course;
52 private String face, centerFace;
54 private boolean active;
61 this.studentId = studentId;
113 this.centerFace = centerFace;
121 this.active = active;
127 if(!Strings.isBlank(contactId)) {
137 id.setMemberId(memberId);
138 id.setEntityId(contact.
getId());
167 return studentId.isEmpty() ||
168 Strings.isBlank(name);
179 public String
toJson(Map<String, Object> properties) {
180 return toJson(
this, properties);
192 hash = 83 * hash + Objects.hashCode(this.studentId);
204 if (getClass() != obj.getClass()) {
208 return Objects.
equals(this.studentId, other.studentId);
void setEmail(String email)
void setActive(boolean active)
static AxStudent from(long memberId, String contactId)
void setCourse(String course)
static AxStudent fromJson(JsonValue value)
void setFace(String face)
void setName(String name)
boolean equals(Object obj)
ProcedenceId getStudentId()
String toJson(Map< String, Object > properties)
void setCenter(String center)
void setCenterFace(String centerFace)
void setStudentId(ProcedenceId studentId)
static AxStudent from(long memberId, IContact contact)
static String getServerUrl(String scheme)