document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package of.the.entities;
  2.  
  3. import java.io.Serializable;
  4. import java.math.BigDecimal;
  5. import java.util.List;
  6. import javax.persistence.Basic;
  7. import javax.persistence.Column;
  8. import javax.persistence.Entity;
  9. import javax.persistence.GeneratedValue;
  10. import javax.persistence.GenerationType;
  11. import javax.persistence.Id;
  12. import javax.persistence.ManyToMany;
  13. import javax.persistence.SequenceGenerator;
  14. import javax.persistence.Table;
  15. import javax.validation.constraints.NotNull;
  16. import javax.xml.bind.annotation.XmlRootElement;
  17.  
  18.  
  19. /**
  20.  *
  21.  * @author santiago.tapia
  22.  */
  23. @Entity
  24. @Table(name = "ANULACION")
  25. //IF YOU NEED JPA NamedQueries put them here.
  26. public class Anulacion implements Serializable {
  27.     private static final long serialVersionUID = 1L;
  28.     @Id
  29.     @Basic(optional = false)
  30.     @SequenceGenerator(name = "SEQ_FOR_MY_ENTITY", sequenceName = "SEQ_FOR_MY_ENTITY", allocationSize = 1/*, initialValue=1*/)
  31.     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_FOR_MY_ENTITY")
  32.     @NotNull
  33.     @Column(name = "ID")
  34.     private BigDecimal id;
  35.     @ManyToMany()
  36.     private List<Error1> err;
  37.    
  38.     public Anulacion() {
  39.     }
  40.  
  41.     public Anulacion(BigDecimal id) {
  42.         this.id = id;
  43.     }
  44.  
  45.     public BigDecimal getId() {
  46.         return id;
  47.     }
  48.  
  49.     public void setId(BigDecimal id) {
  50.         this.id = id;
  51.     }
  52.  
  53.     @XmlTransient
  54.     public List<Error1> getErr() {
  55.         return err;
  56.     }
  57.  
  58.     public void setErr(List<Error1> err) {
  59.         this.err = err;
  60.     }
  61.  
  62.    
  63.     @Override
  64.     public int hashCode() {
  65.         int hash = 0;
  66.         hash += (id != null ? id.hashCode() : 0);
  67.         return hash;
  68.     }
  69.  
  70.     @Override
  71.     public boolean equals(Object object) {
  72.         // TODO: Warning - this method won\'t work in the case the id fields are not set
  73.         if (!(object instanceof Anulacion)) {
  74.             return false;
  75.         }
  76.         Anulacion other = (Anulacion) object;
  77.         if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
  78.             return false;
  79.         }
  80.         return true;
  81.     }
  82.  
  83.     @Override
  84.     public String toString() {
  85.         return "Anulacion[ id=" + id + " ]";
  86.     }
  87.  
  88.    
  89. }
');