package com.fitbank.hb.persistence.gene;

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

/**Clase que hace referencia a la Clave Primaria de TESTRUCTURACUENTAID*/
public class TstructureaccountidKey    implements Serializable,Cloneable{
/** Nombre de la Tabla TESTRUCTURACUENTAID */
public static final String TABLE_NAME = "TESTRUCTURACUENTAID";
/** 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 estructura de la cuenta
*/
private Integer cestructuracuenta;

/**Contructor por defecto*/
public TstructureaccountidKey(){}
/**Contructor de TstructureaccountidKey
@param pCpersona_compania Codigo de persona de la compania
@param pCestructuracuenta Codigo de estructura de la cuenta
*/
public TstructureaccountidKey(Integer pCpersona_compania,Integer pCestructuracuenta){
 cpersona_compania=pCpersona_compania;
 cestructuracuenta=pCestructuracuenta;
}
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 CESTRUCTURACUENTA="CESTRUCTURACUENTA";
/**Obtiene el valor de cestructuracuenta
@return valor de cestructuracuenta*/
public Integer getCestructuracuenta(){
  return cestructuracuenta;
}
/**Fija el valor de cestructuracuenta
@param pCestructuracuenta nuevo Valor de cestructuracuenta*/
public void setCestructuracuenta(Integer pCestructuracuenta){
  cestructuracuenta=pCestructuracuenta;
}

public static final String PK_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
public static final String PK_CESTRUCTURACUENTA="CESTRUCTURACUENTA";
/**Implementaci?n de la comparaci?n de TstructureaccountidKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TstructureaccountidKey)){return false;}
  TstructureaccountidKey that = (TstructureaccountidKey) o;
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  if (this.getCestructuracuenta() == null || that.getCestructuracuenta() == null){
      return false;
  }
  if (! this.getCestructuracuenta().equals(that.getCestructuracuenta())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia TstructureaccountidKey
*/
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.getCestructuracuenta() == null ? 0 : this.getCestructuracuenta().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;
	}
}
