package com.fitbank.hb.persistence.cash;

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

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

/**
*  
*/
private Integer coficina_destino;

/**
*  
*/
private Date fcontable;

/**
*  
*/
private Long secuencia;

/**Contructor por defecto*/
public VofficetransferKey(){}
/**Contructor de VofficetransferKey
@param pCoficina  
@param pCoficina_destino  
@param pFcontable  
@param pSecuencia  
*/
public VofficetransferKey(Integer pCoficina,Integer pCoficina_destino,Date pFcontable,Long pSecuencia){
 coficina=pCoficina;
 coficina_destino=pCoficina_destino;
 fcontable=pFcontable;
 secuencia=pSecuencia;
}
public static final String COFICINA="COFICINA";
/**Obtiene el valor de coficina
@return valor de coficina*/
public Integer getCoficina(){
  return coficina;
}
/**Fija el valor de coficina
@param pCoficina nuevo Valor de coficina*/
public void setCoficina(Integer pCoficina){
  coficina=pCoficina;
}

public static final String COFICINA_DESTINO="COFICINA_DESTINO";
/**Obtiene el valor de coficina_destino
@return valor de coficina_destino*/
public Integer getCoficina_destino(){
  return coficina_destino;
}
/**Fija el valor de coficina_destino
@param pCoficina_destino nuevo Valor de coficina_destino*/
public void setCoficina_destino(Integer pCoficina_destino){
  coficina_destino=pCoficina_destino;
}

public static final String FCONTABLE="FCONTABLE";
/**Obtiene el valor de fcontable
@return valor de fcontable*/
public Date getFcontable(){
  return fcontable;
}
/**Fija el valor de fcontable
@param pFcontable nuevo Valor de fcontable*/
public void setFcontable(Date pFcontable){
  fcontable=pFcontable;
}

public static final String SECUENCIA="SECUENCIA";
/**Obtiene el valor de secuencia
@return valor de secuencia*/
public Long getSecuencia(){
  return secuencia;
}
/**Fija el valor de secuencia
@param pSecuencia nuevo Valor de secuencia*/
public void setSecuencia(Long pSecuencia){
  secuencia=pSecuencia;
}

public static final String PK_COFICINA="COFICINA";
public static final String PK_COFICINA_DESTINO="COFICINA_DESTINO";
public static final String PK_FCONTABLE="FCONTABLE";
public static final String PK_SECUENCIA="SECUENCIA";
/**Implementaci?n de la comparaci?n de VofficetransferKey
@param o Objeto de comparaci?n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof VofficetransferKey)){return false;}
  VofficetransferKey that = (VofficetransferKey) o;
  if (this.getCoficina() == null || that.getCoficina() == null){
      return false;
  }
  if (! this.getCoficina().equals(that.getCoficina())){
    return false;
  }
  if (this.getCoficina_destino() == null || that.getCoficina_destino() == null){
      return false;
  }
  if (! this.getCoficina_destino().equals(that.getCoficina_destino())){
    return false;
  }
  if (this.getFcontable() == null || that.getFcontable() == null){
      return false;
  }
  if (! this.getFcontable().equals(that.getFcontable())){
    return false;
  }
  if (this.getSecuencia() == null || that.getSecuencia() == null){
      return false;
  }
  if (! this.getSecuencia().equals(that.getSecuencia())){
    return false;
  }
  return true;
}
/**Implementaci?n del m?todo hashCode bajo el patr?n de Bloch
@return hashCode de la instancia VofficetransferKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCoficina() == null ? 0 : this.getCoficina().hashCode());
    result = result * 37 + (this.getCoficina_destino() == null ? 0 : this.getCoficina_destino().hashCode());
    result = result * 37 + (this.getFcontable() == null ? 0 : this.getFcontable().hashCode());
    result = result * 37 + (this.getSecuencia() == null ? 0 : this.getSecuencia().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;
	}
}
