SHARE
TWEET

Untitled

a guest Nov 24th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package hu.bluesystem.hrportal.model;
  6.  
  7. import java.io.Serializable;
  8. import java.util.Date;
  9. import javax.persistence.Basic;
  10. import javax.persistence.Column;
  11. import javax.persistence.EmbeddedId;
  12. import javax.persistence.Entity;
  13. import javax.persistence.ManyToOne;
  14. import javax.persistence.NamedQueries;
  15. import javax.persistence.NamedQuery;
  16. import javax.persistence.Table;
  17. import javax.xml.bind.annotation.XmlRootElement;
  18. import org.hibernate.annotations.JoinFormula;
  19.  
  20. /**
  21.  *
  22.  * @author user
  23.  */
  24. @Entity
  25. @Table(name = "HRP_BBMCHI07")
  26. @XmlRootElement
  27. @NamedQueries({
  28.     @NamedQuery(name = "HrpBbmchi07.findAll", query = "SELECT h FROM HrpBbmchi07 h"),
  29.     @NamedQuery(name = "HrpBbmchi07.findByCompany", query = "SELECT h FROM HrpBbmchi07 h WHERE h.hrpBbmchi07PK.company = :company"),
  30.     @NamedQuery(name = "HrpBbmchi07.findByValtdatum", query = "SELECT h FROM HrpBbmchi07 h WHERE h.hrpBbmchi07PK.valtdatum = :valtdatum"),
  31.     @NamedQuery(name = "HrpBbmchi07.findByFelettesneve", query = "SELECT h FROM HrpBbmchi07 h WHERE h.felettesneve = :felettesneve"),
  32.     @NamedQuery(name = "HrpBbmchi07.findByBbmBbstTorzsszam", query = "SELECT h FROM HrpBbmchi07 h WHERE h.hrpBbmchi07PK.bbmBbstTorzsszam = :bbmBbstTorzsszam"),
  33.     @NamedQuery(name = "HrpBbmchi07.findByFelettestorzsszam", query = "SELECT h FROM HrpBbmchi07 h WHERE h.felettestorzsszam = :felettestorzsszam")})
  34. public class HrpBbmchi07 implements Serializable {
  35.  
  36.     private static final long serialVersionUID = 1L;
  37.     @EmbeddedId
  38.     protected HrpBbmchi07PK hrpBbmchi07PK;
  39.     @Basic(optional = false)
  40.     @Column(name = "FELETTESNEVE")
  41.     private String felettesneve;
  42.     @Column(name = "FELETTESTORZSSZAM")
  43.     private Integer felettestorzsszam;
  44.  
  45.     @ManyToOne
  46.     @JoinFormula(
  47.             "(HRP_BBMCHI07.COMPANY = bbstorzs.COMPANY AND HRP_BBMCHI07.BBM_BBST_TORZSSZAM = bbstorzs.TORZSSZAM AND VALTDATUM in (select max(VALTDATUM) from HRP_BBMCHI07 F where F.FELETTESTORZSSZAM=FELETTESTORZSSZAM AND F.BBM_BBST_TORZSSZAM=BBM_BBST_TORZSSZAM AND F.COMPANY=COMPANY  group by valtdatum))"
  48.     )
  49.     HrpBbstorzs bbstorzs;
  50.  
  51.     public HrpBbmchi07() {
  52.     }
  53.  
  54.     public HrpBbmchi07(HrpBbmchi07PK hrpBbmchi07PK) {
  55.         this.hrpBbmchi07PK = hrpBbmchi07PK;
  56.     }
  57.  
  58.     public HrpBbmchi07(HrpBbmchi07PK hrpBbmchi07PK, String felettesneve) {
  59.         this.hrpBbmchi07PK = hrpBbmchi07PK;
  60.         this.felettesneve = felettesneve;
  61.     }
  62.  
  63.     public HrpBbmchi07(String company, Date valtdatum, int bbmBbstTorzsszam) {
  64.         this.hrpBbmchi07PK = new HrpBbmchi07PK(company, valtdatum, bbmBbstTorzsszam);
  65.     }
  66.  
  67.     public HrpBbmchi07PK getHrpBbmchi07PK() {
  68.         return hrpBbmchi07PK;
  69.     }
  70.  
  71.     public void setHrpBbmchi07PK(HrpBbmchi07PK hrpBbmchi07PK) {
  72.         this.hrpBbmchi07PK = hrpBbmchi07PK;
  73.     }
  74.  
  75.     public String getFelettesneve() {
  76.         return felettesneve;
  77.     }
  78.  
  79.     public void setFelettesneve(String felettesneve) {
  80.         this.felettesneve = felettesneve;
  81.     }
  82.  
  83.     public Integer getFelettestorzsszam() {
  84.         return felettestorzsszam;
  85.     }
  86.  
  87.     public void setFelettestorzsszam(Integer felettestorzsszam) {
  88.         this.felettestorzsszam = felettestorzsszam;
  89.     }
  90.  
  91.     public HrpBbstorzs getBbstorzs() {
  92.         return bbstorzs;
  93.     }
  94.  
  95.     public void setBbstorzs(HrpBbstorzs bbstorzs) {
  96.         this.bbstorzs = bbstorzs;
  97.     }
  98.  
  99.     @Override
  100.     public int hashCode() {
  101.         int hash = 0;
  102.         hash += (hrpBbmchi07PK != null ? hrpBbmchi07PK.hashCode() : 0);
  103.         return hash;
  104.     }
  105.  
  106.     @Override
  107.     public boolean equals(Object object) {
  108.         // TODO: Warning - this method won't work in the case the id fields are not set
  109.         if (!(object instanceof HrpBbmchi07)) {
  110.             return false;
  111.         }
  112.         HrpBbmchi07 other = (HrpBbmchi07) object;
  113.         if ((this.hrpBbmchi07PK == null && other.hrpBbmchi07PK != null) || (this.hrpBbmchi07PK != null && !this.hrpBbmchi07PK.equals(other.hrpBbmchi07PK))) {
  114.             return false;
  115.         }
  116.         return true;
  117.     }
  118.  
  119.     @Override
  120.     public String toString() {
  121.         return "hu.bluesystem.hrportal.model.HrpBbmchi07[ hrpBbmchi07PK=" + hrpBbmchi07PK + " ]";
  122.     }
  123.  
  124. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top