package com.fitbank.hb.persistence.gene;

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 TLINEASNEGOCIOBANCASEGMENTO*/
public class TbusinesslinesegmentbankingKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TLINEASNEGOCIOBANCASEGMENTO */
public static final String TABLE_NAME = "TLINEASNEGOCIOBANCASEGMENTO";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Codigo del tipo de linea de negocio
*/
private String clineanegocio;

/**
* Codigo del tipo de banca
*/
private String ctipobanca;

/**
* Codigo del tipo de segmento
*/
private String ctiposegmento;

/**
* Fecha hasta la que se encuentra vigente la relacion entre linea de negocio, banca y segmento
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TbusinesslinesegmentbankingKey(){}
/**Contructor de TbusinesslinesegmentbankingKey
@param pClineanegocio Codigo del tipo de linea de negocio
@param pCtipobanca Codigo del tipo de banca
@param pCtiposegmento Codigo del tipo de segmento
@param pFhasta Fecha hasta la que se encuentra vigente la relacion entre linea de negocio, banca y segmento
*/
public TbusinesslinesegmentbankingKey(String pClineanegocio,String pCtipobanca,String pCtiposegmento,Timestamp pFhasta){
 clineanegocio=pClineanegocio;
 ctipobanca=pCtipobanca;
 ctiposegmento=pCtiposegmento;
 fhasta=pFhasta;
}
public static final String CLINEANEGOCIO="CLINEANEGOCIO";
/**Obtiene el valor de clineanegocio
@return valor de clineanegocio*/
public String getClineanegocio(){
  return clineanegocio;
}
/**Fija el valor de clineanegocio
@param pClineanegocio nuevo Valor de clineanegocio*/
public void setClineanegocio(String pClineanegocio){
  clineanegocio=pClineanegocio;
}

public static final String CTIPOBANCA="CTIPOBANCA";
/**Obtiene el valor de ctipobanca
@return valor de ctipobanca*/
public String getCtipobanca(){
  return ctipobanca;
}
/**Fija el valor de ctipobanca
@param pCtipobanca nuevo Valor de ctipobanca*/
public void setCtipobanca(String pCtipobanca){
  ctipobanca=pCtipobanca;
}

public static final String CTIPOSEGMENTO="CTIPOSEGMENTO";
/**Obtiene el valor de ctiposegmento
@return valor de ctiposegmento*/
public String getCtiposegmento(){
  return ctiposegmento;
}
/**Fija el valor de ctiposegmento
@param pCtiposegmento nuevo Valor de ctiposegmento*/
public void setCtiposegmento(String pCtiposegmento){
  ctiposegmento=pCtiposegmento;
}

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_CLINEANEGOCIO="CLINEANEGOCIO";
public static final String PK_CTIPOBANCA="CTIPOBANCA";
public static final String PK_CTIPOSEGMENTO="CTIPOSEGMENTO";
public static final String PK_FHASTA="FHASTA";
/**Implementaci�n de la comparaci�n de TbusinesslinesegmentbankingKey
@param o Objeto de comparaciï¿½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TbusinesslinesegmentbankingKey)){return false;}
  TbusinesslinesegmentbankingKey that = (TbusinesslinesegmentbankingKey) o;
  if (this.getClineanegocio() == null || that.getClineanegocio() == null){
      return false;
  }
  if (! this.getClineanegocio().equals(that.getClineanegocio())){
    return false;
  }
  if (this.getCtipobanca() == null || that.getCtipobanca() == null){
      return false;
  }
  if (! this.getCtipobanca().equals(that.getCtipobanca())){
    return false;
  }
  if (this.getCtiposegmento() == null || that.getCtiposegmento() == null){
      return false;
  }
  if (! this.getCtiposegmento().equals(that.getCtiposegmento())){
    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 TbusinesslinesegmentbankingKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getClineanegocio() == null ? 0 : this.getClineanegocio().hashCode());
    result = result * 37 + (this.getCtipobanca() == null ? 0 : this.getCtipobanca().hashCode());
    result = result * 37 + (this.getCtiposegmento() == null ? 0 : this.getCtiposegmento().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;
}
}
