322 lines
8.2 KiB
Plaintext
Executable File
322 lines
8.2 KiB
Plaintext
Executable File
package com.fp.persistence.pgeneral.page;
|
|
|
|
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 javax.persistence.Version;
|
|
import java.lang.reflect.Field;
|
|
import javax.persistence.Transient;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TGENETRANSACTIONPAGES*/
|
|
@Entity(name="TgeneTransactionPages")
|
|
@Table(name="TGENETRANSACTIONPAGES")
|
|
public class TgeneTransactionPages 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 TgeneTransactionPages
|
|
*/
|
|
@EmbeddedId
|
|
private TgeneTransactionPagesKey pk;
|
|
@Column(name="CONTROLLER", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String controller;
|
|
|
|
@Column(name="ACTIVE", nullable=true)
|
|
|
|
/**
|
|
* Y Indica que la pagina esta activa
|
|
*/
|
|
private String active;
|
|
|
|
@Column(name="AUTODOWNLOAD", nullable=true)
|
|
|
|
/**
|
|
* Y Indica que la definicon de la pagina tiene un autodownload y no espera a que se presione un click en el tab para descargar la pagina
|
|
*/
|
|
private String autodownload;
|
|
|
|
@Column(name="PAGEJSF", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String pagejsf;
|
|
|
|
@Column(name="PRESENTATIONORDER", nullable=true)
|
|
|
|
/**
|
|
* Orden de preentacion de la pagina en la pantalla
|
|
*/
|
|
private Integer presentationorder;
|
|
|
|
@Column(name="PAGE", nullable=true)
|
|
|
|
/**
|
|
* Nombre de la pagina asociada al tab
|
|
*/
|
|
private String page;
|
|
|
|
@Column(name="TITLE", nullable=true)
|
|
|
|
/**
|
|
* Titulo del tab
|
|
*/
|
|
private String title;
|
|
|
|
@Column(name="DESCRIPTION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String description;
|
|
|
|
@Version
|
|
@Column(name="RECORDVERSION", nullable=true)
|
|
|
|
/**
|
|
* Optimistic locking del registro
|
|
*/
|
|
private Integer recordversion;
|
|
|
|
@Column(name="QUERYFUNCTION", nullable=true)
|
|
|
|
/**
|
|
* Nombre de la funcion de la pagina que ejecuta la consulta
|
|
*/
|
|
private String queryfunction;
|
|
|
|
@Column(name="SAVEFUNCTION", nullable=true)
|
|
|
|
/**
|
|
* Nombre de la funcion que se encarga de hacer el commit de la pagina
|
|
*/
|
|
private String savefunction;
|
|
|
|
/**Contructor por defecto*/
|
|
public TgeneTransactionPages(){
|
|
}
|
|
/**Contructor de TgeneTransactionPages
|
|
@param pPk Clave Primaria del entity
|
|
*/
|
|
public TgeneTransactionPages(TgeneTransactionPagesKey pPk){
|
|
this();
|
|
pk=pPk;
|
|
}
|
|
/**
|
|
* 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 TgeneTransactionPages
|
|
*/
|
|
public static TgeneTransactionPages find(EntityManager pEntityManager,TgeneTransactionPagesKey pKey) throws Exception{
|
|
TgeneTransactionPages obj = pEntityManager.find(TgeneTransactionPages.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TgeneTransactionPages
|
|
@return El objeto que referencia a la Clave primaria de TgeneTransactionPages
|
|
*/
|
|
public TgeneTransactionPagesKey getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TgeneTransactionPages
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TgeneTransactionPages
|
|
*/
|
|
public void setPk(TgeneTransactionPagesKey pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de controller
|
|
@return valor de controller*/
|
|
public String getController(){
|
|
return controller;
|
|
}
|
|
/**Fija el valor de controller
|
|
@param pController nuevo Valor de controller*/
|
|
public void setController(String pController){
|
|
controller=pController;
|
|
}
|
|
|
|
/**Obtiene el valor de active
|
|
@return valor de active*/
|
|
public String getActive(){
|
|
return active;
|
|
}
|
|
/**Fija el valor de active
|
|
@param pActive nuevo Valor de active*/
|
|
public void setActive(String pActive){
|
|
active=pActive;
|
|
}
|
|
|
|
/**Obtiene el valor de autodownload
|
|
@return valor de autodownload*/
|
|
public String getAutodownload(){
|
|
return autodownload;
|
|
}
|
|
/**Fija el valor de autodownload
|
|
@param pAutodownload nuevo Valor de autodownload*/
|
|
public void setAutodownload(String pAutodownload){
|
|
autodownload=pAutodownload;
|
|
}
|
|
|
|
/**Obtiene el valor de pagejsf
|
|
@return valor de pagejsf*/
|
|
public String getPagejsf(){
|
|
return pagejsf;
|
|
}
|
|
/**Fija el valor de pagejsf
|
|
@param pPagejsf nuevo Valor de pagejsf*/
|
|
public void setPagejsf(String pPagejsf){
|
|
pagejsf=pPagejsf;
|
|
}
|
|
|
|
/**Obtiene el valor de presentationorder
|
|
@return valor de presentationorder*/
|
|
public Integer getPresentationorder(){
|
|
return presentationorder;
|
|
}
|
|
/**Fija el valor de presentationorder
|
|
@param pPresentationorder nuevo Valor de presentationorder*/
|
|
public void setPresentationorder(Integer pPresentationorder){
|
|
presentationorder=pPresentationorder;
|
|
}
|
|
|
|
/**Obtiene el valor de page
|
|
@return valor de page*/
|
|
public String getPage(){
|
|
return page;
|
|
}
|
|
/**Fija el valor de page
|
|
@param pPage nuevo Valor de page*/
|
|
public void setPage(String pPage){
|
|
page=pPage;
|
|
}
|
|
|
|
/**Obtiene el valor de title
|
|
@return valor de title*/
|
|
public String getTitle(){
|
|
return title;
|
|
}
|
|
/**Fija el valor de title
|
|
@param pTitle nuevo Valor de title*/
|
|
public void setTitle(String pTitle){
|
|
title=pTitle;
|
|
}
|
|
|
|
/**Obtiene el valor de description
|
|
@return valor de description*/
|
|
public String getDescription(){
|
|
return description;
|
|
}
|
|
/**Fija el valor de description
|
|
@param pDescription nuevo Valor de description*/
|
|
public void setDescription(String pDescription){
|
|
description=pDescription;
|
|
}
|
|
|
|
/**Obtiene el valor de recordversion
|
|
@return valor de recordversion*/
|
|
public Integer getRecordversion(){
|
|
return recordversion;
|
|
}
|
|
/**Fija el valor de recordversion
|
|
@param pRecordversion nuevo Valor de recordversion*/
|
|
public void setRecordversion(Integer pRecordversion){
|
|
recordversion=pRecordversion;
|
|
}
|
|
|
|
/**Obtiene el valor de queryfunction
|
|
@return valor de queryfunction*/
|
|
public String getQueryfunction(){
|
|
return queryfunction;
|
|
}
|
|
/**Fija el valor de queryfunction
|
|
@param pQueryfunction nuevo Valor de queryfunction*/
|
|
public void setQueryfunction(String pQueryfunction){
|
|
queryfunction=pQueryfunction;
|
|
}
|
|
|
|
/**Obtiene el valor de savefunction
|
|
@return valor de savefunction*/
|
|
public String getSavefunction(){
|
|
return savefunction;
|
|
}
|
|
/**Fija el valor de savefunction
|
|
@param pSavefunction nuevo Valor de savefunction*/
|
|
public void setSavefunction(String pSavefunction){
|
|
savefunction=pSavefunction;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TgeneTransactionPages))return false;
|
|
TgeneTransactionPages that = (TgeneTransactionPages) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TgeneTransactionPages
|
|
@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 TgeneTransactionPages
|
|
*/
|
|
public Object createInstance(){
|
|
TgeneTransactionPages instance=new TgeneTransactionPages();
|
|
instance.setPk(new TgeneTransactionPagesKey());
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TgeneTransactionPages
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TgeneTransactionPages p=(TgeneTransactionPages)this.clone();
|
|
p.setPk((TgeneTransactionPagesKey)this.pk.cloneMe());
|
|
return p;
|
|
}
|
|
}
|