package com.fitbank.hb.persistence.person;

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

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

/**
*  
*/
private String cusuario_ingreso;

/**
*  
*/
private Long secuencia;

/**Contructor por defecto*/
public VdateenterpersonKey(){}
/**Contructor de VdateenterpersonKey
@param pCpersona  
@param pCusuario_ingreso  
@param pSecuencia  
*/
public VdateenterpersonKey(Integer pCpersona,String pCusuario_ingreso,Long pSecuencia){
 cpersona=pCpersona;
 cusuario_ingreso=pCusuario_ingreso;
 secuencia=pSecuencia;
}
public static final String CPERSONA="CPERSONA";
/**Obtiene el valor de cpersona
@return valor de cpersona*/
public Integer getCpersona(){
  return cpersona;
}
/**Fija el valor de cpersona
@param pCpersona nuevo Valor de cpersona*/
public void setCpersona(Integer pCpersona){
  cpersona=pCpersona;
}

public static final String CUSUARIO_INGRESO="CUSUARIO_INGRESO";
/**Obtiene el valor de cusuario_ingreso
@return valor de cusuario_ingreso*/
public String getCusuario_ingreso(){
  return cusuario_ingreso;
}
/**Fija el valor de cusuario_ingreso
@param pCusuario_ingreso nuevo Valor de cusuario_ingreso*/
public void setCusuario_ingreso(String pCusuario_ingreso){
  cusuario_ingreso=pCusuario_ingreso;
}

public static final String SECUENCIA="SECUENCIA";
/**Obtiene el valor de secuencia
@return valor de secuencia*/
public Long getSecuencia(){
  return secuencia;
}
/**Fija el valor de secuencia
@param pSecuencia nuevo Valor de secuencia*/
public void setSecuencia(Long pSecuencia){
  secuencia=pSecuencia;
}

public static final String PK_CPERSONA="CPERSONA";
public static final String PK_CUSUARIO_INGRESO="CUSUARIO_INGRESO";
public static final String PK_SECUENCIA="SECUENCIA";
/**Implementaci?n de la comparaci?n de VdateenterpersonKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof VdateenterpersonKey)){return false;}
  VdateenterpersonKey that = (VdateenterpersonKey) o;
  if (this.getCpersona() == null || that.getCpersona() == null){
      return false;
  }
  if (! this.getCpersona().equals(that.getCpersona())){
    return false;
  }
  if (this.getCusuario_ingreso() == null || that.getCusuario_ingreso() == null){
      return false;
  }
  if (! this.getCusuario_ingreso().equals(that.getCusuario_ingreso())){
    return false;
  }
  if (this.getSecuencia() == null || that.getSecuencia() == null){
      return false;
  }
  if (! this.getSecuencia().equals(that.getSecuencia())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia VdateenterpersonKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCpersona() == null ? 0 : this.getCpersona().hashCode());
    result = result * 37 + (this.getCusuario_ingreso() == null ? 0 : this.getCusuario_ingreso().hashCode());
    result = result * 37 + (this.getSecuencia() == null ? 0 : this.getSecuencia().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;
	}
}
