package com.fitbank.hb.persistence.gene;

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

/**Clase que hace referencia a la Clave Primaria de TPLANTILLAINDICESDETALLE*/
public class TindextemplatedetailKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TPLANTILLAINDICESDETALLE */
public static final String TABLE_NAME = "TPLANTILLAINDICESDETALLE";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo de persona de la compania
*/
private Integer cpersona_compania;

/**
* Codigo de plantilla de los reportes de contabilidad
*/
private Integer cplantillareporte;

/**
* Orden de la linea en el reporte
*/
private Integer orden;

/**
* Consecutivo del registro
*/
private Integer splantillaindice;

/**
* Fecha de vigencia del registro
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TindextemplatedetailKey(){}
/**Contructor de TindextemplatedetailKey
@param pCpersona_compania Codigo de persona de la compania
@param pCplantillareporte Codigo de plantilla de los reportes de contabilidad
@param pOrden Orden de la linea en el reporte
@param pSplantillaindice Consecutivo del registro
@param pFhasta Fecha de vigencia del registro
*/
public TindextemplatedetailKey(Integer pCpersona_compania,Integer pCplantillareporte,Integer pOrden,Integer pSplantillaindice,Timestamp pFhasta){
 cpersona_compania=pCpersona_compania;
 cplantillareporte=pCplantillareporte;
 orden=pOrden;
 splantillaindice=pSplantillaindice;
 fhasta=pFhasta;
}
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 CPLANTILLAREPORTE="CPLANTILLAREPORTE";
/**Obtiene el valor de cplantillareporte
@return valor de cplantillareporte*/
public Integer getCplantillareporte(){
  return cplantillareporte;
}
/**Fija el valor de cplantillareporte
@param pCplantillareporte nuevo Valor de cplantillareporte*/
public void setCplantillareporte(Integer pCplantillareporte){
  cplantillareporte=pCplantillareporte;
}

public static final String ORDEN="ORDEN";
/**Obtiene el valor de orden
@return valor de orden*/
public Integer getOrden(){
  return orden;
}
/**Fija el valor de orden
@param pOrden nuevo Valor de orden*/
public void setOrden(Integer pOrden){
  orden=pOrden;
}

public static final String SPLANTILLAINDICE="SPLANTILLAINDICE";
/**Obtiene el valor de splantillaindice
@return valor de splantillaindice*/
public Integer getSplantillaindice(){
  return splantillaindice;
}
/**Fija el valor de splantillaindice
@param pSplantillaindice nuevo Valor de splantillaindice*/
public void setSplantillaindice(Integer pSplantillaindice){
  splantillaindice=pSplantillaindice;
}

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_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
public static final String PK_CPLANTILLAREPORTE="CPLANTILLAREPORTE";
public static final String PK_ORDEN="ORDEN";
public static final String PK_SPLANTILLAINDICE="SPLANTILLAINDICE";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TindextemplatedetailKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TindextemplatedetailKey)){return false;}
  TindextemplatedetailKey that = (TindextemplatedetailKey) o;
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  if (this.getCplantillareporte() == null || that.getCplantillareporte() == null){
      return false;
  }
  if (! this.getCplantillareporte().equals(that.getCplantillareporte())){
    return false;
  }
  if (this.getOrden() == null || that.getOrden() == null){
      return false;
  }
  if (! this.getOrden().equals(that.getOrden())){
    return false;
  }
  if (this.getSplantillaindice() == null || that.getSplantillaindice() == null){
      return false;
  }
  if (! this.getSplantillaindice().equals(that.getSplantillaindice())){
    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 TindextemplatedetailKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCpersona_compania() == null ? 0 : this.getCpersona_compania().hashCode());
    result = result * 37 + (this.getCplantillareporte() == null ? 0 : this.getCplantillareporte().hashCode());
    result = result * 37 + (this.getOrden() == null ? 0 : this.getOrden().hashCode());
    result = result * 37 + (this.getSplantillaindice() == null ? 0 : this.getSplantillaindice().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;
	}
}
