package com.fitbank.hb.persistence.payroll;

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

/**Clase que hace referencia a la Clave Primaria de TEMPLEADOSCOMPLEMENTARIAS*/
public class TcomplementarypayrrollKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TEMPLEADOSCOMPLEMENTARIAS */
public static final String TABLE_NAME = "TEMPLEADOSCOMPLEMENTARIAS";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo de la empresa complementaria a la que pertenece el empleado
*/
private Integer cpersona_complementaria;

/**
* Codigo del periodo del ejercicio contable
*/
private String cperiodo;

/**
* Codigo del tipo de identificacion del empleado
*/
private String ctipoidentificacion;

/**
* Identificacion del empleado
*/
private String identificacion;

/**
* Fecha hasta la que esta vigente la informacion del empleado
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TcomplementarypayrrollKey(){}
/**Contructor de TcomplementarypayrrollKey
@param pCpersona_complementaria Codigo de la empresa complementaria a la que pertenece el empleado
@param pCperiodo Codigo del periodo del ejercicio contable
@param pCtipoidentificacion Codigo del tipo de identificacion del empleado
@param pIdentificacion Identificacion del empleado
@param pFhasta Fecha hasta la que esta vigente la informacion del empleado
*/
public TcomplementarypayrrollKey(Integer pCpersona_complementaria,String pCperiodo,String pCtipoidentificacion,String pIdentificacion,Timestamp pFhasta){
 cpersona_complementaria=pCpersona_complementaria;
 cperiodo=pCperiodo;
 ctipoidentificacion=pCtipoidentificacion;
 identificacion=pIdentificacion;
 fhasta=pFhasta;
}
public static final String CPERSONA_COMPLEMENTARIA="CPERSONA_COMPLEMENTARIA";
/**Obtiene el valor de cpersona_complementaria
@return valor de cpersona_complementaria*/
public Integer getCpersona_complementaria(){
  return cpersona_complementaria;
}
/**Fija el valor de cpersona_complementaria
@param pCpersona_complementaria nuevo Valor de cpersona_complementaria*/
public void setCpersona_complementaria(Integer pCpersona_complementaria){
  cpersona_complementaria=pCpersona_complementaria;
}

public static final String CPERIODO="CPERIODO";
/**Obtiene el valor de cperiodo
@return valor de cperiodo*/
public String getCperiodo(){
  return cperiodo;
}
/**Fija el valor de cperiodo
@param pCperiodo nuevo Valor de cperiodo*/
public void setCperiodo(String pCperiodo){
  cperiodo=pCperiodo;
}

public static final String CTIPOIDENTIFICACION="CTIPOIDENTIFICACION";
/**Obtiene el valor de ctipoidentificacion
@return valor de ctipoidentificacion*/
public String getCtipoidentificacion(){
  return ctipoidentificacion;
}
/**Fija el valor de ctipoidentificacion
@param pCtipoidentificacion nuevo Valor de ctipoidentificacion*/
public void setCtipoidentificacion(String pCtipoidentificacion){
  ctipoidentificacion=pCtipoidentificacion;
}

public static final String IDENTIFICACION="IDENTIFICACION";
/**Obtiene el valor de identificacion
@return valor de identificacion*/
public String getIdentificacion(){
  return identificacion;
}
/**Fija el valor de identificacion
@param pIdentificacion nuevo Valor de identificacion*/
public void setIdentificacion(String pIdentificacion){
  identificacion=pIdentificacion;
}

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_COMPLEMENTARIA="CPERSONA_COMPLEMENTARIA";
public static final String PK_CPERIODO="CPERIODO";
public static final String PK_CTIPOIDENTIFICACION="CTIPOIDENTIFICACION";
public static final String PK_IDENTIFICACION="IDENTIFICACION";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TcomplementarypayrrollKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TcomplementarypayrrollKey)){return false;}
  TcomplementarypayrrollKey that = (TcomplementarypayrrollKey) o;
  if (this.getCpersona_complementaria() == null || that.getCpersona_complementaria() == null){
      return false;
  }
  if (! this.getCpersona_complementaria().equals(that.getCpersona_complementaria())){
    return false;
  }
  if (this.getCperiodo() == null || that.getCperiodo() == null){
      return false;
  }
  if (! this.getCperiodo().equals(that.getCperiodo())){
    return false;
  }
  if (this.getCtipoidentificacion() == null || that.getCtipoidentificacion() == null){
      return false;
  }
  if (! this.getCtipoidentificacion().equals(that.getCtipoidentificacion())){
    return false;
  }
  if (this.getIdentificacion() == null || that.getIdentificacion() == null){
      return false;
  }
  if (! this.getIdentificacion().equals(that.getIdentificacion())){
    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 TcomplementarypayrrollKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCpersona_complementaria() == null ? 0 : this.getCpersona_complementaria().hashCode());
    result = result * 37 + (this.getCperiodo() == null ? 0 : this.getCperiodo().hashCode());
    result = result * 37 + (this.getCtipoidentificacion() == null ? 0 : this.getCtipoidentificacion().hashCode());
    result = result * 37 + (this.getIdentificacion() == null ? 0 : this.getIdentificacion().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;
}
}
