19 package org.turro.students.entities;
21 import java.util.Date;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.GenerationType;
26 import javax.persistence.Id;
27 import javax.persistence.Lob;
28 import javax.persistence.Temporal;
29 import org.turro.string.Strings;
30 import org.turro.action.Contacts;
31 import org.turro.html.HtmlContent;
32 import org.turro.jpa.entity.IDaoEntity;
33 import org.turro.parser.wiki.WikiCompiler;
34 import org.turro.plugin.contacts.IContact;
35 import org.turro.reflection.MappingSet;
45 @GeneratedValue(strategy=GenerationType.IDENTITY)
46 @Column(name=
"IDENTIFIER")
55 @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
56 private java.util.Date creation, startDate, endDate;
58 private double hours, price;
60 private String zipCode, relatedURL;
62 private String idContact, idResponsible;
64 private boolean immediate, published;
111 this.creation = creation;
119 this.startDate = startDate;
127 this.endDate = endDate;
151 this.zipCode = zipCode;
159 this.relatedURL = relatedURL;
167 this.idContact = idContact;
171 return idResponsible;
175 this.idResponsible = idResponsible;
183 this.immediate = immediate;
191 this.published = published;
204 if(Strings.isEmpty(wiki) && !Strings.isEmpty(text)) {
224 return Strings.isBlank(title) || Strings.isBlank(text) || role ==
null ||
225 Strings.isBlank(type) || Strings.isBlank(idContact) || Strings.isBlank(idResponsible);
231 return HtmlContent.text(
getText());
253 if(contact !=
null) idContact = contact.
getId();
257 if(responsible !=
null) idResponsible = responsible.
getId();
263 MappingSet
set =
new MappingSet();
265 new String[] {
"title",
"creation",
"startDate",
"endDate",
"role",
"type",
"published" },
266 new String[] {
"hours",
"price",
"zipCode",
"text",
"relatedURL",
"idContact",
"idResponsible" });
void setIdResponsible(String idResponsible)
void setStartDate(Date startDate)
void setPrice(double price)
void setEndDate(Date endDate)
void setRole(PracticalWorkRole role)
String getIdResponsible()
boolean isInBusiness(IContact worker)
void setCreation(Date creation)
IContact getIResponsible()
void setTitle(String title)
void setRelatedURL(String relatedURL)
void setText(String text)
void setIContact(IContact contact)
void setType(String type)
PracticalWorkRole getRole()
void setImmediate(boolean immediate)
void setZipCode(String zipCode)
void setHours(double hours)
void setWiki(String wiki)
void setIdContact(String idContact)
MappingSet getSerializerMappings()
void setIResponsible(IContact responsible)
void setPublished(boolean published)