package com.fitbank.hb.persistence.lote;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.lang.reflect.Field;
import com.fitbank.common.TransportBean;

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TLOTETRANSACCIONESPROCESO*/
public class Tprocesstransactionlote implements Serializable,TransportBean,Cloneable{
/** Nombre de la Tabla TLOTETRANSACCIONESPROCESO */
public static final String TABLE_NAME = "TLOTETRANSACCIONESPROCESO";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad Tprocesstransactionlote
*/
private TprocesstransactionloteKey pk;
/**
* Codigo de persona de la compania
*/
private Integer cpersona_compania;

/**
* Codigo del tipo de lote de transacciones
*/
private String ctipolote;

/**
* Codigo del usuario que procesa el lote de transacciones
*/
private String cusuario_proceso;

/**
* Fecha / hora en que se procesa el lote de transacciones
*/
private Date fproceso;

/**
* Numero de errores reportados al procesar el lote de transacciones
*/
private Integer numeroerroresproceso;

/**
* Codigo del usuario que reversa el lote de transacciones previamente procesado
*/
private String cusuario_reverso;

/**
* Fecha de reverso del lote de transacciones
*/
private Date freverso;

/**
* Numero de errores reportados al reversar el lote de transacciones
*/
private Integer numeroerroresreverso;

/**
* Indica el estado del proceso del lote: P = Procesado, N = No procesado, E = Lote en ejecucion
*/
private String estatus;

/**
* Indica el estado del proceso del reverso del lote: P = Proceso reversado, N = No se ha procesado el reverso, E = Ejecutando reverso del proceso
*/
private String estatusreverso;

/**
* Codigo del grupo de descuento de la nomina procesada en el lote
*/
private Integer cgrupodescuento;

/**
* Cuenta principal para el debito o credito total del lote a procesar
*/
private String ccuenta_principal;

/**
* Monto total registrado para el lote
*/
private BigDecimal totalregistrolote;

/**
* Monto total procesado en el lote
*/
private BigDecimal totalprocesolote;

/**
* Comentarios del proceso del lote
*/
private String comentarios;

/**Contructor por defecto*/
public Tprocesstransactionlote(){}
/**Contructor de Tprocesstransactionlote
@param pPk Clave Primaria del entity
@param pCpersona_compania Codigo de persona de la compania
@param pCtipolote Codigo del tipo de lote de transacciones
*/
public Tprocesstransactionlote(TprocesstransactionloteKey pPk,Integer pCpersona_compania,String pCtipolote){
 pk=pPk;
 cpersona_compania=pCpersona_compania;
 ctipolote=pCtipolote;
}
/**Entrega la Clave primaria de Tprocesstransactionlote
@return El objeto que referencia a la Clave primaria de Tprocesstransactionlote
*/
public TprocesstransactionloteKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de Tprocesstransactionlote
@param pPk El objeto que referencia a la nueva Clave primaria de Tprocesstransactionlote
*/
public void setPk(TprocesstransactionloteKey pPk){
  pk=pPk;
}
public static final String CPERSONA_COMPANIA="CPERSONA_COMPANIA";
/**Obtiene el valor de cpersona_compania
@return valor de cpersona_compania*/
public Integer getCpersona_compania(){
  return cpersona_compania;
}
/**Fija el valor de cpersona_compania
@param pCpersona_compania nuevo Valor de cpersona_compania*/
public void setCpersona_compania(Integer pCpersona_compania){
  cpersona_compania=pCpersona_compania;
}

public static final String CTIPOLOTE="CTIPOLOTE";
/**Obtiene el valor de ctipolote
@return valor de ctipolote*/
public String getCtipolote(){
  return ctipolote;
}
/**Fija el valor de ctipolote
@param pCtipolote nuevo Valor de ctipolote*/
public void setCtipolote(String pCtipolote){
  ctipolote=pCtipolote;
}

public static final String CUSUARIO_PROCESO="CUSUARIO_PROCESO";
/**Obtiene el valor de cusuario_proceso
@return valor de cusuario_proceso*/
public String getCusuario_proceso(){
  return cusuario_proceso;
}
/**Fija el valor de cusuario_proceso
@param pCusuario_proceso nuevo Valor de cusuario_proceso*/
public void setCusuario_proceso(String pCusuario_proceso){
  cusuario_proceso=pCusuario_proceso;
}

public static final String FPROCESO="FPROCESO";
/**Obtiene el valor de fproceso
@return valor de fproceso*/
public Date getFproceso(){
  return fproceso;
}
/**Fija el valor de fproceso
@param pFproceso nuevo Valor de fproceso*/
public void setFproceso(Date pFproceso){
  fproceso=pFproceso;
}

public static final String NUMEROERRORESPROCESO="NUMEROERRORESPROCESO";
/**Obtiene el valor de numeroerroresproceso
@return valor de numeroerroresproceso*/
public Integer getNumeroerroresproceso(){
  return numeroerroresproceso;
}
/**Fija el valor de numeroerroresproceso
@param pNumeroerroresproceso nuevo Valor de numeroerroresproceso*/
public void setNumeroerroresproceso(Integer pNumeroerroresproceso){
  numeroerroresproceso=pNumeroerroresproceso;
}

public static final String CUSUARIO_REVERSO="CUSUARIO_REVERSO";
/**Obtiene el valor de cusuario_reverso
@return valor de cusuario_reverso*/
public String getCusuario_reverso(){
  return cusuario_reverso;
}
/**Fija el valor de cusuario_reverso
@param pCusuario_reverso nuevo Valor de cusuario_reverso*/
public void setCusuario_reverso(String pCusuario_reverso){
  cusuario_reverso=pCusuario_reverso;
}

public static final String FREVERSO="FREVERSO";
/**Obtiene el valor de freverso
@return valor de freverso*/
public Date getFreverso(){
  return freverso;
}
/**Fija el valor de freverso
@param pFreverso nuevo Valor de freverso*/
public void setFreverso(Date pFreverso){
  freverso=pFreverso;
}

public static final String NUMEROERRORESREVERSO="NUMEROERRORESREVERSO";
/**Obtiene el valor de numeroerroresreverso
@return valor de numeroerroresreverso*/
public Integer getNumeroerroresreverso(){
  return numeroerroresreverso;
}
/**Fija el valor de numeroerroresreverso
@param pNumeroerroresreverso nuevo Valor de numeroerroresreverso*/
public void setNumeroerroresreverso(Integer pNumeroerroresreverso){
  numeroerroresreverso=pNumeroerroresreverso;
}

public static final String ESTATUS="ESTATUS";
/**Obtiene el valor de estatus
@return valor de estatus*/
public String getEstatus(){
  return estatus;
}
/**Fija el valor de estatus
@param pEstatus nuevo Valor de estatus*/
public void setEstatus(String pEstatus){
  estatus=pEstatus;
}

public static final String ESTATUSREVERSO="ESTATUSREVERSO";
/**Obtiene el valor de estatusreverso
@return valor de estatusreverso*/
public String getEstatusreverso(){
  return estatusreverso;
}
/**Fija el valor de estatusreverso
@param pEstatusreverso nuevo Valor de estatusreverso*/
public void setEstatusreverso(String pEstatusreverso){
  estatusreverso=pEstatusreverso;
}

public static final String CGRUPODESCUENTO="CGRUPODESCUENTO";
/**Obtiene el valor de cgrupodescuento
@return valor de cgrupodescuento*/
public Integer getCgrupodescuento(){
  return cgrupodescuento;
}
/**Fija el valor de cgrupodescuento
@param pCgrupodescuento nuevo Valor de cgrupodescuento*/
public void setCgrupodescuento(Integer pCgrupodescuento){
  cgrupodescuento=pCgrupodescuento;
}

public static final String CCUENTA_PRINCIPAL="CCUENTA_PRINCIPAL";
/**Obtiene el valor de ccuenta_principal
@return valor de ccuenta_principal*/
public String getCcuenta_principal(){
  return ccuenta_principal;
}
/**Fija el valor de ccuenta_principal
@param pCcuenta_principal nuevo Valor de ccuenta_principal*/
public void setCcuenta_principal(String pCcuenta_principal){
  ccuenta_principal=pCcuenta_principal;
}

public static final String TOTALREGISTROLOTE="TOTALREGISTROLOTE";
/**Obtiene el valor de totalregistrolote
@return valor de totalregistrolote*/
public BigDecimal getTotalregistrolote(){
  return totalregistrolote;
}
/**Fija el valor de totalregistrolote
@param pTotalregistrolote nuevo Valor de totalregistrolote*/
public void setTotalregistrolote(BigDecimal pTotalregistrolote){
  totalregistrolote=pTotalregistrolote;
}

public static final String TOTALPROCESOLOTE="TOTALPROCESOLOTE";
/**Obtiene el valor de totalprocesolote
@return valor de totalprocesolote*/
public BigDecimal getTotalprocesolote(){
  return totalprocesolote;
}
/**Fija el valor de totalprocesolote
@param pTotalprocesolote nuevo Valor de totalprocesolote*/
public void setTotalprocesolote(BigDecimal pTotalprocesolote){
  totalprocesolote=pTotalprocesolote;
}

public static final String COMENTARIOS="COMENTARIOS";
/**Obtiene el valor de comentarios
@return valor de comentarios*/
public String getComentarios(){
  return comentarios;
}
/**Fija el valor de comentarios
@param pComentarios nuevo Valor de comentarios*/
public void setComentarios(String pComentarios){
  comentarios=pComentarios;
}

/**Implementacion de la comparacion de la entidad Tprocesstransactionlote
@param rhs Elemento de Comparacion
@return el resultado de la comparacion
*/
public boolean equals(Object rhs){
    if (rhs == null){return false;}
    if (! (rhs instanceof Tprocesstransactionlote)){return false;}
    Tprocesstransactionlote that = (Tprocesstransactionlote) rhs;
    if (this.getPk() == null || that.getPk() == null){
        return false;}
    return (this.getPk().equals(that.getPk()));
}
/**Implementaci?n del metodo hashCode de la la entidad Tprocesstransactionlote
@return el hashCode la instancia
*/
public int hashCode()    {
    if (this.hashValue == 0){
        int result = 17;
        if (this.getPk() == null){
            result = super.hashCode();
        }else{
            result = this.getPk().hashCode();
        }
        this.hashValue = result;
    }
    return this.hashValue;
}
/**Implementaci?n toString
*/
public String toString() {
	Field[]fs=this.getClass().getDeclaredFields();
	String data="";
	for(Field f:fs){
	 try{	
	 String name=f.getName();
	 if(name.compareTo("hashValue")==0||name.compareTo("serialVersionUID")==0){continue;}
		data+=name+"="+f.get(this)+";";
	 }catch(Exception e){
		 continue;
	 }
		}
		if(data.compareTo("")==0){
		data=super.toString();
		}
	return data;
	}
/**Implementaci?n de la creaci?n de un bean en blancoTprocesstransactionlote
*/
public Object createInstance() throws Exception{
 Tprocesstransactionlote instance=new Tprocesstransactionlote();	
 instance.setPk(new TprocesstransactionloteKey());
 return instance;
}
public Object cloneMe() throws Exception{
  Tprocesstransactionlote p=(Tprocesstransactionlote)this.clone();
  p.setPk((TprocesstransactionloteKey)this.pk.cloneMe());
  return p;
}
}
