294 lines
7.5 KiB
Plaintext
Executable File
294 lines
7.5 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.soli;
|
||
|
||
import java.io.Serializable;
|
||
import java.lang.reflect.Field;
|
||
import java.util.Date;
|
||
|
||
import javax.persistence.Column;
|
||
import javax.persistence.Entity;
|
||
import javax.persistence.GeneratedValue;
|
||
import javax.persistence.EntityManager;
|
||
import javax.persistence.Id;
|
||
import javax.persistence.Table;
|
||
import javax.persistence.Transient;
|
||
|
||
import com.fp.dto.hb.HibernateBean;
|
||
import com.fp.dto.hb.Log;
|
||
|
||
import org.hibernate.annotations.GenericGenerator;
|
||
import org.hibernate.annotations.Parameter;
|
||
|
||
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TarmCertificadoFiscalia*/
|
||
@Entity(name="TarmCertificadoFiscalia")
|
||
@Table(name="TARMCERTIFICADOFISCALIA")
|
||
public class TarmCertificadoFiscalia 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 TarmCertificadoFiscalia
|
||
*/
|
||
@Id
|
||
@Column(name="CCERTIFICADOFISCALIA" ,nullable=false, updatable=false)
|
||
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SequenceKey", parameters = {
|
||
@Parameter(name = "name", value = "CERTIFICADOFISCALIA"),//campo secuencial de la tabla
|
||
@Parameter(name = "type", value = "java.lang.Number"),// tipo de dato
|
||
@Parameter(name = "fill", value = "0"),
|
||
@Parameter(name = "length", value = "8")})
|
||
@GeneratedValue(generator = "seq_id")
|
||
private Long pk;
|
||
|
||
/**
|
||
* Numero de la Solicitid
|
||
*/
|
||
@Column(name="NRSOLICITUD", nullable=true)
|
||
private String nrsolicitud;
|
||
|
||
/**
|
||
* Nombre del Solicitante
|
||
*/
|
||
@Column(name="NOMBRESOLICITANTE", nullable=true)
|
||
private String nombresolicitante;
|
||
|
||
/**
|
||
* Numero de la instruccion Fiscal
|
||
*/
|
||
@Column(name="NRINSTRUCCIONFISCAL", nullable=true)
|
||
private String nrinstruccionfiscal;
|
||
|
||
/**
|
||
* Codigo de persona
|
||
*/
|
||
@Column(name="personcode", nullable=true)
|
||
private Integer personcode;
|
||
|
||
/**
|
||
* Direccion del archivo certificado en alfresco
|
||
*/
|
||
@Column(name="XPATH", nullable=true)
|
||
private String xpath;
|
||
|
||
/**
|
||
* Direccion del archivo certificado en alfresco para el Fiscal
|
||
*/
|
||
@Column(name="XPATHSOLICITUDARMA", nullable=true)
|
||
private String xpathSolicitudArma;
|
||
|
||
/**
|
||
* Fecha de creaci<63>n del registro
|
||
*/
|
||
@Column(name="FCREACION", nullable=true)
|
||
private Date fcreacion;
|
||
|
||
/**
|
||
* Nro. de oficio Fiscalia
|
||
*/
|
||
@Column(name="NROFICIOFISCALIA", nullable=true)
|
||
private String nroficiofiscalia;
|
||
|
||
/**Contructor por defecto*/
|
||
public TarmCertificadoFiscalia(){
|
||
}
|
||
/**Contructor de TarmCertificadoFiscalia
|
||
@param pPk Clave Primaria del entity
|
||
*/
|
||
public TarmCertificadoFiscalia(Long 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 TarmCertificadoFiscalia
|
||
*/
|
||
public static TarmCertificadoFiscalia find(EntityManager pEntityManager,Object pKey) throws Exception{
|
||
TarmCertificadoFiscalia obj = pEntityManager.find(TarmCertificadoFiscalia.class,pKey);
|
||
return obj;
|
||
}
|
||
/**Entrega la Clave primaria de TarmCertificadoFiscalia
|
||
@return El objeto que referencia a la Clave primaria de TarmCertificadoFiscalia
|
||
*/
|
||
public Long getPk(){
|
||
return pk;
|
||
}
|
||
/**Fija un nuevo valor a la Clave primaria de TarmCertificadoFiscalia
|
||
@param pPk El objeto que referencia a la nueva Clave primaria de TarmCertificadoFiscalia
|
||
*/
|
||
public void setPk(Long pPk){
|
||
pk=pPk;
|
||
}
|
||
|
||
|
||
/**
|
||
* @return the hashValue
|
||
*/
|
||
public int getHashValue() {
|
||
return hashValue;
|
||
}
|
||
/**
|
||
* @param hashValue the hashValue to set
|
||
*/
|
||
public void setHashValue(int hashValue) {
|
||
this.hashValue = hashValue;
|
||
}
|
||
/**
|
||
* @return the nrsolicitud
|
||
*/
|
||
public String getNrsolicitud() {
|
||
return nrsolicitud;
|
||
}
|
||
/**
|
||
* @param nrsolicitud the nrsolicitud to set
|
||
*/
|
||
public void setNrsolicitud(String nrsolicitud) {
|
||
this.nrsolicitud = nrsolicitud;
|
||
}
|
||
/**
|
||
* @return the nombresolicitante
|
||
*/
|
||
public String getNombresolicitante() {
|
||
return nombresolicitante;
|
||
}
|
||
/**
|
||
* @param nombresolicitante the nombresolicitante to set
|
||
*/
|
||
public void setNombresolicitante(String nombresolicitante) {
|
||
this.nombresolicitante = nombresolicitante;
|
||
}
|
||
/**
|
||
* @return the nrinstruccionfiscal
|
||
*/
|
||
public String getNrinstruccionfiscal() {
|
||
return nrinstruccionfiscal;
|
||
}
|
||
/**
|
||
* @param nrinstruccionfiscal the nrinstruccionfiscal to set
|
||
*/
|
||
public void setNrinstruccionfiscal(String nrinstruccionfiscal) {
|
||
this.nrinstruccionfiscal = nrinstruccionfiscal;
|
||
}
|
||
/**
|
||
* @return the personcode
|
||
*/
|
||
public Integer getPersoncode() {
|
||
return personcode;
|
||
}
|
||
/**
|
||
* @param personcode the personcode to set
|
||
*/
|
||
public void setPersoncode(Integer personcode) {
|
||
this.personcode = personcode;
|
||
}
|
||
/**
|
||
* @return the xpath
|
||
*/
|
||
public String getXpath() {
|
||
return xpath;
|
||
}
|
||
/**
|
||
* @param xpath the xpath to set
|
||
*/
|
||
public void setXpath(String xpath) {
|
||
this.xpath = xpath;
|
||
}
|
||
/**
|
||
* @return the xpathSolicitudArma
|
||
*/
|
||
public String getXpathSolicitudArma() {
|
||
return xpathSolicitudArma;
|
||
}
|
||
/**
|
||
* @param xpathSolicitudArma the xpathSolicitudArma to set
|
||
*/
|
||
public void setXpathSolicitudArma(String xpathSolicitudArma) {
|
||
this.xpathSolicitudArma = xpathSolicitudArma;
|
||
}
|
||
/**
|
||
* @return the fcreacion
|
||
*/
|
||
public Date getFcreacion() {
|
||
return fcreacion;
|
||
}
|
||
/**
|
||
* @param fcreacion the fcreacion to set
|
||
*/
|
||
public void setFcreacion(Date fcreacion) {
|
||
this.fcreacion = fcreacion;
|
||
}
|
||
/**
|
||
* @return the nroficiofiscalia
|
||
*/
|
||
public String getNroficiofiscalia() {
|
||
return nroficiofiscalia;
|
||
}
|
||
/**
|
||
* @param nroficiofiscalia the nroficiofiscalia to set
|
||
*/
|
||
public void setNroficiofiscalia(String nroficiofiscalia) {
|
||
this.nroficiofiscalia = nroficiofiscalia;
|
||
}
|
||
public boolean equals(Object rhs){
|
||
if (rhs == null)return false;
|
||
if (! (rhs instanceof TarmCertificadoFiscalia))return false;
|
||
TarmCertificadoFiscalia that = (TarmCertificadoFiscalia) rhs;
|
||
if (this.getPk() == null || that.getPk() == null)
|
||
return false;
|
||
return (this.getPk().equals(that.getPk()));
|
||
}
|
||
/**Implementacion del metodo hashCode de la la entidad TarmCertificadoFiscalia
|
||
@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 TarmCertificadoFiscalia
|
||
*/
|
||
public Object createInstance(){
|
||
TarmCertificadoFiscalia instance=new TarmCertificadoFiscalia();
|
||
return instance;
|
||
}
|
||
/**Clona la entidad TarmCertificadoFiscalia
|
||
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
||
*/
|
||
public Object cloneMe() throws CloneNotSupportedException{
|
||
TarmCertificadoFiscalia p=(TarmCertificadoFiscalia)this.clone();
|
||
return p;
|
||
}
|
||
}
|