/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ipmreader;

import java.io.Serializable;
import java.util.Date;
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.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author paul
 */
@Entity
@Table(name = "IPMFileHistory")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "IPMFileHistory.findAll", query = "SELECT i FROM IPMFileHistory i"),
    @NamedQuery(name = "IPMFileHistory.findById", query = "SELECT i FROM IPMFileHistory i WHERE i.id = :id"),
    @NamedQuery(name = "IPMFileHistory.findByIPMFileName", query = "SELECT i FROM IPMFileHistory i WHERE i.iPMFileName = :iPMFileName"),
    @NamedQuery(name = "IPMFileHistory.findByFileID", query = "SELECT i FROM IPMFileHistory i WHERE i.fileID = :fileID"),
    @NamedQuery(name = "IPMFileHistory.findByFileProcessDate", query = "SELECT i FROM IPMFileHistory i WHERE i.fileProcessDate = :fileProcessDate"),
    @NamedQuery(name = "IPMFileHistory.findByReceived", query = "SELECT i FROM IPMFileHistory i WHERE i.received = :received"),
    @NamedQuery(name = "IPMFileHistory.findByFirstPresentment", query = "SELECT i FROM IPMFileHistory i WHERE i.firstPresentment = :firstPresentment"),
    @NamedQuery(name = "IPMFileHistory.findBySecondPresentment", query = "SELECT i FROM IPMFileHistory i WHERE i.secondPresentment = :secondPresentment"),
    @NamedQuery(name = "IPMFileHistory.findByFeeCollection", query = "SELECT i FROM IPMFileHistory i WHERE i.feeCollection = :feeCollection"),
    @NamedQuery(name = "IPMFileHistory.findByChargeBack", query = "SELECT i FROM IPMFileHistory i WHERE i.chargeBack = :chargeBack"),
    @NamedQuery(name = "IPMFileHistory.findByCurrencyUpdate", query = "SELECT i FROM IPMFileHistory i WHERE i.currencyUpdate = :currencyUpdate"),
    @NamedQuery(name = "IPMFileHistory.findByFileCurrencySummary", query = "SELECT i FROM IPMFileHistory i WHERE i.fileCurrencySummary = :fileCurrencySummary"),
    @NamedQuery(name = "IPMFileHistory.findByFinancialDetailAddendum", query = "SELECT i FROM IPMFileHistory i WHERE i.financialDetailAddendum = :financialDetailAddendum"),
    @NamedQuery(name = "IPMFileHistory.findByFinancialPosition", query = "SELECT i FROM IPMFileHistory i WHERE i.financialPosition = :financialPosition"),
    @NamedQuery(name = "IPMFileHistory.findByFundsTransferFeeCollection", query = "SELECT i FROM IPMFileHistory i WHERE i.fundsTransferFeeCollection = :fundsTransferFeeCollection"),
    @NamedQuery(name = "IPMFileHistory.findByMessageExceptionFileReject", query = "SELECT i FROM IPMFileHistory i WHERE i.messageExceptionFileReject = :messageExceptionFileReject"),
    @NamedQuery(name = "IPMFileHistory.findByRetrievalRequest", query = "SELECT i FROM IPMFileHistory i WHERE i.retrievalRequest = :retrievalRequest"),
    @NamedQuery(name = "IPMFileHistory.findBySettlementPositionDetail", query = "SELECT i FROM IPMFileHistory i WHERE i.settlementPositionDetail = :settlementPositionDetail"),
    @NamedQuery(name = "IPMFileHistory.findByTextMessage", query = "SELECT i FROM IPMFileHistory i WHERE i.textMessage = :textMessage"),
    @NamedQuery(name = "IPMFileHistory.findByTotalCount", query = "SELECT i FROM IPMFileHistory i WHERE i.totalCount = :totalCount"),
    @NamedQuery(name = "IPMFileHistory.findByFlCompleted", query = "SELECT i FROM IPMFileHistory i WHERE i.flCompleted = :flCompleted"),
    @NamedQuery(name = "IPMFileHistory.findByMatchingStatus", query = "SELECT i FROM IPMFileHistory i WHERE i.matchingStatus = :matchingStatus"),
    @NamedQuery(name = "IPMFileHistory.findByMatchingCompletedDate", query = "SELECT i FROM IPMFileHistory i WHERE i.matchingCompletedDate = :matchingCompletedDate"),
    @NamedQuery(name = "IPMFileHistory.findBySource", query = "SELECT i FROM IPMFileHistory i WHERE i.source = :source")})
