package com.fitbank.hb.persistence.trans;

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

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

/**
* Codigo de la transaccion
*/
private String ctransaccion;

/**
* Version de transaccion
*/
private String versiontransaccion;

/**
* Secuencia de comando de la transaccion.
*/
private Integer scomando;

/**Contructor por defecto*/
public TcommandmanagementKey(){}
/**Contructor de TcommandmanagementKey
@param pCsubsistema Codigo del subsistema
@param pCtransaccion Codigo de la transaccion
@param pVersiontransaccion Version de transaccion
@param pScomando Secuencia de comando de la transaccion.
*/
public TcommandmanagementKey(String pCsubsistema,String pCtransaccion,String pVersiontransaccion,Integer pScomando){
 csubsistema=pCsubsistema;
 ctransaccion=pCtransaccion;
 versiontransaccion=pVersiontransaccion;
 scomando=pScomando;
}
public static final String CSUBSISTEMA="CSUBSISTEMA";
/**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;
}

public static final String CTRANSACCION="CTRANSACCION";
/**Obtiene el valor de ctransaccion
@return valor de ctransaccion*/
public String getCtransaccion(){
  return ctransaccion;
}
/**Fija el valor de ctransaccion
@param pCtransaccion nuevo Valor de ctransaccion*/
public void setCtransaccion(String pCtransaccion){
  ctransaccion=pCtransaccion;
}

public static final String VERSIONTRANSACCION="VERSIONTRANSACCION";
/**Obtiene el valor de versiontransaccion
@return valor de versiontransaccion*/
public String getVersiontransaccion(){
  return versiontransaccion;
}
/**Fija el valor de versiontransaccion
@param pVersiontransaccion nuevo Valor de versiontransaccion*/
public void setVersiontransaccion(String pVersiontransaccion){
  versiontransaccion=pVersiontransaccion;
}

public static final String SCOMANDO="SCOMANDO";
/**Obtiene el valor de scomando
@return valor de scomando*/
public Integer getScomando(){
  return scomando;
}
/**Fija el valor de scomando
@param pScomando nuevo Valor de scomando*/
public void setScomando(Integer pScomando){
  scomando=pScomando;
}

public static final String PK_CSUBSISTEMA="CSUBSISTEMA";
public static final String PK_CTRANSACCION="CTRANSACCION";
public static final String PK_VERSIONTRANSACCION="VERSIONTRANSACCION";
public static final String PK_SCOMANDO="SCOMANDO";
/**Implementaciï¿½n de la comparaciï¿½n de TcommandmanagementKey
@param o Objeto de comparaciÃ¯Â¿Â½n
*/
public boolean equals(Object o){
  if (o == null){return false;}
  if (! (o instanceof TcommandmanagementKey)){return false;}
  TcommandmanagementKey that = (TcommandmanagementKey) o;
  if (this.getCsubsistema() == null || that.getCsubsistema() == null){
      return false;
  }
  if (! this.getCsubsistema().equals(that.getCsubsistema())){
    return false;
  }
  if (this.getCtransaccion() == null || that.getCtransaccion() == null){
      return false;
  }
  if (! this.getCtransaccion().equals(that.getCtransaccion())){
    return false;
  }
  if (this.getVersiontransaccion() == null || that.getVersiontransaccion() == null){
      return false;
  }
  if (! this.getVersiontransaccion().equals(that.getVersiontransaccion())){
    return false;
  }
  if (this.getScomando() == null || that.getScomando() == null){
      return false;
  }
  if (! this.getScomando().equals(that.getScomando())){
    return false;
  }
  return true;
}
/**Implementaciï¿½n del mï¿½todo hashCode bajo el patrï¿½n de Bloch
@return hashCode de la instancia TcommandmanagementKey
*/
public int hashCode(){
  if (this.hashValue == 0){
    int result = 17;
    result = result * 37 + (this.getCsubsistema() == null ? 0 : this.getCsubsistema().hashCode());
    result = result * 37 + (this.getCtransaccion() == null ? 0 : this.getCtransaccion().hashCode());
    result = result * 37 + (this.getVersiontransaccion() == null ? 0 : this.getVersiontransaccion().hashCode());
    result = result * 37 + (this.getScomando() == null ? 0 : this.getScomando().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;
	}
}
