package com.fitbank.hb.persistence.trans;

import java.io.Serializable;
import java.sql.Date;
import java.lang.reflect.Field;

/**Clase que hace referencia a la Clave Primaria de TTRANSACCIONESRECIBIDAS*/
public class TreceivedtransactionKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TTRANSACCIONESRECIBIDAS */
public static final String TABLE_NAME = "TTRANSACCIONESRECIBIDAS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Numero de cuenta fit
*/
private String ccuenta;

/**
* Codigo de persona de la compania de la cuenta fit
*/
private Integer cpersona_compania;

/**
* Numero del mensaje con el que se procesa la transaccion
*/
private String numeromensaje;

/**
* Numero de cuenta externa en la que se realiza la transaccion recibida
*/
private String cuentaexterna;

/**
* Fecha de la transaccion recibida
*/
private Date ftransaccion;

/**Contructor por defecto*/
public TreceivedtransactionKey(){}
/**Contructor de TreceivedtransactionKey
@param pCcuenta Numero de cuenta fit
@param pCpersona_compania Codigo de persona de la compania de la cuenta fit
@param pNumeromensaje Numero del mensaje con el que se procesa la transaccion
@param pCuentaexterna Numero de cuenta externa en la que se realiza la transaccion recibida
@param pFtransaccion Fecha de la transaccion recibida
*/
public TreceivedtransactionKey(String pCcuenta,Integer pCpersona_compania,String pNumeromensaje,String pCuentaexterna,Date pFtransaccion){
 ccuenta=pCcuenta;
 cpersona_compania=pCpersona_compania;
 numeromensaje=pNumeromensaje;
 cuentaexterna=pCuentaexterna;
 ftransaccion=pFtransaccion;
}
public static final String CCUENTA="CCUENTA";
/**Obtiene el valor de ccuenta
@return valor de ccuenta*/
public String getCcuenta(){
  return ccuenta;
}
/**Fija el valor de ccuenta
@param pCcuenta nuevo Valor de ccuenta*/
public void setCcuenta(String pCcuenta){
  ccuenta=pCcuenta;
}

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 NUMEROMENSAJE="NUMEROMENSAJE";
/**Obtiene el valor de numeromensaje
@return valor de numeromensaje*/
public String getNumeromensaje(){
  return numeromensaje;
}
/**Fija el valor de numeromensaje
@param pNumeromensaje nuevo Valor de numeromensaje*/
public void setNumeromensaje(String pNumeromensaje){
  numeromensaje=pNumeromensaje;
}

public static final String CUENTAEXTERNA="CUENTAEXTERNA";
/**Obtiene el valor de cuentaexterna
@return valor de cuentaexterna*/
public String getCuentaexterna(){
  return cuentaexterna;
}
/**Fija el valor de cuentaexterna
@param pCuentaexterna nuevo Valor de cuentaexterna*/
public void setCuentaexterna(String pCuentaexterna){
  cuentaexterna=pCuentaexterna;
}

public static final String FTRANSACCION="FTRANSACCION";
/**Obtiene el valor de ftransaccion
@return valor de ftransaccion*/
public Date getFtransaccion(){
  return ftransaccion;
}
/**Fija el valor de ftransaccion
@param pFtransaccion nuevo Valor de ftransaccion*/
public void setFtransaccion(Date pFtransaccion){
  ftransaccion=pFtransaccion;
}

public static final String PK_CCUENTA="CCUENTA";
public static final String PK_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
public static final String PK_NUMEROMENSAJE="NUMEROMENSAJE";
public static final String PK_CUENTAEXTERNA="CUENTAEXTERNA";
public static final String PK_FTRANSACCION="FTRANSACCION";
/**Implementaci?n de la comparaci?n de TreceivedtransactionKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TreceivedtransactionKey)){return false;}
  TreceivedtransactionKey that = (TreceivedtransactionKey) o;
  if (this.getCcuenta() == null || that.getCcuenta() == null){
      return false;
  }
  if (! this.getCcuenta().equals(that.getCcuenta())){
    return false;
  }
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  if (this.getNumeromensaje() == null || that.getNumeromensaje() == null){
      return false;
  }
  if (! this.getNumeromensaje().equals(that.getNumeromensaje())){
    return false;
  }
  if (this.getCuentaexterna() == null || that.getCuentaexterna() == null){
      return false;
  }
  if (! this.getCuentaexterna().equals(that.getCuentaexterna())){
    return false;
  }
  if (this.getFtransaccion() == null || that.getFtransaccion() == null){
      return false;
  }
  if (! this.getFtransaccion().equals(that.getFtransaccion())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TreceivedtransactionKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcuenta() == null ? 0 : this.getCcuenta().hashCode());
    result = result * 37 + (this.getCpersona_compania() == null ? 0 : this.getCpersona_compania().hashCode());
    result = result * 37 + (this.getNumeromensaje() == null ? 0 : this.getNumeromensaje().hashCode());
    result = result * 37 + (this.getCuentaexterna() == null ? 0 : this.getCuentaexterna().hashCode());
    result = result * 37 + (this.getFtransaccion() == null ? 0 : this.getFtransaccion().hashCode());
    this.hashValue = result;
  }
  return this.hashValue;
}
public Object cloneMe() throws Exception {
  return this.clone();
}
/**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+="pk."+name+"="+f.get(this)+";";
	 }catch(Exception e){
		 continue;
	 }
		}
		if(data.compareTo("")==0){
		data=super.toString();
		}
	return data;
	}
}
