package com.fitbank.hb.persistence.atm;

import com.fitbank.common.hb.ManejaHistory;
import java.sql.Timestamp;
import java.io.Serializable;
import java.lang.reflect.Field;
import com.fitbank.common.hb.AbstractExpire;

/**Clase que hace referencia a la Clave Primaria de TATMFINANCIALDATA*/
public class TatmfinancialdataKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TATMFINANCIALDATA */
public static final String TABLE_NAME = "TATMFINANCIALDATA";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo financiero por modelo de ATM
*/
private String cfinancialdata;

/**
* Codigo del modelo del ATM
*/
private String cmodeloatm;

/**
* Fecha hasta la que estan vigentes los datos de informacion financiera por modelo del ATM
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TatmfinancialdataKey(){}
/**Contructor de TatmfinancialdataKey
@param pCfinancialdata Codigo financiero por modelo de ATM
@param pCmodeloatm Codigo del modelo del ATM
@param pFhasta Fecha hasta la que estan vigentes los datos de informacion financiera por modelo del ATM
*/
public TatmfinancialdataKey(String pCfinancialdata,String pCmodeloatm,Timestamp pFhasta){
 cfinancialdata=pCfinancialdata;
 cmodeloatm=pCmodeloatm;
 fhasta=pFhasta;
}
public static final String CFINANCIALDATA="CFINANCIALDATA";
/**Obtiene el valor de cfinancialdata
@return valor de cfinancialdata*/
public String getCfinancialdata(){
  return cfinancialdata;
}
/**Fija el valor de cfinancialdata
@param pCfinancialdata nuevo Valor de cfinancialdata*/
public void setCfinancialdata(String pCfinancialdata){
  cfinancialdata=pCfinancialdata;
}

public static final String CMODELOATM="CMODELOATM";
/**Obtiene el valor de cmodeloatm
@return valor de cmodeloatm*/
public String getCmodeloatm(){
  return cmodeloatm;
}
/**Fija el valor de cmodeloatm
@param pCmodeloatm nuevo Valor de cmodeloatm*/
public void setCmodeloatm(String pCmodeloatm){
  cmodeloatm=pCmodeloatm;
}

public static final String FHASTA="FHASTA";
/**Obtiene el valor de fhasta
@return valor de fhasta*/
public Timestamp getFhasta(){
  return fhasta;
}
/**Fija el valor de fhasta
@param pFhasta nuevo Valor de fhasta*/
public void setFhasta(Timestamp pFhasta){
  fhasta=pFhasta;
}

public static final String PK_CFINANCIALDATA="CFINANCIALDATA";
public static final String PK_CMODELOATM="CMODELOATM";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TatmfinancialdataKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TatmfinancialdataKey)){return false;}
  TatmfinancialdataKey that = (TatmfinancialdataKey) o;
  if (this.getCfinancialdata() == null || that.getCfinancialdata() == null){
      return false;
  }
  if (! this.getCfinancialdata().equals(that.getCfinancialdata())){
    return false;
  }
  if (this.getCmodeloatm() == null || that.getCmodeloatm() == null){
      return false;
  }
  if (! this.getCmodeloatm().equals(that.getCmodeloatm())){
    return false;
  }
  if (this.getFhasta() == null || that.getFhasta() == null){
      return false;
  }
  if (! this.getFhasta().equals(that.getFhasta())){
    return false;
  }
  return true;
}
/**Implementaci�n del m�todo hashCode bajo el patr�n de Bloch
@return hashCode de la instancia TatmfinancialdataKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCfinancialdata() == null ? 0 : this.getCfinancialdata().hashCode());
    result = result * 37 + (this.getCmodeloatm() == null ? 0 : this.getCmodeloatm().hashCode());
    result = result * 37 + (this.getFhasta() == null ? 0 : this.getFhasta().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;
	}
public Object getId() {
  return null;
}
}
