package com.fitbank.hb.persistence.gene;

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

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

/**
* Codigo de la clasificacion contable de los productos, ejemplo Prestamos, microcredito, comercial consumo, hipotecario. 
*/
private String cclasificacioncontable;

/**Contructor por defecto*/
public TaccountingclassificationidKey(){}
/**Contructor de TaccountingclassificationidKey
@param pCsubsistema Codigo del subsistema
@param pCclasificacioncontable Codigo de la clasificacion contable de los productos, ejemplo Prestamos, microcredito, comercial consumo, hipotecario. 
*/
public TaccountingclassificationidKey(String pCsubsistema,String pCclasificacioncontable){
 csubsistema=pCsubsistema;
 cclasificacioncontable=pCclasificacioncontable;
}
public static final String CSUBSISTEMA="CSUBSISTEMA";
/**Obtiene el valor de csubsistema
@return valor de csubsistema*/
public String getCsubsistema(){
  return csubsistema;
}
/**Fija el valor de csubsistema
@param pCsubsistema nuevo Valor de csubsistema*/
public void setCsubsistema(String pCsubsistema){
  csubsistema=pCsubsistema;
}

public static final String CCLASIFICACIONCONTABLE="CCLASIFICACIONCONTABLE";
/**Obtiene el valor de cclasificacioncontable
@return valor de cclasificacioncontable*/
public String getCclasificacioncontable(){
  return cclasificacioncontable;
}
/**Fija el valor de cclasificacioncontable
@param pCclasificacioncontable nuevo Valor de cclasificacioncontable*/
public void setCclasificacioncontable(String pCclasificacioncontable){
  cclasificacioncontable=pCclasificacioncontable;
}

public static final String PK_CSUBSISTEMA="CSUBSISTEMA";
public static final String PK_CCLASIFICACIONCONTABLE="CCLASIFICACIONCONTABLE";
/**Implementaciï¿½n de la comparaciï¿½n de TaccountingclassificationidKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TaccountingclassificationidKey)){return false;}
  TaccountingclassificationidKey that = (TaccountingclassificationidKey) o;
  if (this.getCsubsistema() == null || that.getCsubsistema() == null){
      return false;
  }
  if (! this.getCsubsistema().equals(that.getCsubsistema())){
    return false;
  }
  if (this.getCclasificacioncontable() == null || that.getCclasificacioncontable() == null){
      return false;
  }
  if (! this.getCclasificacioncontable().equals(that.getCclasificacioncontable())){
    return false;
  }
  return true;
}
/**Implementaciï¿½n del mï¿½todo hashCode bajo el patrï¿½n de Bloch
@return hashCode de la instancia TaccountingclassificationidKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCsubsistema() == null ? 0 : this.getCsubsistema().hashCode());
    result = result * 37 + (this.getCclasificacioncontable() == null ? 0 : this.getCclasificacioncontable().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;
	}
}
