/*
 * 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 sv.com.fm.conta.business.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
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;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author usuario01
 */
@Entity
@Table(name = "BCO_CONCILIAD")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BcoConciliad.findAll", query = "SELECT b FROM BcoConciliad b"),
    @NamedQuery(name = "BcoConciliad.findByIdconciliad", query = "SELECT b FROM BcoConciliad b WHERE b.idconciliad = :idconciliad"),
    @NamedQuery(name = "BcoConciliad.findByFechaCobro", query = "SELECT b FROM BcoConciliad b WHERE b.fechaCobro = :fechaCobro"),
    @NamedQuery(name = "BcoConciliad.findByConciliado", query = "SELECT b FROM BcoConciliad b WHERE b.conciliado = :conciliado"),
    @NamedQuery(name = "BcoConciliad.findByCobradoPor", query = "SELECT b FROM BcoConciliad b WHERE b.cobradoPor = :cobradoPor")})
public class BcoConciliad implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDCONCILIAD")
    private Integer idconciliad;
    @Column(name = "FECHA_COBRO")
    @Temporal(TemporalType.DATE)
    private Date fechaCobro;
    @Column(name = "CONCILIADO")
    private Integer conciliado;
    @Size(max = 60)
    @Column(name = "COBRADO_POR")
    private String cobradoPor;
    @JoinColumn(name = "IDBMOVM", referencedColumnName = "IDBMOVM")
    @ManyToOne
    private BcoMovm idbmovm;
    @JoinColumn(name = "IDCONCILIAM", referencedColumnName = "IDCONCILIA")
    @ManyToOne(optional = false)
    private BcoConciliam idconciliam;

    public BcoConciliad() {
    }

    public BcoConciliad(Integer idconciliad) {
        this.idconciliad = idconciliad;
    }

    public Integer getIdconciliad() {
        return idconciliad;
    }

    public void setIdconciliad(Integer idconciliad) {
        this.idconciliad = idconciliad;
    }

    public Date getFechaCobro() {
        return fechaCobro;
    }

    public void setFechaCobro(Date fechaCobro) {
        this.fechaCobro = fechaCobro;
    }

    public Integer getConciliado() {
        return conciliado;
    }

    public void setConciliado(Integer conciliado) {
        this.conciliado = conciliado;
    }

    public String getCobradoPor() {
        return cobradoPor;
    }

    public void setCobradoPor(String cobradoPor) {
        this.cobradoPor = cobradoPor;
    }

    public BcoMovm getIdbmovm() {
        return idbmovm;
    }

    public void setIdbmovm(BcoMovm idbmovm) {
        this.idbmovm = idbmovm;
    }

    public BcoConciliam getIdconciliam() {
        return idconciliam;
    }

    public void setIdconciliam(BcoConciliam idconciliam) {
        this.idconciliam = idconciliam;
    }

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

    @Override
    public String toString() {
        return "sv.com.fm.conta.business.entity.BcoConciliad[ idconciliad=" + idconciliad + " ]";
    }
    
}
