/*
 * 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 javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
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 = "AMP")
@NamedQueries({@NamedQuery(name = "Amp.findAll", query = "SELECT a FROM Amp a"),
@NamedQuery(name = "Amp.findByAmpid", query = "SELECT a FROM Amp a WHERE a.ampid = :ampid"),
@NamedQuery(name = "Amp.findByCommid", query = "SELECT a FROM Amp a WHERE a.commid = :commid"),
@NamedQuery(name = "Amp.findByDatetime", query = "SELECT a FROM Amp a WHERE a.datetime = :datetime"),
@NamedQuery(name = "Amp.findBySta", query = "SELECT a FROM Amp a WHERE a.sta = :sta"),
@NamedQuery(name = "Amp.findByNet", query = "SELECT a FROM Amp a WHERE a.net = :net"),
@NamedQuery(name = "Amp.findByAuth", query = "SELECT a FROM Amp a WHERE a.auth = :auth"),
@NamedQuery(name = "Amp.findBySubsource", query = "SELECT a FROM Amp a WHERE a.subsource = :subsource"),
@NamedQuery(name = "Amp.findByChannel", query = "SELECT a FROM Amp a WHERE a.channel = :channel"),
@NamedQuery(name = "Amp.findByChannelsrc", query = "SELECT a FROM Amp a WHERE a.channelsrc = :channelsrc"),
@NamedQuery(name = "Amp.findBySeedchan", query = "SELECT a FROM Amp a WHERE a.seedchan = :seedchan"),
@NamedQuery(name = "Amp.findByLocation", query = "SELECT a FROM Amp a WHERE a.location = :location"),
@NamedQuery(name = "Amp.findByIphase", query = "SELECT a FROM Amp a WHERE a.iphase = :iphase"),
@NamedQuery(name = "Amp.findByAmplitude", query = "SELECT a FROM Amp a WHERE a.amplitude = :amplitude"),
@NamedQuery(name = "Amp.findByAmptype", query = "SELECT a FROM Amp a WHERE a.amptype = :amptype"),
@NamedQuery(name = "Amp.findByUnits", query = "SELECT a FROM Amp a WHERE a.units = :units"),
@NamedQuery(name = "Amp.findByAmpmeas", query = "SELECT a FROM Amp a WHERE a.ampmeas = :ampmeas"),
@NamedQuery(name = "Amp.findByEramp", query = "SELECT a FROM Amp a WHERE a.eramp = :eramp"),
@NamedQuery(name = "Amp.findByFlagamp", query = "SELECT a FROM Amp a WHERE a.flagamp = :flagamp"),
@NamedQuery(name = "Amp.findByPer", query = "SELECT a FROM Amp a WHERE a.per = :per"),
@NamedQuery(name = "Amp.findBySnr", query = "SELECT a FROM Amp a WHERE a.snr = :snr"),
@NamedQuery(name = "Amp.findByTau", query = "SELECT a FROM Amp a WHERE a.tau = :tau"),
@NamedQuery(name = "Amp.findByQuality", query = "SELECT a FROM Amp a WHERE a.quality = :quality"),
@NamedQuery(name = "Amp.findByRflag", query = "SELECT a FROM Amp a WHERE a.rflag = :rflag"),
@NamedQuery(name = "Amp.findByCflag", query = "SELECT a FROM Amp a WHERE a.cflag = :cflag"),
@NamedQuery(name = "Amp.findByWstart", query = "SELECT a FROM Amp a WHERE a.wstart = :wstart"),
@NamedQuery(name = "Amp.findByDuration", query = "SELECT a FROM Amp a WHERE a.duration = :duration"),
@NamedQuery(name = "Amp.findByLddate", query = "SELECT a FROM Amp a WHERE a.lddate = :lddate")})
public class Amp implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "AMPID")
    private Long ampid;
    @Column(name = "COMMID")
    private Long commid;
    @Basic(optional = false)
    @Column(name = "DATETIME")
    private BigDecimal datetime;
    @Basic(optional = false)
    @Column(name = "STA")
    private String sta;
    @Column(name = "NET")
    private String net;
    @Basic(optional = false)
    @Column(name = "AUTH")
    private String auth;
    @Column(name = "SUBSOURCE")
    private String subsource;
    @Column(name = "CHANNEL")
    private String channel;
    @Column(name = "CHANNELSRC")
    private String channelsrc;
    @Column(name = "SEEDCHAN")
    private String seedchan;
    @Column(name = "LOCATION")
    private String location;
    @Column(name = "IPHASE")
    private String iphase;
    @Basic(optional = false)
    @Column(name = "AMPLITUDE")
    private double amplitude;
    @Column(name = "AMPTYPE")
    private String amptype;
    @Basic(optional = false)
    @Column(name = "UNITS")
    private String units;
    @Column(name = "AMPMEAS")
    private String ampmeas;
    @Column(name = "ERAMP")
    private BigDecimal eramp;
    @Column(name = "FLAGAMP")
    private String flagamp;
    @Column(name = "PER")
    private BigDecimal per;
    @Column(name = "SNR")
    private Double snr;
    @Column(name = "TAU")
    private BigDecimal tau;
    @Column(name = "QUALITY")
    private BigDecimal quality;
    @Column(name = "RFLAG")
    private String rflag;
    @Column(name = "CFLAG")
    private String cflag;
    @Basic(optional = false)
    @Column(name = "WSTART")
    private double wstart;
    @Basic(optional = false)
    @Column(name = "DURATION")
    private double duration;
    @Column(name = "LDDATE")
    @Temporal(TemporalType.DATE)
    private Date lddate;

    public Amp() {
    }

    public Amp(Long ampid) {
        this.ampid = ampid;
    }

    public Amp(Long ampid, BigDecimal datetime, String sta, String auth, double amplitude, String units, double wstart, double duration) {
        this.ampid = ampid;
        this.datetime = datetime;
        this.sta = sta;
        this.auth = auth;
        this.amplitude = amplitude;
        this.units = units;
        this.wstart = wstart;
        this.duration = duration;
    }

    public Long getAmpid() {
        return ampid;
    }

    public void setAmpid(Long ampid) {
        this.ampid = ampid;
    }

    public Long getCommid() {
        return commid;
    }

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

    public BigDecimal getDatetime() {
        return datetime;
    }

    public void setDatetime(BigDecimal datetime) {
        this.datetime = datetime;
    }

    public String getSta() {
        return sta;
    }

    public void setSta(String sta) {
        this.sta = sta;
    }

    public String getNet() {
        return net;
    }

    public void setNet(String net) {
        this.net = net;
    }

    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 getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getChannelsrc() {
        return channelsrc;
    }

    public void setChannelsrc(String channelsrc) {
        this.channelsrc = channelsrc;
    }

    public String getSeedchan() {
        return seedchan;
    }

    public void setSeedchan(String seedchan) {
        this.seedchan = seedchan;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getIphase() {
        return iphase;
    }

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

    public double getAmplitude() {
        return amplitude;
    }

    public void setAmplitude(double amplitude) {
        this.amplitude = amplitude;
    }

    public String getAmptype() {
        return amptype;
    }

    public void setAmptype(String amptype) {
        this.amptype = amptype;
    }

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        this.units = units;
    }

    public String getAmpmeas() {
        return ampmeas;
    }

    public void setAmpmeas(String ampmeas) {
        this.ampmeas = ampmeas;
    }

    public BigDecimal getEramp() {
        return eramp;
    }

    public void setEramp(BigDecimal eramp) {
        this.eramp = eramp;
    }

    public String getFlagamp() {
        return flagamp;
    }

    public void setFlagamp(String flagamp) {
        this.flagamp = flagamp;
    }

    public BigDecimal getPer() {
        return per;
    }

    public void setPer(BigDecimal per) {
        this.per = per;
    }

    public Double getSnr() {
        return snr;
    }

    public void setSnr(Double snr) {
        this.snr = snr;
    }

    public BigDecimal getTau() {
        return tau;
    }

    public void setTau(BigDecimal tau) {
        this.tau = tau;
    }

    public BigDecimal getQuality() {
        return quality;
    }

    public void setQuality(BigDecimal quality) {
        this.quality = quality;
    }

    public String getRflag() {
        return rflag;
    }

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

    public String getCflag() {
        return cflag;
    }

    public void setCflag(String cflag) {
        this.cflag = cflag;
    }

    public double getWstart() {
        return wstart;
    }

    public void setWstart(double wstart) {
        this.wstart = wstart;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    public Date getLddate() {
        return lddate;
    }

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

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

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

}
