181 lines
5.1 KiB
Plaintext
Executable File
181 lines
5.1 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.gene;
|
|
|
|
import javax.persistence.EmbeddedId;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.EntityManager;
|
|
import java.io.Serializable;
|
|
import javax.persistence.Table;
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Transient;
|
|
import java.sql.Date;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENEREVOKESOLICITUDE*/
|
|
@Entity(name="TgeneRevokeSolicitude")
|
|
@Table(name="TGENEREVOKESOLICITUDE")
|
|
public class TgeneRevokeSolicitude extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable{
|
|
/**
|
|
* HashCode asociado con la Instancia
|
|
*/
|
|
@Transient
|
|
private int hashValue = 0;
|
|
/**
|
|
* Version de la Clase
|
|
*/
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
|
* Clave primaria de la Entidad TgeneRevokeSolicitude
|
|
*/
|
|
@EmbeddedId
|
|
private TgeneRevokeSolicitudeKey pk;
|
|
@Column(name="ACCOUNT", nullable=true)
|
|
|
|
/**
|
|
* Numero de cuenta asociado a la solicitud
|
|
*/
|
|
private String account;
|
|
|
|
@Column(name="REMARK", nullable=false)
|
|
|
|
/**
|
|
* Motivo de anulacion de la solicitud
|
|
*/
|
|
private String remark;
|
|
|
|
@Column(name="WORKINGDATE", nullable=false)
|
|
|
|
/**
|
|
* Fecha de trabajo de la aplicacion
|
|
*/
|
|
private Date workingdate;
|
|
|
|
/**Contructor por defecto*/
|
|
public TgeneRevokeSolicitude(){
|
|
}
|
|
/**Contructor de TgeneRevokeSolicitude
|
|
@param pPk Clave Primaria del entity
|
|
@param pRemark Motivo de anulacion de la solicitud
|
|
@param pWorkingdate Fecha de trabajo de la aplicacion
|
|
*/
|
|
public TgeneRevokeSolicitude(TgeneRevokeSolicitudeKey pPk,String pRemark,Date pWorkingdate){
|
|
this();
|
|
pk=pPk;
|
|
remark=pRemark;
|
|
workingdate=pWorkingdate;
|
|
}
|
|
/**
|
|
* Metodo que entrega datos de la tabla dada la clave primaria.
|
|
* @param pEntityManager referencia de la session a obtener datos del bean.
|
|
* @param pKey Caleve primaria del bean.
|
|
* @return TgeneRevokeSolicitude
|
|
*/
|
|
public static TgeneRevokeSolicitude find(EntityManager pEntityManager,TgeneRevokeSolicitudeKey pKey) throws Exception{
|
|
TgeneRevokeSolicitude obj = pEntityManager.find(TgeneRevokeSolicitude.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TgeneRevokeSolicitude
|
|
@return El objeto que referencia a la Clave primaria de TgeneRevokeSolicitude
|
|
*/
|
|
public TgeneRevokeSolicitudeKey getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TgeneRevokeSolicitude
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneRevokeSolicitude
|
|
*/
|
|
public void setPk(TgeneRevokeSolicitudeKey pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de account
|
|
@return valor de account*/
|
|
public String getAccount(){
|
|
return account;
|
|
}
|
|
/**Fija el valor de account
|
|
@param pAccount nuevo Valor de account*/
|
|
public void setAccount(String pAccount){
|
|
account=pAccount;
|
|
}
|
|
|
|
/**Obtiene el valor de remark
|
|
@return valor de remark*/
|
|
public String getRemark(){
|
|
return remark;
|
|
}
|
|
/**Fija el valor de remark
|
|
@param pRemark nuevo Valor de remark*/
|
|
public void setRemark(String pRemark){
|
|
remark=pRemark;
|
|
}
|
|
|
|
/**Obtiene el valor de workingdate
|
|
@return valor de workingdate*/
|
|
public Date getWorkingdate(){
|
|
return workingdate;
|
|
}
|
|
/**Fija el valor de workingdate
|
|
@param pWorkingdate nuevo Valor de workingdate*/
|
|
public void setWorkingdate(Date pWorkingdate){
|
|
workingdate=pWorkingdate;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TgeneRevokeSolicitude))return false;
|
|
TgeneRevokeSolicitude that = (TgeneRevokeSolicitude) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TgeneRevokeSolicitude
|
|
@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;
|
|
}
|
|
/**Implementacion 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;
|
|
}
|
|
/**Implementacion de la creacion de un bean en blanco TgeneRevokeSolicitude
|
|
*/
|
|
public Object createInstance(){
|
|
TgeneRevokeSolicitude instance=new TgeneRevokeSolicitude();
|
|
instance.setPk(new TgeneRevokeSolicitudeKey());
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TgeneRevokeSolicitude
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TgeneRevokeSolicitude p=(TgeneRevokeSolicitude)this.clone();
|
|
p.setPk((TgeneRevokeSolicitudeKey)this.pk.cloneMe());
|
|
return p;
|
|
}
|
|
}
|