/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.onda.aixm.model; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToOne; import javax.persistence.Table; /** * * @author Administrateur */ @Entity @Table(name = "contactinformation") @NamedQueries({@NamedQuery(name = "Contactinformation.findAll", query = "SELECT c FROM Contactinformation c"), @NamedQuery(name = "Contactinformation.findByIdContactInformation", query = "SELECT c FROM Contactinformation c WHERE c.idContactInformation = :idContactInformation"), @NamedQuery(name = "Contactinformation.findByPostalAdress", query = "SELECT c FROM Contactinformation c WHERE c.postalAdress = :postalAdress"), @NamedQuery(name = "Contactinformation.findByOnlineContact", query = "SELECT c FROM Contactinformation c WHERE c.onlineContact = :onlineContact"), @NamedQuery(name = "Contactinformation.findByTelephoneContact", query = "SELECT c FROM Contactinformation c WHERE c.telephoneContact = :telephoneContact")}) public class Contactinformation implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "idContactInformation") private Integer idContactInformation; @Basic(optional = false) @Column(name = "postalAdress") @OneToOne private Postaladdress postalAdress; @Basic(optional = false) @Column(name = "OnlineContact") @OneToOne private Onlinecontact onlineContact; @Basic(optional = false) @Column(name = "TelephoneContact") @OneToOne private Telephonecontact telephoneContact; public Contactinformation() { } public Contactinformation(Integer idContactInformation, Postaladdress postalAdress, Onlinecontact onlineContact, Telephonecontact telephoneContact) { this.idContactInformation = idContactInformation; this.postalAdress = postalAdress; this.onlineContact = onlineContact; this.telephoneContact = telephoneContact; } public Integer getIdContactInformation() { return idContactInformation; } public void setIdContactInformation(Integer idContactInformation) { this.idContactInformation = idContactInformation; } public Postaladdress getPostalAdress() { return postalAdress; } public void setPostalAdress(Postaladdress postalAdress) { this.postalAdress = postalAdress; } public Onlinecontact getOnlineContact() { return onlineContact; } public void setOnlineContact(Onlinecontact onlineContact) { this.onlineContact = onlineContact; } public Telephonecontact getTelephoneContact() { return telephoneContact; } public void setTelephoneContact(Telephonecontact telephoneContact) { this.telephoneContact = telephoneContact; } @Override public int hashCode() { int hash = 0; hash += (idContactInformation != null ? idContactInformation.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 Contactinformation)) { return false; } Contactinformation other = (Contactinformation) object; if ((this.idContactInformation == null && other.idContactInformation != null) || (this.idContactInformation != null && !this.idContactInformation.equals(other.idContactInformation))) { return false; } return true; } @Override public String toString() { return "org.onda.aixm.model.Contactinformation[idContactInformation=" + idContactInformation + "]"; } }