package com.fitbank.hb.persistence.lote;

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

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

/**
* Numero consecutivo del campo requerido por el lote
*/
private Integer slotecamporequerido;

/**Contructor por defecto*/
public TrequiredlotfieldsKey(){}
/**Contructor de TrequiredlotfieldsKey
@param pCloteestructura Nombre de la estructura
@param pSlotecamporequerido Numero consecutivo del campo requerido por el lote
*/
public TrequiredlotfieldsKey(String pCloteestructura,Integer pSlotecamporequerido){
 cloteestructura=pCloteestructura;
 slotecamporequerido=pSlotecamporequerido;
}
public static final String CLOTEESTRUCTURA="CLOTEESTRUCTURA";
/**Obtiene el valor de cloteestructura
@return valor de cloteestructura*/
public String getCloteestructura(){
  return cloteestructura;
}
/**Fija el valor de cloteestructura
@param pCloteestructura nuevo Valor de cloteestructura*/
public void setCloteestructura(String pCloteestructura){
  cloteestructura=pCloteestructura;
}

public static final String SLOTECAMPOREQUERIDO="SLOTECAMPOREQUERIDO";
/**Obtiene el valor de slotecamporequerido
@return valor de slotecamporequerido*/
public Integer getSlotecamporequerido(){
  return slotecamporequerido;
}
/**Fija el valor de slotecamporequerido
@param pSlotecamporequerido nuevo Valor de slotecamporequerido*/
public void setSlotecamporequerido(Integer pSlotecamporequerido){
  slotecamporequerido=pSlotecamporequerido;
}

public static final String PK_CLOTEESTRUCTURA="CLOTEESTRUCTURA";
public static final String PK_SLOTECAMPOREQUERIDO="SLOTECAMPOREQUERIDO";
/**Implementaciï¿½n de la comparaciï¿½n de TrequiredlotfieldsKey
@param o Objeto de comparaciÃ¯Â¿Â½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TrequiredlotfieldsKey)){return false;}
  TrequiredlotfieldsKey that = (TrequiredlotfieldsKey) o;
  if (this.getCloteestructura() == null || that.getCloteestructura() == null){
      return false;
  }
  if (! this.getCloteestructura().equals(that.getCloteestructura())){
    return false;
  }
  if (this.getSlotecamporequerido() == null || that.getSlotecamporequerido() == null){
      return false;
  }
  if (! this.getSlotecamporequerido().equals(that.getSlotecamporequerido())){
    return false;
  }
  return true;
}
/**Implementaciï¿½n del mï¿½todo hashCode bajo el patrï¿½n de Bloch
@return hashCode de la instancia TrequiredlotfieldsKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCloteestructura() == null ? 0 : this.getCloteestructura().hashCode());
    result = result * 37 + (this.getSlotecamporequerido() == null ? 0 : this.getSlotecamporequerido().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;
	}
}
