18 package org.turro.dossier.entity;
20 import java.util.Date;
21 import java.util.HashSet;
22 import java.util.Objects;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.GenerationType;
27 import javax.persistence.Id;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.ManyToOne;
30 import javax.persistence.Temporal;
31 import org.turro.action.Contacts;
32 import org.turro.jpa.entity.IDaoEntity;
33 import org.turro.plugin.contacts.IContact;
34 import org.turro.visual.RoleUtil;
44 @GeneratedValue(strategy=GenerationType.IDENTITY)
45 @Column(name=
"IDENTIFIER")
48 @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
49 private java.util.Date creation;
51 @Column(name=
"PARTICIPANT_NAME", nullable =
false)
54 private String idContact;
56 @Column(name=
"PARTICIPANT_ROLE")
59 private String discriminator;
61 private boolean showAllAttachments, showParticipants, showAllIssues, receiveAllEmails, bindingVote,
62 driver, coordinator, beneficiary, offerer, research, funding, support, consortium, admin;
65 @JoinColumn(name=
"DOSSIER_FK")
73 this.dossier = dossier;
90 this.creation = creation;
99 this.idContact = idContact;
114 return receiveAllEmails;
118 this.receiveAllEmails = receiveAllEmails;
129 showAllAttachments =
true;
130 showAllIssues =
true;
131 showParticipants =
true;
133 showAllAttachments =
false;
134 showAllIssues =
false;
135 showParticipants =
false;
136 receiveAllEmails =
false;
143 return discriminator;
147 this.discriminator = discriminator;
156 this.showAllAttachments = showAllAttachments;
165 this.showAllIssues = showAllIssues;
174 this.showParticipants = showParticipants;
183 this.bindingVote = bindingVote;
192 this.driver = driver;
201 this.coordinator = coordinator;
210 this.beneficiary = beneficiary;
219 this.offerer = offerer;
228 this.research = research;
237 this.funding = funding;
246 this.support = support;
255 this.consortium = consortium;
269 return driver || coordinator || beneficiary || offerer ||
270 research || funding || support || consortium || admin;
299 private transient IContact _contact, _company;
307 if(_contact ==
null) {
315 idContact = _contact !=
null ? _contact.
getId() :
null;
316 name = _contact !=
null ? _contact.
getName() :
null;
319 private void resetIContact() {
325 if(_company ==
null) {
336 hash = 71 * hash + Objects.hashCode(this.
id);
348 if (getClass() != obj.getClass()) {
352 return Objects.
equals(this.
id, other.id);
boolean isReceiveAllEmails()
boolean isShowAllIssues()
void setBindingVote(boolean bindingVote)
void setConsortium(boolean consortium)
void setResearch(boolean research)
void setReceiveAllEmails(boolean receiveAllEmails)
void setName(String name)
void setAdmin(boolean admin)
void setShowParticipants(boolean showParticipants)
void setDiscriminator(String discriminator)
boolean isShowAllAttachments()
boolean isShowParticipants()
void setCoordinator(boolean coordinator)
void setShowAllAttachments(boolean showAllAttachments)
void setIdContact(String idContact)
ParticipantRole getRole()
void setBeneficiary(boolean beneficiary)
IContact getIParticipant()
boolean equals(Object obj)
void setOfferer(boolean offerer)
void setCreation(Date creation)
void setFunding(boolean funding)
void setShowAllIssues(boolean showAllIssues)
void setSupport(boolean support)
void setIContact(IContact contact)
void setDossier(Dossier dossier)
String getDiscriminator()
HashSet< String > getStringRoles()
void setRole(ParticipantRole role)
void setDriver(boolean driver)
static HashSet< String > getStringRoles(IDossierParticipant dp)