package com.fitbank.hb.persistence.soli;

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 TSOLICITUDMERCADERIA*/
public class TsolicitudemerchandiseKey  extends AbstractExpire  implements Serializable,Cloneable,ManejaHistory{
/** Nombre de la Tabla TSOLICITUDMERCADERIA */
public static final String TABLE_NAME = "TSOLICITUDMERCADERIA";
/** HashCode asociado con la Instancia*/
private int hashValue = 0;
/** Version de la Clase*/
private static final long serialVersionUID = 1L;
/**
* Numero de solicitud de cuenta
*/
private Long csolicitud;

/**
* Codigo de persona de la compania
*/
private Integer cpersona_compania;

/**
* Numero consecutivo de la solicitud
*/
private Integer secuencia;

/**
* Numero consecutivo de la mercaderia de la cuenta de comercio exterior
*/
private Integer scuentamercaderia;

/**
* Fecha hasta la que estan vigentes los datos generales de la cuenta de comercio exterior
*/
private Timestamp fhasta;

/**Contructor por defecto*/
public TsolicitudemerchandiseKey(){}
/**Contructor de TsolicitudemerchandiseKey
@param pCsolicitud Numero de solicitud de cuenta
@param pCpersona_compania Codigo de persona de la compania
@param pSecuencia Numero consecutivo de la solicitud
@param pScuentamercaderia Numero consecutivo de la mercaderia de la cuenta de comercio exterior
@param pFhasta Fecha hasta la que estan vigentes los datos generales de la cuenta de comercio exterior
*/
public TsolicitudemerchandiseKey(Long pCsolicitud,Integer pCpersona_compania,Integer pSecuencia,Integer pScuentamercaderia,Timestamp pFhasta){
 csolicitud=pCsolicitud;
 cpersona_compania=pCpersona_compania;
 secuencia=pSecuencia;
 scuentamercaderia=pScuentamercaderia;
 fhasta=pFhasta;
}
public static final String CSOLICITUD="CSOLICITUD";
/**Obtiene el valor de csolicitud
@return valor de csolicitud*/
public Long getCsolicitud(){
  return csolicitud;
}
/**Fija el valor de csolicitud
@param pCsolicitud nuevo Valor de csolicitud*/
public void setCsolicitud(Long pCsolicitud){
  csolicitud=pCsolicitud;
}

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 SECUENCIA="SECUENCIA";
/**Obtiene el valor de secuencia
@return valor de secuencia*/
public Integer getSecuencia(){
  return secuencia;
}
/**Fija el valor de secuencia
@param pSecuencia nuevo Valor de secuencia*/
public void setSecuencia(Integer pSecuencia){
  secuencia=pSecuencia;
}

public static final String SCUENTAMERCADERIA="SCUENTAMERCADERIA";
/**Obtiene el valor de scuentamercaderia
@return valor de scuentamercaderia*/
public Integer getScuentamercaderia(){
  return scuentamercaderia;
}
/**Fija el valor de scuentamercaderia
@param pScuentamercaderia nuevo Valor de scuentamercaderia*/
public void setScuentamercaderia(Integer pScuentamercaderia){
  scuentamercaderia=pScuentamercaderia;
}

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_CSOLICITUD="CSOLICITUD";
public static final String PK_CPERSONA_COMPANIA="CPERSONA_COMPANIA";
public static final String PK_SECUENCIA="SECUENCIA";
public static final String PK_SCUENTAMERCADERIA="SCUENTAMERCADERIA";
public static final String PK_FHASTA="FHASTA";
/**Implementaci?n de la comparaci?n de TsolicitudemerchandiseKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TsolicitudemerchandiseKey)){return false;}
  TsolicitudemerchandiseKey that = (TsolicitudemerchandiseKey) o;
  if (this.getCsolicitud() == null || that.getCsolicitud() == null){
      return false;
  }
  if (! this.getCsolicitud().equals(that.getCsolicitud())){
    return false;
  }
  if (this.getCpersona_compania() == null || that.getCpersona_compania() == null){
      return false;
  }
  if (! this.getCpersona_compania().equals(that.getCpersona_compania())){
    return false;
  }
  if (this.getSecuencia() == null || that.getSecuencia() == null){
      return false;
  }
  if (! this.getSecuencia().equals(that.getSecuencia())){
    return false;
  }
  if (this.getScuentamercaderia() == null || that.getScuentamercaderia() == null){
      return false;
  }
  if (! this.getScuentamercaderia().equals(that.getScuentamercaderia())){
    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 TsolicitudemerchandiseKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCsolicitud() == null ? 0 : this.getCsolicitud().hashCode());
    result = result * 37 + (this.getCpersona_compania() == null ? 0 : this.getCpersona_compania().hashCode());
    result = result * 37 + (this.getSecuencia() == null ? 0 : this.getSecuencia().hashCode());
    result = result * 37 + (this.getScuentamercaderia() == null ? 0 : this.getScuentamercaderia().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;
}
}
