package com.fitbank.hb.persistence.acco;

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

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

/**
*  
*/
private Integer cpersona;

/**
*  
*/
private Integer cpersona_compania;

/**Contructor por defecto*/
public VmanagementaccountKey(){}
/**Contructor de VmanagementaccountKey
@param pCcuenta  
@param pCpersona  
@param pCpersona_compania  
*/
public VmanagementaccountKey(String pCcuenta,Integer pCpersona,Integer pCpersona_compania){
 ccuenta=pCcuenta;
 cpersona=pCpersona;
 cpersona_compania=pCpersona_compania;
}
public static final String CCUENTA="CCUENTA";
/**Obtiene el valor de ccuenta
@return valor de ccuenta*/
public String getCcuenta(){
  return ccuenta;
}
/**Fija el valor de ccuenta
@param pCcuenta nuevo Valor de ccuenta*/
public void setCcuenta(String pCcuenta){
  ccuenta=pCcuenta;
}

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 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 PK_CCUENTA="CCUENTA";
public static final String PK_CPERSONA="CPERSONA";
public static final String PK_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
/**Implementaciï¿½n de la comparaciï¿½n de VmanagementaccountKey
@param o Objeto de comparaciÃ¯Â¿Â½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof VmanagementaccountKey)){return false;}
  VmanagementaccountKey that = (VmanagementaccountKey) o;
  if (this.getCcuenta() == null || that.getCcuenta() == null){
      return false;
  }
  if (! this.getCcuenta().equals(that.getCcuenta())){
    return false;
  }
  if (this.getCpersona() == null || that.getCpersona() == null){
      return false;
  }
  if (! this.getCpersona().equals(that.getCpersona())){
    return false;
  }
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  return true;
}
/**Implementaciï¿½n del mï¿½todo hashCode bajo el patrï¿½n de Bloch
@return hashCode de la instancia VmanagementaccountKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCcuenta() == null ? 0 : this.getCcuenta().hashCode());
    result = result * 37 + (this.getCpersona() == null ? 0 : this.getCpersona().hashCode());
    result = result * 37 + (this.getCpersona_compania() == null ? 0 : this.getCpersona_compania().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;
	}
}
