19 package org.turro.elephant.entities.db;
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.JoinColumn;
28 import javax.persistence.ManyToOne;
29 import javax.persistence.Temporal;
30 import org.turro.action.Contacts;
31 import org.turro.plugin.contacts.IContact;
41 @GeneratedValue(strategy=GenerationType.IDENTITY)
42 @Column(name=
"IDENTIFIER")
45 private String idContact;
48 @JoinColumn(name=
"AGREEMENT_FK")
51 @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
52 private java.util.Date signedDate;
54 private boolean agreed;
56 private int sentCount;
71 this.idContact = idContact;
79 this.agreement = agreement;
87 this.signedDate = signedDate;
103 this.sentCount = sentCount;
113 return (signedDate !=
null);
117 return (signedDate !=
null) && agreed;
121 return sentCount == 0 || ((sentCount < 10) && agreement.isPeremptory());
void setIdContact(String idContact)
void setAgreed(boolean agreed)
void setAgreement(Agreement agreement)
void setSentCount(int sentCount)
void setSignedDate(Date signedDate)