public class IPMFileHistory implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "IPMFileName")
    private String iPMFileName;
    @Column(name = "FileID")
    private String fileID;
    @Basic(optional = false)
    @Column(name = "FileProcessDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fileProcessDate;
    @Basic(optional = false)
    @Column(name = "Received")
    private boolean received;
    @Basic(optional = false)
    @Column(name = "FirstPresentment")
    private int firstPresentment;
    @Basic(optional = false)
    @Column(name = "SecondPresentment")
    private int secondPresentment;
    @Basic(optional = false)
    @Column(name = "FeeCollection")
    private int feeCollection;
    @Basic(optional = false)
    @Column(name = "ChargeBack")
    private int chargeBack;
    @Basic(optional = false)
    @Column(name = "CurrencyUpdate")
    private int currencyUpdate;
    @Basic(optional = false)
    @Column(name = "FileCurrencySummary")
    private int fileCurrencySummary;
    @Basic(optional = false)
    @Column(name = "FinancialDetailAddendum")
    private int financialDetailAddendum;
    @Basic(optional = false)
    @Column(name = "FinancialPosition")
    private int financialPosition;
    @Basic(optional = false)
    @Column(name = "FundsTransferFeeCollection")
    private int fundsTransferFeeCollection;
    @Basic(optional = false)
    @Column(name = "MessageExceptionFileReject")
    private int messageExceptionFileReject;
    @Basic(optional = false)
    @Column(name = "RetrievalRequest")
    private int retrievalRequest;
    @Basic(optional = false)
    @Column(name = "SettlementPositionDetail")
    private int settlementPositionDetail;
    @Basic(optional = false)
    @Column(name = "TextMessage")
    private int textMessage;
    @Basic(optional = false)
    @Column(name = "TotalCount")
    private int totalCount;
    @Column(name = "flCompleted")
    private Short flCompleted;
    @Basic(optional = false)
    @Column(name = "MatchingStatus")
    private short matchingStatus;
    @Column(name = "MatchingCompletedDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date matchingCompletedDate;
    @Column(name = "Source")
    private String source;

    public IPMFileHistory() {
    }

    public IPMFileHistory(Integer id) {
        this.id = id;
    }

    public IPMFileHistory(Integer id, Date fileProcessDate, boolean received, int firstPresentment, int secondPresentment, int feeCollection, int chargeBack, int currencyUpdate, int fileCurrencySummary, int financialDetailAddendum, int financialPosition, int fundsTransferFeeCollection, int messageExceptionFileReject, int retrievalRequest, int settlementPositionDetail, int textMessage, int totalCount, short matchingStatus) {
        this.id = id;
        this.fileProcessDate = fileProcessDate;
        this.received = received;
        this.firstPresentment = firstPresentment;
        this.secondPresentment = secondPresentment;
        this.feeCollection = feeCollection;
        this.chargeBack = chargeBack;
        this.currencyUpdate = currencyUpdate;
        this.fileCurrencySummary = fileCurrencySummary;
        this.financialDetailAddendum = financialDetailAddendum;
        this.financialPosition = financialPosition;
        this.fundsTransferFeeCollection = fundsTransferFeeCollection;
        this.messageExceptionFileReject = messageExceptionFileReject;
        this.retrievalRequest = retrievalRequest;
        this.settlementPositionDetail = settlementPositionDetail;
        this.textMessage = textMessage;
        this.totalCount = totalCount;
        this.matchingStatus = matchingStatus;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIPMFileName() {
        return iPMFileName;
    }

    public void setIPMFileName(String iPMFileName) {
        this.iPMFileName = iPMFileName;
    }

    public String getFileID() {
        return fileID;
    }

    public void setFileID(String fileID) {
        this.fileID = fileID;
    }

    public Date getFileProcessDate() {
        return fileProcessDate;
    }

    public void setFileProcessDate(Date fileProcessDate) {
        this.fileProcessDate = fileProcessDate;
    }

    public boolean getReceived() {
        return received;
    }

    public void setReceived(boolean received) {
        this.received = received;
    }

    public int getFirstPresentment() {
        return firstPresentment;
    }

    public void setFirstPresentment(int firstPresentment) {
        this.firstPresentment = firstPresentment;
    }

    public int getSecondPresentment() {
        return secondPresentment;
    }

    public void setSecondPresentment(int secondPresentment) {
        this.secondPresentment = secondPresentment;
    }

    public int getFeeCollection() {
        return feeCollection;
    }

    public void setFeeCollection(int feeCollection) {
        this.feeCollection = feeCollection;
    }

    public int getChargeBack() {
        return chargeBack;
    }

    public void setChargeBack(int chargeBack) {
        this.chargeBack = chargeBack;
    }

    public int getCurrencyUpdate() {
        return currencyUpdate;
    }

    public void setCurrencyUpdate(int currencyUpdate) {
        this.currencyUpdate = currencyUpdate;
    }

    public int getFileCurrencySummary() {
        return fileCurrencySummary;
    }

    public void setFileCurrencySummary(int fileCurrencySummary) {
        this.fileCurrencySummary = fileCurrencySummary;
    }

    public int getFinancialDetailAddendum() {
        return financialDetailAddendum;
    }

    public void setFinancialDetailAddendum(int financialDetailAddendum) {
        this.financialDetailAddendum = financialDetailAddendum;
    }

    public int getFinancialPosition() {
        return financialPosition;
    }

    public void setFinancialPosition(int financialPosition) {
        this.financialPosition = financialPosition;
    }

    public int getFundsTransferFeeCollection() {
        return fundsTransferFeeCollection;
    }

    public void setFundsTransferFeeCollection(int fundsTransferFeeCollection) {
        this.fundsTransferFeeCollection = fundsTransferFeeCollection;
    }

    public int getMessageExceptionFileReject() {
        return messageExceptionFileReject;
    }

    public void setMessageExceptionFileReject(int messageExceptionFileReject) {
        this.messageExceptionFileReject = messageExceptionFileReject;
    }

    public int getRetrievalRequest() {
        return retrievalRequest;
    }

    public void setRetrievalRequest(int retrievalRequest) {
        this.retrievalRequest = retrievalRequest;
    }

    public int getSettlementPositionDetail() {
        return settlementPositionDetail;
    }

    public void setSettlementPositionDetail(int settlementPositionDetail) {
        this.settlementPositionDetail = settlementPositionDetail;
    }

    public int getTextMessage() {
        return textMessage;
    }

    public void setTextMessage(int textMessage) {
        this.textMessage = textMessage;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public Short getFlCompleted() {
        return flCompleted;
    }

    public void setFlCompleted(Short flCompleted) {
        this.flCompleted = flCompleted;
    }

    public short getMatchingStatus() {
        return matchingStatus;
    }

    public void setMatchingStatus(short matchingStatus) {
        this.matchingStatus = matchingStatus;
    }

    public Date getMatchingCompletedDate() {
        return matchingCompletedDate;
    }

    public void setMatchingCompletedDate(Date matchingCompletedDate) {
        this.matchingCompletedDate = matchingCompletedDate;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

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

    @Override
    public String toString() {
        return "ipmreader.IPMFileHistory[ id=" + id + " ]";
    }
    
}
