package com.fitbank.hb.persistence.uci;

import java.io.Serializable;
import java.sql.Date;
import java.lang.reflect.Field;
import java.sql.Clob;
import com.fitbank.common.TransportBean;

/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TCANALTRANSACCIONESDETALLE*/
public class Ttransactionchanneldetail implements Serializable,TransportBean,Cloneable{
/** Nombre de la Tabla TCANALTRANSACCIONESDETALLE */
public static final String TABLE_NAME = "TCANALTRANSACCIONESDETALLE";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Clave primaria de la Entidad Ttransactionchanneldetail
*/
private TtransactionchanneldetailKey pk;
/**
* Contenido del mensaje
*/
private Clob mensaje;

/**
* Codigo de la estructura de mensaje
*/
private String cestructura;

/**Contructor por defecto*/
public Ttransactionchanneldetail(){}
/**Contructor de Ttransactionchanneldetail
@param pPk Clave Primaria del entity
*/
public Ttransactionchanneldetail(TtransactionchanneldetailKey pPk){
 pk=pPk;
}
/**Entrega la Clave primaria de Ttransactionchanneldetail
@return El objeto que referencia a la Clave primaria de Ttransactionchanneldetail
*/
public TtransactionchanneldetailKey getPk(){
  return pk;
}
/**Fija un nuevo valor a la Clave primaria de Ttransactionchanneldetail
@param pPk El objeto que referencia a la nueva Clave primaria de Ttransactionchanneldetail
*/
public void setPk(TtransactionchanneldetailKey pPk){
  pk=pPk;
}
public static final String MENSAJE="MENSAJE";
/**Obtiene el valor de mensaje
@return valor de mensaje*/
public Clob getMensaje(){
  return mensaje;
}
/**Fija el valor de mensaje
@param pMensaje nuevo Valor de mensaje*/
public void setMensaje(Clob pMensaje){
  mensaje=pMensaje;
}

public static final String CESTRUCTURA="CESTRUCTURA";
/**Obtiene el valor de cestructura
@return valor de cestructura*/
public String getCestructura(){
  return cestructura;
}
/**Fija el valor de cestructura
@param pCestructura nuevo Valor de cestructura*/
public void setCestructura(String pCestructura){
  cestructura=pCestructura;
}

/**Implementacion de la comparacion de la entidad Ttransactionchanneldetail
@param rhs Elemento de Comparacion
@return el resultado de la comparacion
*/
public boolean equals(Object rhs){
    if (rhs == null){return false;}
    if (! (rhs instanceof Ttransactionchanneldetail)){return false;}
    Ttransactionchanneldetail that = (Ttransactionchanneldetail) rhs;
    if (this.getPk() == null || that.getPk() == null){
        return false;}
    return (this.getPk().equals(that.getPk()));
}
/**Implementaci?n del metodo hashCode de la la entidad Ttransactionchanneldetail
@return el hashCode la instancia
*/
public int hashCode()    {
    if (this.hashValue == 0){
        int result = 17;
        if (this.getPk() == null){
            result = super.hashCode();
        }else{
            result = this.getPk().hashCode();
        }
        this.hashValue = result;
    }
    return this.hashValue;
}
/**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+=name+"="+f.get(this)+";";
	 }catch(Exception e){
		 continue;
	 }
		}
		if(data.compareTo("")==0){
		data=super.toString();
		}
	return data;
	}
/**Implementaci?n de la creaci?n de un bean en blancoTtransactionchanneldetail
*/
public Object createInstance() throws Exception{
 Ttransactionchanneldetail instance=new Ttransactionchanneldetail();	
 instance.setPk(new TtransactionchanneldetailKey());
 return instance;
}
public Object cloneMe() throws Exception{
  Ttransactionchanneldetail p=(Ttransactionchanneldetail)this.clone();
  p.setPk((TtransactionchanneldetailKey)this.pk.cloneMe());
  return p;
}
}
