package com.fitbank.hb.persistence.trans;

import com.fitbank.common.hb.AbstractExpire;
import java.io.Serializable;
import java.lang.reflect.Field;
import com.fitbank.common.hb.ManejaHistory;
import java.sql.Timestamp;

/**Clase que hace referencia a la Clave Primaria de TSUBSISTEMAEVENTOSMADURACION*/
public class TmaturationeventsusbsystemKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/**
* HashCode asociado con la Instancia
*/
private volatile int hashValue = 0;
/**
* Version de la Clase
*/
private static final long serialVersionUID = 1L;
/**
* Codigo del evento para las transacciones automaticas del producto y tipo de saldo
*/
private String cevento;

/**
* Codigo del subsistema
*/
private String csubsistema;

/**
* Fecha hasta la que esta vigente la definicion de eventos y transacciones asociadas a un subsistema
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TmaturationeventsusbsystemKey(){}
/**Contructor de TmaturationeventsusbsystemKey
@param pCevento Codigo del evento para las transacciones automaticas del producto y tipo de saldo
@param pCsubsistema Codigo del subsistema
@param pFhasta Fecha hasta la que esta vigente la definicion de eventos y transacciones asociadas a un subsistema
*/
public TmaturationeventsusbsystemKey(String pCevento,String pCsubsistema,Timestamp pFhasta){
 cevento=pCevento;
 csubsistema=pCsubsistema;
 fhasta=pFhasta;
}
/**Obtiene el valor de cevento
@return valor de cevento*/
public String getCevento(){
  return cevento;
}
/**Fija el valor de cevento
@param pCevento nuevo Valor de cevento*/
public void setCevento(String pCevento){
  cevento=pCevento;
}

/**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;
}

/**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;
}

/**Implementación de la comparación de TmaturationeventsusbsystemKey
@param o Objeto de comparación
*/
public boolean equals(Object o){
  if (o == null)return false;
  if (! (o instanceof TmaturationeventsusbsystemKey))return false;
  TmaturationeventsusbsystemKey that = (TmaturationeventsusbsystemKey) o;
  if (this.getCevento() == null || that.getCevento() == null){
      return false;
  }
  if (! this.getCevento().equals(that.getCevento())){
    return false;
  }
  if (this.getCsubsistema() == null || that.getCsubsistema() == null){
      return false;
  }
  if (! this.getCsubsistema().equals(that.getCsubsistema())){
    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 TmaturationeventsusbsystemKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCevento() == null ? 0 : this.getCevento().hashCode());
    result = result * 37 + (this.getCsubsistema() == null ? 0 : this.getCsubsistema().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;
}
}
