package com.fitbank.hb.persistence.atm;

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

/**Clase que hace referencia a la Clave Primaria de TATMSUBESTADOS*/
public class TatmsubstatesKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TATMSUBESTADOS */
public static final String TABLE_NAME = "TATMSUBESTADOS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo del Estado del ATM
*/
private String cestadoatm;

/**
* Codigo del subestado del componente del ATM
*/
private String csubestado;

/**
* Indicador de que el estado es de ATM
*/
private String estadotipo;

/**Contructor por defecto*/
public TatmsubstatesKey(){}
/**Contructor de TatmsubstatesKey
@param pCestadoatm Codigo del Estado del ATM
@param pCsubestado Codigo del subestado del componente del ATM
@param pEstadotipo Indicador de que el estado es de ATM
*/
public TatmsubstatesKey(String pCestadoatm,String pCsubestado,String pEstadotipo){
 cestadoatm=pCestadoatm;
 csubestado=pCsubestado;
 estadotipo=pEstadotipo;
}
public static final String CESTADOATM="CESTADOATM";
/**Obtiene el valor de cestadoatm
@return valor de cestadoatm*/
public String getCestadoatm(){
  return cestadoatm;
}
/**Fija el valor de cestadoatm
@param pCestadoatm nuevo Valor de cestadoatm*/
public void setCestadoatm(String pCestadoatm){
  cestadoatm=pCestadoatm;
}

public static final String CSUBESTADO="CSUBESTADO";
/**Obtiene el valor de csubestado
@return valor de csubestado*/
public String getCsubestado(){
  return csubestado;
}
/**Fija el valor de csubestado
@param pCsubestado nuevo Valor de csubestado*/
public void setCsubestado(String pCsubestado){
  csubestado=pCsubestado;
}

public static final String ESTADOTIPO="ESTADOTIPO";
/**Obtiene el valor de estadotipo
@return valor de estadotipo*/
public String getEstadotipo(){
  return estadotipo;
}
/**Fija el valor de estadotipo
@param pEstadotipo nuevo Valor de estadotipo*/
public void setEstadotipo(String pEstadotipo){
  estadotipo=pEstadotipo;
}

public static final String PK_CESTADOATM="CESTADOATM";
public static final String PK_CSUBESTADO="CSUBESTADO";
public static final String PK_ESTADOTIPO="ESTADOTIPO";
/**Implementaci?n de la comparaci?n de TatmsubstatesKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TatmsubstatesKey)){return false;}
  TatmsubstatesKey that = (TatmsubstatesKey) o;
  if (this.getCestadoatm() == null || that.getCestadoatm() == null){
      return false;
  }
  if (! this.getCestadoatm().equals(that.getCestadoatm())){
    return false;
  }
  if (this.getCsubestado() == null || that.getCsubestado() == null){
      return false;
  }
  if (! this.getCsubestado().equals(that.getCsubestado())){
    return false;
  }
  if (this.getEstadotipo() == null || that.getEstadotipo() == null){
      return false;
  }
  if (! this.getEstadotipo().equals(that.getEstadotipo())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TatmsubstatesKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCestadoatm() == null ? 0 : this.getCestadoatm().hashCode());
    result = result * 37 + (this.getCsubestado() == null ? 0 : this.getCsubestado().hashCode());
    result = result * 37 + (this.getEstadotipo() == null ? 0 : this.getEstadotipo().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;
	}
}
