package com.fitbank.hb.persistence.uci;

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

/**Clase que hace referencia a la Clave Primaria de TCONCILIACIONSERVICIOS*/
public class TserviceconciliationKey    implements Serializable,Cloneable{
/**
* HashCode asociado con la Instancia
*/
private volatile int hashValue = 0;
/**
* Version de la Clase
*/
private static final long serialVersionUID = 1L;
/**
* 
*/
private String ccanal;

/**
* 
*/
private Date ftransaccion;

/**
* 
*/
private Long sconciliacion;

/**Contructor por defecto*/
public TserviceconciliationKey(){}
/**Contructor de TserviceconciliationKey
@param pCcanal null
@param pFtransaccion null
@param pSconciliacion null
*/
public TserviceconciliationKey(String pCcanal,Date pFtransaccion,Long pSconciliacion){
 ccanal=pCcanal;
 ftransaccion=pFtransaccion;
 sconciliacion=pSconciliacion;
}
/**Obtiene el valor de ccanal
@return valor de ccanal*/
public String getCcanal(){
  return ccanal;
}
/**Fija el valor de ccanal
@param pCcanal nuevo Valor de ccanal*/
public void setCcanal(String pCcanal){
  ccanal=pCcanal;
}

/**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;
}

/**Obtiene el valor de sconciliacion
@return valor de sconciliacion*/
public Long getSconciliacion(){
  return sconciliacion;
}
/**Fija el valor de sconciliacion
@param pSconciliacion nuevo Valor de sconciliacion*/
public void setSconciliacion(Long pSconciliacion){
  sconciliacion=pSconciliacion;
}

/**Implementación de la comparación de TserviceconciliationKey
@param o Objeto de comparación
*/
public boolean equals(Object o){
  if (o == null)return false;
  if (! (o instanceof TserviceconciliationKey))return false;
  TserviceconciliationKey that = (TserviceconciliationKey) o;
  if (this.getCcanal() == null || that.getCcanal() == null){
      return false;
  }
  if (! this.getCcanal().equals(that.getCcanal())){
    return false;
  }
  if (this.getFtransaccion() == null || that.getFtransaccion() == null){
      return false;
  }
  if (! this.getFtransaccion().equals(that.getFtransaccion())){
    return false;
  }
  if (this.getSconciliacion() == null || that.getSconciliacion() == null){
      return false;
  }
  if (! this.getSconciliacion().equals(that.getSconciliacion())){
    return false;
  }
  return true;
}
/**Implementación del método hashCode bajo el patrón de Bloch
@return hashCode de la instancia TserviceconciliationKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcanal() == null ? 0 : this.getCcanal().hashCode());
    result = result * 37 + (this.getFtransaccion() == null ? 0 : this.getFtransaccion().hashCode());
    result = result * 37 + (this.getSconciliacion() == null ? 0 : this.getSconciliacion().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;
	}
}
