375 lines
8.8 KiB
Plaintext
Executable File
375 lines
8.8 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.soli;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.EntityManager;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import javax.persistence.Table;
|
|
|
|
import com.fp.dto.hb.HibernateBean;
|
|
import com.fp.dto.hb.Log;
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
import javax.persistence.Transient;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
import org.hibernate.annotations.Parameter;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TARMARMAPRUEBAS*/
|
|
@Entity(name="TarmArmaPruebas")
|
|
@Table(name="TARMARMAPRUEBAS")
|
|
public class TarmArmaPruebas 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 TarmArmaPruebas
|
|
*/
|
|
@Id
|
|
@Column(name="CARMAPRUEBA" ,nullable=false, updatable=false)
|
|
@GenericGenerator(name = "seq_id", strategy = "com.fp.general.keygen.SequenceKey", parameters = {
|
|
@Parameter(name = "name", value = "CARMAPRUEBA"),//campo secuencial de la tabla
|
|
@Parameter(name = "type", value = "java.lang.Long"),// tipo de dato
|
|
@Parameter(name = "fill", value = "0"),
|
|
@Parameter(name = "length", value = "16")})
|
|
@GeneratedValue(generator = "seq_id")
|
|
private Long pk;
|
|
@Column(name="CSOLICITUD", nullable=true)
|
|
|
|
/**
|
|
* Codigo de solicitud de controld e armas
|
|
*/
|
|
private String csolicitud;
|
|
|
|
@Column(name="PERSONCODE", nullable=true)
|
|
|
|
/**
|
|
* Codigo de persona
|
|
*/
|
|
private Integer personcode;
|
|
|
|
@Column(name="CARMA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String carma;
|
|
|
|
@Column(name="OBSERVACION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String observacion;
|
|
|
|
@Column(name="XPATHIMPRONTA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String xpathimpronta;
|
|
|
|
@Column(name="XPATHFOTOGRAFIA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String xpathfotografia;
|
|
|
|
@Column(name="APTITUDDISPARO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String aptituddisparo;
|
|
|
|
|
|
@Column(name="XPATHFICHATECARMAS", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String xpathfichatecarmas;
|
|
|
|
|
|
@Column(name="BALASTESTIGO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String balastestigo;
|
|
|
|
@Column(name="VAINASTESTIGO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String vainastestigo;
|
|
|
|
@Column(name="APRUEBAEVALUACION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String apruebaevaluacion;
|
|
|
|
|
|
@Column(name = "IMAGENIMPRONTA", unique = false, nullable = false, length = 100000)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private byte[] imagenimpronta;
|
|
|
|
@Column(name = "IMAGENFOTOGRAFIA", unique = false, nullable = false, length = 100000)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private byte[] imagenfotografia;
|
|
|
|
@Column(name="ISIMPRESO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String isimpreso;
|
|
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmArmaPruebas(){
|
|
}
|
|
/**Contructor de TarmArmaPruebas
|
|
@param pPk Clave Primaria del entity
|
|
*/
|
|
public TarmArmaPruebas(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 TarmArmaPruebas
|
|
*/
|
|
public static TarmArmaPruebas find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmArmaPruebas obj = pEntityManager.find(TarmArmaPruebas.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmArmaPruebas
|
|
@return El objeto que referencia a la Clave primaria de TarmArmaPruebas
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmArmaPruebas
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmArmaPruebas
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de csolicitud
|
|
@return valor de csolicitud*/
|
|
public String getCsolicitud(){
|
|
return csolicitud;
|
|
}
|
|
/**Fija el valor de csolicitud
|
|
@param pCsolicitud nuevo Valor de csolicitud*/
|
|
public void setCsolicitud(String pCsolicitud){
|
|
csolicitud=pCsolicitud;
|
|
}
|
|
|
|
/**Obtiene el valor de personcode
|
|
@return valor de personcode*/
|
|
public Integer getPersoncode(){
|
|
return personcode;
|
|
}
|
|
/**Fija el valor de personcode
|
|
@param pPersoncode nuevo Valor de personcode*/
|
|
public void setPersoncode(Integer pPersoncode){
|
|
personcode=pPersoncode;
|
|
}
|
|
|
|
/**Obtiene el valor de carma
|
|
@return valor de carma*/
|
|
public String getCarma(){
|
|
return carma;
|
|
}
|
|
/**Fija el valor de carma
|
|
@param pCarma nuevo Valor de carma*/
|
|
public void setCarma(String pCarma){
|
|
carma=pCarma;
|
|
}
|
|
|
|
/**Obtiene el valor de observacion
|
|
@return valor de observacion*/
|
|
public String getObservacion(){
|
|
return observacion;
|
|
}
|
|
/**Fija el valor de observacion
|
|
@param pObservacion nuevo Valor de observacion*/
|
|
public void setObservacion(String pObservacion){
|
|
observacion=pObservacion;
|
|
}
|
|
|
|
/**Obtiene el valor de xpathimpronta
|
|
@return valor de xpathimpronta*/
|
|
public String getXpathimpronta(){
|
|
return xpathimpronta;
|
|
}
|
|
/**Fija el valor de xpathimpronta
|
|
@param pXpathimpronta nuevo Valor de xpathimpronta*/
|
|
public void setXpathimpronta(String pXpathimpronta){
|
|
xpathimpronta=pXpathimpronta;
|
|
}
|
|
|
|
/**Obtiene el valor de xpathfotografia
|
|
@return valor de xpathfotografia*/
|
|
public String getXpathfotografia(){
|
|
return xpathfotografia;
|
|
}
|
|
/**Fija el valor de xpathfotografia
|
|
@param pXpathfotografia nuevo Valor de xpathfotografia*/
|
|
public void setXpathfotografia(String pXpathfotografia){
|
|
xpathfotografia=pXpathfotografia;
|
|
}
|
|
|
|
public String getXpathfichatecarmas() {
|
|
return xpathfichatecarmas;
|
|
}
|
|
public void setXpathfichatecarmas(String xpathfichatecarmas) {
|
|
this.xpathfichatecarmas = xpathfichatecarmas;
|
|
}
|
|
/**Obtiene el valor de aptituddisparo
|
|
@return valor de aptituddisparo*/
|
|
public String getAptituddisparo(){
|
|
return aptituddisparo;
|
|
}
|
|
/**Fija el valor de aptituddisparo
|
|
@param pAptituddisparo nuevo Valor de aptituddisparo*/
|
|
public void setAptituddisparo(String pAptituddisparo){
|
|
aptituddisparo=pAptituddisparo;
|
|
}
|
|
|
|
/**Obtiene el valor de balastestigo
|
|
@return valor de balastestigo*/
|
|
public String getBalastestigo(){
|
|
return balastestigo;
|
|
}
|
|
/**Fija el valor de balastestigo
|
|
@param pBalastestigo nuevo Valor de balastestigo*/
|
|
public void setBalastestigo(String pBalastestigo){
|
|
balastestigo=pBalastestigo;
|
|
}
|
|
|
|
/**Obtiene el valor de vainastestigo
|
|
@return valor de vainastestigo*/
|
|
public String getVainastestigo(){
|
|
return vainastestigo;
|
|
}
|
|
/**Fija el valor de vainastestigo
|
|
@param pVainastestigo nuevo Valor de vainastestigo*/
|
|
public void setVainastestigo(String pVainastestigo){
|
|
vainastestigo=pVainastestigo;
|
|
}
|
|
|
|
/**Obtiene el valor de apruebaevaluacion
|
|
@return valor de apruebaevaluacion*/
|
|
public String getApruebaevaluacion(){
|
|
return apruebaevaluacion;
|
|
}
|
|
/**Fija el valor de apruebaevaluacion
|
|
@param pApruebaevaluacion nuevo Valor de apruebaevaluacion*/
|
|
public void setApruebaevaluacion(String pApruebaevaluacion){
|
|
apruebaevaluacion=pApruebaevaluacion;
|
|
}
|
|
|
|
|
|
public byte[] getImagenimpronta() {
|
|
return imagenimpronta;
|
|
}
|
|
public void setImagenimpronta(byte[] imagenimpronta) {
|
|
this.imagenimpronta = imagenimpronta;
|
|
}
|
|
public byte[] getImagenfotografia() {
|
|
return imagenfotografia;
|
|
}
|
|
public void setImagenfotografia(byte[] imagenfotografia) {
|
|
this.imagenfotografia = imagenfotografia;
|
|
}
|
|
|
|
public String getIsimpreso() {
|
|
return isimpreso;
|
|
}
|
|
public void setIsimpreso(String isimpreso) {
|
|
this.isimpreso = isimpreso;
|
|
}
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmArmaPruebas))return false;
|
|
TarmArmaPruebas that = (TarmArmaPruebas) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmArmaPruebas
|
|
@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 TarmArmaPruebas
|
|
*/
|
|
public Object createInstance(){
|
|
TarmArmaPruebas instance=new TarmArmaPruebas();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmArmaPruebas
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmArmaPruebas p=(TarmArmaPruebas)this.clone();
|
|
return p;
|
|
}
|
|
}
|