maia/.svn/pristine/b2/b2cfab9a8ad0b506b9c9b81e9ed...

233 lines
7.5 KiB
Plaintext
Executable File

package com.fp.persistence.pgeneral.trans;
import javax.persistence.Column;
import java.io.Serializable;
import com.fp.dto.hb.HibernateId;
import java.lang.reflect.Field;
import javax.persistence.Embeddable;
import javax.persistence.Transient;
/**Clase que hace referencia a la Clave Primaria de TGENETRANSACTIONPROVISION*/
@Embeddable
public class TgeneTransactionProvisionKey extends com.fp.dto.AbstractDataTransport implements Serializable,Cloneable,HibernateId{
/**
* HashCode asociado con la Instancia
*/
@Transient
private int hashValue = 0;
/**
* Version de la Clase
*/
private static final long serialVersionUID = 1L;
@Column(name="CAPITALBALANCETYPE", nullable=false,updatable=false)
/**
* Código de tipo de saldo de capital sobre el cual se calcula intereses, ejemplo capital prestamos, sobregiro contratado utilizado.
*/
private String capitalbalancetype;
@Column(name="CAPITALBALANCEGROUP", nullable=false,updatable=false)
/**
* Codigo del grupo de balance 1 Activo, 2 Pasivo al cual pertenece el tipo de saldos de capital
*/
private String capitalbalancegroup;
@Column(name="MODULECODE", nullable=false,updatable=false)
/**
* Codigo de modulo
*/
private String modulecode;
@Column(name="STATUSCODE", nullable=false,updatable=false)
/**
* Estatus de cuenta
*/
private String statuscode;
@Column(name="BALANCETYPE", nullable=false,updatable=false)
/**
* Código de tipo de saldo de provision.
*/
private String balancetype;
@Column(name="BALANCEGROUP", nullable=false,updatable=false)
/**
* Codigo del grupo de balance 1 Activo, 2 Pasivo, al que pertenece el tipo de saldo de capital.
*/
private String balancegroup;
/**Contructor por defecto*/
public TgeneTransactionProvisionKey(){}
/**Contructor de TgeneTransactionProvisionKey
@param pCapitalbalancetype Código de tipo de saldo de capital sobre el cual se calcula intereses, ejemplo capital prestamos, sobregiro contratado utilizado.
@param pCapitalbalancegroup Codigo del grupo de balance 1 Activo, 2 Pasivo al cual pertenece el tipo de saldos de capital
@param pModulecode Codigo de modulo
@param pStatuscode Estatus de cuenta
@param pBalancetype Código de tipo de saldo de provision.
@param pBalancegroup Codigo del grupo de balance 1 Activo, 2 Pasivo, al que pertenece el tipo de saldo de capital.
*/
public TgeneTransactionProvisionKey(String pCapitalbalancetype,String pCapitalbalancegroup,String pModulecode,String pStatuscode,String pBalancetype,String pBalancegroup){
capitalbalancetype=pCapitalbalancetype;
capitalbalancegroup=pCapitalbalancegroup;
modulecode=pModulecode;
statuscode=pStatuscode;
balancetype=pBalancetype;
balancegroup=pBalancegroup;
}
/**Obtiene el valor de capitalbalancetype
@return valor de capitalbalancetype*/
public String getCapitalbalancetype(){
return capitalbalancetype;
}
/**Fija el valor de capitalbalancetype
@param pCapitalbalancetype nuevo Valor de capitalbalancetype*/
public void setCapitalbalancetype(String pCapitalbalancetype){
capitalbalancetype=pCapitalbalancetype;
}
/**Obtiene el valor de capitalbalancegroup
@return valor de capitalbalancegroup*/
public String getCapitalbalancegroup(){
return capitalbalancegroup;
}
/**Fija el valor de capitalbalancegroup
@param pCapitalbalancegroup nuevo Valor de capitalbalancegroup*/
public void setCapitalbalancegroup(String pCapitalbalancegroup){
capitalbalancegroup=pCapitalbalancegroup;
}
/**Obtiene el valor de modulecode
@return valor de modulecode*/
public String getModulecode(){
return modulecode;
}
/**Fija el valor de modulecode
@param pModulecode nuevo Valor de modulecode*/
public void setModulecode(String pModulecode){
modulecode=pModulecode;
}
/**Obtiene el valor de statuscode
@return valor de statuscode*/
public String getStatuscode(){
return statuscode;
}
/**Fija el valor de statuscode
@param pStatuscode nuevo Valor de statuscode*/
public void setStatuscode(String pStatuscode){
statuscode=pStatuscode;
}
/**Obtiene el valor de balancetype
@return valor de balancetype*/
public String getBalancetype(){
return balancetype;
}
/**Fija el valor de balancetype
@param pBalancetype nuevo Valor de balancetype*/
public void setBalancetype(String pBalancetype){
balancetype=pBalancetype;
}
/**Obtiene el valor de balancegroup
@return valor de balancegroup*/
public String getBalancegroup(){
return balancegroup;
}
/**Fija el valor de balancegroup
@param pBalancegroup nuevo Valor de balancegroup*/
public void setBalancegroup(String pBalancegroup){
balancegroup=pBalancegroup;
}
/**Implementación de la comparación de TgeneTransactionProvisionKey
@param o Objeto de comparación
*/
public boolean equals(Object o){
if (o == null)return false;
if (! (o instanceof TgeneTransactionProvisionKey))return false;
TgeneTransactionProvisionKey that = (TgeneTransactionProvisionKey) o;
if (this.getCapitalbalancetype() == null || that.getCapitalbalancetype() == null){
return false;
}
if (! this.getCapitalbalancetype().equals(that.getCapitalbalancetype())){
return false;
}
if (this.getCapitalbalancegroup() == null || that.getCapitalbalancegroup() == null){
return false;
}
if (! this.getCapitalbalancegroup().equals(that.getCapitalbalancegroup())){
return false;
}
if (this.getModulecode() == null || that.getModulecode() == null){
return false;
}
if (! this.getModulecode().equals(that.getModulecode())){
return false;
}
if (this.getStatuscode() == null || that.getStatuscode() == null){
return false;
}
if (! this.getStatuscode().equals(that.getStatuscode())){
return false;
}
if (this.getBalancetype() == null || that.getBalancetype() == null){
return false;
}
if (! this.getBalancetype().equals(that.getBalancetype())){
return false;
}
if (this.getBalancegroup() == null || that.getBalancegroup() == null){
return false;
}
if (! this.getBalancegroup().equals(that.getBalancegroup())){
return false;
}
return true;
}
/**Implementación del método hashCode bajo el patrón de Bloch
@return hashCode de la instancia TgeneTransactionProvisionKey
*/
public int hashCode(){
if (this.hashValue == 0){
int result = 17;
result = result * 37 + (this.getCapitalbalancetype() == null ? 0 : this.getCapitalbalancetype().hashCode());
result = result * 37 + (this.getCapitalbalancegroup() == null ? 0 : this.getCapitalbalancegroup().hashCode());
result = result * 37 + (this.getModulecode() == null ? 0 : this.getModulecode().hashCode());
result = result * 37 + (this.getStatuscode() == null ? 0 : this.getStatuscode().hashCode());
result = result * 37 + (this.getBalancetype() == null ? 0 : this.getBalancetype().hashCode());
result = result * 37 + (this.getBalancegroup() == null ? 0 : this.getBalancegroup().hashCode());
this.hashValue = result;
}
return this.hashValue;
}
public Object cloneMe() throws CloneNotSupportedException {
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(f.getType().getName().compareTo("java.util.Set")==0)continue;
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;
}
}