223 lines
5.1 KiB
Plaintext
Executable File
223 lines
5.1 KiB
Plaintext
Executable File
package com.fp.hbm.persistence;
|
||
|
||
import java.io.Serializable;
|
||
import java.lang.reflect.Field;
|
||
|
||
import com.fp.dto.hb.HibernateBean;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla THBFIELDS*/
|
||
public class TFields1 extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable{
|
||
/**
|
||
* HashCode asociado con la Instancia
|
||
*/
|
||
private volatile int hashValue = 0;
|
||
/**
|
||
* Version de la Clase
|
||
*/
|
||
private static final long serialVersionUID = 1L;
|
||
/**
|
||
* Clave primaria de la Entidad TFields
|
||
*/
|
||
private TgeneFieldsKey pk;
|
||
/**
|
||
* CAMPO FROMDB
|
||
*/
|
||
private String fromdb;
|
||
|
||
/**
|
||
* CAMPO TYPE
|
||
*/
|
||
private String type;
|
||
|
||
/**
|
||
* CAMPO CANINSERT
|
||
*/
|
||
private String caninsert;
|
||
|
||
/**
|
||
* CAMPO CANUPDATE
|
||
*/
|
||
private String canupdate;
|
||
|
||
/**
|
||
* CAMPO FKTNAME
|
||
*/
|
||
private String fktname;
|
||
|
||
/**
|
||
* CAMPO FKENTITY
|
||
*/
|
||
private String fkentity;
|
||
|
||
/**
|
||
* CAMPO FKCONSTRAINT
|
||
*/
|
||
private String fkconstraint;
|
||
|
||
/**Contructor por defecto*/
|
||
public TFields1(){
|
||
|
||
}
|
||
/**Contructor de TFields
|
||
@param pPk Clave Primaria del entity
|
||
@param pFromdb CAMPO FROMDB
|
||
@param pCaninsert CAMPO CANINSERT
|
||
@param pCanupdate CAMPO CANUPDATE
|
||
*/
|
||
public TFields1(TgeneFieldsKey pPk,String pFromdb,String pCaninsert,String pCanupdate){
|
||
this();
|
||
pk=pPk;
|
||
fromdb=pFromdb;
|
||
caninsert=pCaninsert;
|
||
canupdate=pCanupdate;
|
||
}
|
||
/**Entrega la Clave primaria de TFields
|
||
@return El objeto que referencia a la Clave primaria de TFields
|
||
*/
|
||
public TgeneFieldsKey getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TFields
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TFields
|
||
*/
|
||
public void setPk(TgeneFieldsKey pPk){
|
||
pk=pPk;
|
||
}
|
||
/**Obtiene el valor de fromdb
|
||
@return valor de fromdb*/
|
||
public String getFromdb(){
|
||
return fromdb;
|
||
}
|
||
/**Fija el valor de fromdb
|
||
@param pFromdb nuevo Valor de fromdb*/
|
||
public void setFromdb(String pFromdb){
|
||
fromdb=pFromdb;
|
||
}
|
||
|
||
/**Obtiene el valor de type
|
||
@return valor de type*/
|
||
public String getType(){
|
||
return type;
|
||
}
|
||
/**Fija el valor de type
|
||
@param pType nuevo Valor de type*/
|
||
public void setType(String pType){
|
||
type=pType;
|
||
}
|
||
|
||
/**Obtiene el valor de caninsert
|
||
@return valor de caninsert*/
|
||
public String getCaninsert(){
|
||
return caninsert;
|
||
}
|
||
/**Fija el valor de caninsert
|
||
@param pCaninsert nuevo Valor de caninsert*/
|
||
public void setCaninsert(String pCaninsert){
|
||
caninsert=pCaninsert;
|
||
}
|
||
|
||
/**Obtiene el valor de canupdate
|
||
@return valor de canupdate*/
|
||
public String getCanupdate(){
|
||
return canupdate;
|
||
}
|
||
/**Fija el valor de canupdate
|
||
@param pCanupdate nuevo Valor de canupdate*/
|
||
public void setCanupdate(String pCanupdate){
|
||
canupdate=pCanupdate;
|
||
}
|
||
|
||
/**Obtiene el valor de fktname
|
||
@return valor de fktname*/
|
||
public String getFktname(){
|
||
return fktname;
|
||
}
|
||
/**Fija el valor de fktname
|
||
@param pFktname nuevo Valor de fktname*/
|
||
public void setFktname(String pFktname){
|
||
fktname=pFktname;
|
||
}
|
||
|
||
/**Obtiene el valor de fkentity
|
||
@return valor de fkentity*/
|
||
public String getFkentity(){
|
||
return fkentity;
|
||
}
|
||
/**Fija el valor de fkentity
|
||
@param pFkentity nuevo Valor de fkentity*/
|
||
public void setFkentity(String pFkentity){
|
||
fkentity=pFkentity;
|
||
}
|
||
|
||
/**Obtiene el valor de fkconstraint
|
||
@return valor de fkconstraint*/
|
||
public String getFkconstraint(){
|
||
return fkconstraint;
|
||
}
|
||
/**Fija el valor de fkconstraint
|
||
@param pFkconstraint nuevo Valor de fkconstraint*/
|
||
public void setFkconstraint(String pFkconstraint){
|
||
fkconstraint=pFkconstraint;
|
||
}
|
||
|
||
/**Implementaci<63>n de la comparacion de la entidad TFields
|
||
@param rhs Elemento de comparacion
|
||
@return el resultado de la comparacion
|
||
*/
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TFields1))return false;
|
||
TFields1 that = (TFields1) rhs;
|
||
if (this.getPk() == null || that.getPk() == null)
|
||
return false;
|
||
return (this.getPk().equals(that.getPk()));
|
||
}
|
||
/**Implementaci<63>n del metodo hashCode de la la entidad TFields
|
||
@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<63>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+=name+"="+f.get(this)+";";
|
||
}catch(Exception e){
|
||
continue;
|
||
}
|
||
}
|
||
if(data.compareTo("")==0){
|
||
data=super.toString();
|
||
}
|
||
return data;
|
||
}
|
||
/**Implementaci<63>n de la creaci<63>n de un bean en blancoTFields
|
||
*/
|
||
public Object createInstance(){
|
||
TFields1 instance=new TFields1();
|
||
instance.setPk(new TgeneFieldsKey());
|
||
return instance;
|
||
}
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TFields1 p=(TFields1)this.clone();
|
||
p.setPk((TgeneFieldsKey)this.pk.cloneMe());
|
||
return p;
|
||
}
|
||
}
|