/*
* GestionRH
*
* Copyright (C) Maisel Team
*
* GestionRH is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* GestionRH is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cobertura; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
package metier;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import metier.core.Candidat;
/**
*
*
* @version 1.0
* @author Yohann lepage
* @author Alexandre Besnard
* @author Jonathan Morfin
* @author Quentin Rousseau
*/
@Entity
public class Convocation implements Serializable {
@Temporal(javax.persistence.TemporalType.DATE)
private Date datec;
private Boolean validation;
/*
* Type de la convocation : psycho ou entretien
*/
private String type;
@ManyToOne
private Candidat candidat;
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
public Convocation() {
}
public Convocation(Date datec, Candidat candidat) {
this.datec = datec;
this.validation = false;
this.candidat = candidat;
this.type = "psycho";
}
public Candidat getCandidat() {
return candidat;
}
public void setCandidat(Candidat candidat) {
this.candidat = candidat;
}
public Date getDatec() {
return datec;
}
public void setDatec(Date datec) {
this.datec = datec;
}
public Boolean getValidation() {
return validation;
}
public void setValidation(Boolean validation) {
this.validation = validation;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Convocation)) {
return false;
}
Convocation other = (Convocation) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "metier.Convocation[ id=" + id + " ]";
}
}