215 lines
6.4 KiB
Plaintext
Executable File
215 lines
6.4 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.param;
|
|
|
|
import java.io.Serializable;
|
|
import java.lang.reflect.Field;
|
|
import java.sql.Date;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.EntityManager;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Transient;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
import org.hibernate.annotations.Parameter;
|
|
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import com.fp.dto.hb.Log;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TARMTRAMITESATENDIDOS*/
|
|
@Entity(name="TarmTramitesAtendidos")
|
|
@Table(name="TARMTRAMITESATENDIDOS")
|
|
public class TarmTramitesAtendidos extends com.fp.dto.AbstractDataTransport implements Serializable,HibernateBean,Cloneable, Log {
|
|
/**
|
|
* 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 TarmTramitesAtendidos
|
|
*/
|
|
@Id
|
|
@Column(name="CTRAMITEATENDIDO" ,nullable=false, updatable=false)
|
|
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SequenceKey", parameters = {
|
|
@Parameter(name = "name", value = "CTRAMITEATENDIDO"),
|
|
@Parameter(name = "type", value = "java.lang.Long"),
|
|
@Parameter(name = "fill", value = "0"),
|
|
@Parameter(name = "length", value = "16")})
|
|
@GeneratedValue(generator = "seq_id")
|
|
private Long pk;
|
|
@Column(name="CCENTROCONTROL", nullable=false)
|
|
|
|
/**
|
|
* Clave foranea del centro de control referido
|
|
*/
|
|
private String ccentrocontrol;
|
|
|
|
@Column(name="CTRAMITE", nullable=false)
|
|
|
|
/**
|
|
* Clave foranea del codio de tramite referido
|
|
*/
|
|
private Long ctramite;
|
|
|
|
@Column(name="FECHAREGISTRO", nullable=false)
|
|
|
|
/**
|
|
* Fecha en que se ingresa el registro
|
|
*/
|
|
private Date fecharegistro;
|
|
|
|
@Column(name="FECHAATENCION", nullable=false)
|
|
|
|
/**
|
|
* Fecha programada para la tencion del tramite por el centro de control
|
|
*/
|
|
private Date fechaatencion;
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmTramitesAtendidos(){
|
|
}
|
|
/**Contructor de TarmTramitesAtendidos
|
|
@param pPk Clave Primaria del entity
|
|
@param pCcentrocontrol Clave foranea del centro de control referido
|
|
@param pCtramite Clave foranea del codio de tramite referido
|
|
@param pFecharegistro Fecha en que se ingresa el registro
|
|
@param pFechaatencion Fecha programada para la tencion del tramite por el centro de control
|
|
*/
|
|
public TarmTramitesAtendidos(Long pPk,String pCcentrocontrol,Long pCtramite,Date pFecharegistro,Date pFechaatencion){
|
|
this();
|
|
pk=pPk;
|
|
ccentrocontrol=pCcentrocontrol;
|
|
ctramite=pCtramite;
|
|
fecharegistro=pFecharegistro;
|
|
fechaatencion=pFechaatencion;
|
|
}
|
|
/**
|
|
* 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 TarmTramitesAtendidos
|
|
*/
|
|
public static TarmTramitesAtendidos find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmTramitesAtendidos obj = pEntityManager.find(TarmTramitesAtendidos.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmTramitesAtendidos
|
|
@return El objeto que referencia a la Clave primaria de TarmTramitesAtendidos
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmTramitesAtendidos
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmTramitesAtendidos
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de ccentrocontrol
|
|
@return valor de ccentrocontrol*/
|
|
public String getCcentrocontrol(){
|
|
return ccentrocontrol;
|
|
}
|
|
/**Fija el valor de ccentrocontrol
|
|
@param pCcentrocontrol nuevo Valor de ccentrocontrol*/
|
|
public void setCcentrocontrol(String pCcentrocontrol){
|
|
ccentrocontrol=pCcentrocontrol;
|
|
}
|
|
|
|
/**Obtiene el valor de ctramite
|
|
@return valor de ctramite*/
|
|
public Long getCtramite(){
|
|
return ctramite;
|
|
}
|
|
/**Fija el valor de ctramite
|
|
@param pCtramite nuevo Valor de ctramite*/
|
|
public void setCtramite(Long pCtramite){
|
|
ctramite=pCtramite;
|
|
}
|
|
|
|
/**Obtiene el valor de fecharegistro
|
|
@return valor de fecharegistro*/
|
|
public Date getFecharegistro(){
|
|
return fecharegistro;
|
|
}
|
|
/**Fija el valor de fecharegistro
|
|
@param pFecharegistro nuevo Valor de fecharegistro*/
|
|
public void setFecharegistro(Date pFecharegistro){
|
|
fecharegistro=pFecharegistro;
|
|
}
|
|
|
|
/**Obtiene el valor de fechaatencion
|
|
@return valor de fechaatencion*/
|
|
public Date getFechaatencion(){
|
|
return fechaatencion;
|
|
}
|
|
/**Fija el valor de fechaatencion
|
|
@param pFechaatencion nuevo Valor de fechaatencion*/
|
|
public void setFechaatencion(Date pFechaatencion){
|
|
fechaatencion=pFechaatencion;
|
|
}
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmTramitesAtendidos))return false;
|
|
TarmTramitesAtendidos that = (TarmTramitesAtendidos) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmTramitesAtendidos
|
|
@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 TarmTramitesAtendidos
|
|
*/
|
|
public Object createInstance(){
|
|
TarmTramitesAtendidos instance=new TarmTramitesAtendidos();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmTramitesAtendidos
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmTramitesAtendidos p=(TarmTramitesAtendidos)this.clone();
|
|
return p;
|
|
}
|
|
}
|