/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TestRest;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author aparnab
 */
@Entity
@Table(name = "ASSOCARO")
@NamedQueries({@NamedQuery(name = "Assocaro.findAll", query = "SELECT a FROM Assocaro a"),
@NamedQuery(name = "Assocaro.findByOrid", query = "SELECT a FROM Assocaro a WHERE a.assocaroPK.orid = :orid"),
@NamedQuery(name = "Assocaro.findByArid", query = "SELECT a FROM Assocaro a WHERE a.assocaroPK.arid = :arid"),
@NamedQuery(name = "Assocaro.findByAridAndOrid", query = "SELECT a FROM Assocaro a WHERE a.assocaroPK.arid = :arid and a.assocaroPK.orid = :orid"),
@NamedQuery(name = "Assocaro.findByCommid", query = "SELECT a FROM Assocaro a WHERE a.commid = :commid"),
@NamedQuery(name = "Assocaro.findByAuth", query = "SELECT a FROM Assocaro a WHERE a.auth = :auth"),
@NamedQuery(name = "Assocaro.findBySubsource", query = "SELECT a FROM Assocaro a WHERE a.subsource = :subsource"),
@NamedQuery(name = "Assocaro.findByIphase", query = "SELECT a FROM Assocaro a WHERE a.iphase = :iphase"),
@NamedQuery(name = "Assocaro.findByImportance", query = "SELECT a FROM Assocaro a WHERE a.importance = :importance"),
@NamedQuery(name = "Assocaro.findByDelta", query = "SELECT a FROM Assocaro a WHERE a.delta = :delta"),
@NamedQuery(name = "Assocaro.findBySeaz", query = "SELECT a FROM Assocaro a WHERE a.seaz = :seaz"),
@NamedQuery(name = "Assocaro.findByInWgt", query = "SELECT a FROM Assocaro a WHERE a.inWgt = :inWgt"),
@NamedQuery(name = "Assocaro.findByWgt", query = "SELECT a FROM Assocaro a WHERE a.wgt = :wgt"),
@NamedQuery(name = "Assocaro.findByTimeres", query = "SELECT a FROM Assocaro a WHERE a.timeres = :timeres"),
@NamedQuery(name = "Assocaro.findByEma", query = "SELECT a FROM Assocaro a WHERE a.ema = :ema"),
@NamedQuery(name = "Assocaro.findBySlow", query = "SELECT a FROM Assocaro a WHERE a.slow = :slow"),
@NamedQuery(name = "Assocaro.findByVmodelid", query = "SELECT a FROM Assocaro a WHERE a.vmodelid = :vmodelid"),
@NamedQuery(name = "Assocaro.findByScorr", query = "SELECT a FROM Assocaro a WHERE a.scorr = :scorr"),
@NamedQuery(name = "Assocaro.findBySdelay", query = "SELECT a FROM Assocaro a WHERE a.sdelay = :sdelay"),
@NamedQuery(name = "Assocaro.findByRflag", query = "SELECT a FROM Assocaro a WHERE a.rflag = :rflag"),
@NamedQuery(name = "Assocaro.findByCcset", query = "SELECT a FROM Assocaro a WHERE a.ccset = :ccset"),
@NamedQuery(name = "Assocaro.findByLddate", query = "SELECT a FROM Assocaro a WHERE a.lddate = :lddate")})
public class Assocaro implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected AssocaroPK assocaroPK;
    @Column(name = "COMMID")
    private Long commid;
    @Column(name = "AUTH")
    private String auth;
    @Column(name = "SUBSOURCE")
    private String subsource;
    @Column(name = "IPHASE")
    private String iphase;
    @Column(name = "IMPORTANCE")
    private BigDecimal importance;
    @Column(name = "DELTA")
    private BigDecimal delta;
    @Column(name = "SEAZ")
    private BigDecimal seaz;
    @Column(name = "IN_WGT")
    private BigDecimal inWgt;
    @Column(name = "WGT")
    private BigDecimal wgt;
    @Column(name = "TIMERES")
    private BigDecimal timeres;
    @Column(name = "EMA")
    private BigDecimal ema;
    @Column(name = "SLOW")
    private BigDecimal slow;
    @Column(name = "VMODELID")
    private Short vmodelid;
    @Column(name = "SCORR")
    private BigDecimal scorr;
    @Column(name = "SDELAY")
    private BigDecimal sdelay;
    @Column(name = "RFLAG")
    private String rflag;
    @Column(name = "CCSET")
    private String ccset;
    @Column(name = "LDDATE")
    @Temporal(TemporalType.DATE)
    private Date lddate;
    @JoinColumn(name = "ARID", referencedColumnName = "ARID", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Arrival arrival;

    public Assocaro() {
    }

    public Assocaro(AssocaroPK assocaroPK) {
        this.assocaroPK = assocaroPK;
    }

    public Assocaro(long orid, long arid) {
        this.assocaroPK = new AssocaroPK(orid, arid);
    }

    public AssocaroPK getAssocaroPK() {
        return assocaroPK;
    }

    public void setAssocaroPK(AssocaroPK assocaroPK) {
        this.assocaroPK = assocaroPK;
    }

    public Long getCommid() {
        return commid;
    }

    public void setCommid(Long commid) {
        this.commid = commid;
    }

    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }

    public String getSubsource() {
        return subsource;
    }

    public void setSubsource(String subsource) {
        this.subsource = subsource;
    }

    public String getIphase() {
        return iphase;
    }

    public void setIphase(String iphase) {
        this.iphase = iphase;
    }

    public BigDecimal getImportance() {
        return importance;
    }

    public void setImportance(BigDecimal importance) {
        this.importance = importance;
    }

    public BigDecimal getDelta() {
        return delta;
    }

    public void setDelta(BigDecimal delta) {
        this.delta = delta;
    }

    public BigDecimal getSeaz() {
        return seaz;
    }

    public void setSeaz(BigDecimal seaz) {
        this.seaz = seaz;
    }

    public BigDecimal getInWgt() {
        return inWgt;
    }

    public void setInWgt(BigDecimal inWgt) {
        this.inWgt = inWgt;
    }

    public BigDecimal getWgt() {
        return wgt;
    }

    public void setWgt(BigDecimal wgt) {
        this.wgt = wgt;
    }

    public BigDecimal getTimeres() {
        return timeres;
    }

    public void setTimeres(BigDecimal timeres) {
        this.timeres = timeres;
    }

    public BigDecimal getEma() {
        return ema;
    }

    public void setEma(BigDecimal ema) {
        this.ema = ema;
    }

    public BigDecimal getSlow() {
        return slow;
    }

    public void setSlow(BigDecimal slow) {
        this.slow = slow;
    }

    public Short getVmodelid() {
        return vmodelid;
    }

    public void setVmodelid(Short vmodelid) {
        this.vmodelid = vmodelid;
    }

    public BigDecimal getScorr() {
        return scorr;
    }

    public void setScorr(BigDecimal scorr) {
        this.scorr = scorr;
    }

    public BigDecimal getSdelay() {
        return sdelay;
    }

    public void setSdelay(BigDecimal sdelay) {
        this.sdelay = sdelay;
    }

    public String getRflag() {
        return rflag;
    }

    public void setRflag(String rflag) {
        this.rflag = rflag;
    }

    public String getCcset() {
        return ccset;
    }

    public void setCcset(String ccset) {
        this.ccset = ccset;
    }

    public Date getLddate() {
        return lddate;
    }

    public void setLddate(Date lddate) {
        this.lddate = lddate;
    }

    public Arrival getArrival() {
        return arrival;
    }

    public void setArrival(Arrival arrival) {
        this.arrival = arrival;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (assocaroPK != null ? assocaroPK.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 Assocaro)) {
            return false;
        }
        Assocaro other = (Assocaro) object;
        if ((this.assocaroPK == null && other.assocaroPK != null) || (this.assocaroPK != null && !this.assocaroPK.equals(other.assocaroPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "TestRest.Assocaro[assocaroPK=" + assocaroPK + "]";
    }

}
