355 lines
8.5 KiB
Plaintext
Executable File
355 lines
8.5 KiB
Plaintext
Executable File
package com.fp.persistence.parmas.ins;
|
|
|
|
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;
|
|
|
|
import java.sql.Date;
|
|
|
|
/**Clase que implementa la entidad de Hibernate que hace referencia a la tabla TARMPLANIFICACIONINSPECCION*/
|
|
@Entity(name="TarmPlanificacionInspeccion")
|
|
@Table(name="TARMPLANIFICACIONINSPECCION")
|
|
public class TarmPlanificacionInspeccion 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 TarmPlanificacionInspeccion
|
|
*/
|
|
@Id
|
|
@Column(name="CPLANIFICACION" ,nullable=false, updatable=false)
|
|
private Long pk;
|
|
@Column(name="CODIGO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String codigo;
|
|
|
|
@Column(name="DESCRIPCION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String descripcion;
|
|
|
|
@Column(name="FECHAGENERACION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Date fechageneracion;
|
|
|
|
@Column(name="FECHAINICIO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Date fechainicio;
|
|
|
|
@Column(name="FECHAFIN", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Date fechafin;
|
|
|
|
@Column(name="CCENTROCONTROL", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String ccentrocontrol;
|
|
|
|
@Column(name="ANNO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Long anno;
|
|
|
|
@Column(name="APROBADA", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String aprobada;
|
|
|
|
@Column(name="XPATH", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String xpath;
|
|
|
|
@Column(name="TIPOPLANIFICACIONCODE", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String idPlanificacion;
|
|
|
|
@Column(name="TIPOPLANIFICACION", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private String Planificacion;
|
|
|
|
|
|
@Column(name="PRESUPESTO", nullable=true)
|
|
|
|
/**
|
|
* null
|
|
*/
|
|
private Float presupuesto;
|
|
|
|
|
|
|
|
/**Contructor por defecto*/
|
|
public TarmPlanificacionInspeccion(){
|
|
}
|
|
/**Contructor de TarmPlanificacionInspeccion
|
|
@param pPk Clave Primaria del entity
|
|
*/
|
|
public TarmPlanificacionInspeccion(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 TarmPlanificacionInspeccion
|
|
*/
|
|
public static TarmPlanificacionInspeccion find(EntityManager pEntityManager,Object pKey) throws Exception{
|
|
TarmPlanificacionInspeccion obj = pEntityManager.find(TarmPlanificacionInspeccion.class,pKey);
|
|
return obj;
|
|
}
|
|
/**Entrega la Clave primaria de TarmPlanificacionInspeccion
|
|
@return El objeto que referencia a la Clave primaria de TarmPlanificacionInspeccion
|
|
*/
|
|
public Long getPk(){
|
|
return pk;
|
|
}
|
|
/**Fija un nuevo valor a la Clave primaria de TarmPlanificacionInspeccion
|
|
@param pPk El objeto que referencia a la nueva Clave primaria de TarmPlanificacionInspeccion
|
|
*/
|
|
public void setPk(Long pPk){
|
|
pk=pPk;
|
|
}
|
|
/**Obtiene el valor de codigo
|
|
@return valor de codigo*/
|
|
public String getCodigo(){
|
|
return codigo;
|
|
}
|
|
/**Fija el valor de codigo
|
|
@param pCodigo nuevo Valor de codigo*/
|
|
public void setCodigo(String pCodigo){
|
|
codigo=pCodigo;
|
|
}
|
|
|
|
/**Obtiene el valor de descripcion
|
|
@return valor de descripcion*/
|
|
public String getDescripcion(){
|
|
return descripcion;
|
|
}
|
|
/**Fija el valor de descripcion
|
|
@param pDescripcion nuevo Valor de descripcion*/
|
|
public void setDescripcion(String pDescripcion){
|
|
descripcion=pDescripcion;
|
|
}
|
|
|
|
/**Obtiene el valor de fechageneracion
|
|
@return valor de fechageneracion*/
|
|
public Date getFechageneracion(){
|
|
return fechageneracion;
|
|
}
|
|
/**Fija el valor de fechageneracion
|
|
@param pFechageneracion nuevo Valor de fechageneracion*/
|
|
public void setFechageneracion(Date pFechageneracion){
|
|
fechageneracion=pFechageneracion;
|
|
}
|
|
|
|
/**Obtiene el valor de fechainicio
|
|
@return valor de fechainicio*/
|
|
public Date getFechainicio(){
|
|
return fechainicio;
|
|
}
|
|
/**Fija el valor de fechainicio
|
|
@param pFechainicio nuevo Valor de fechainicio*/
|
|
public void setFechainicio(Date pFechainicio){
|
|
fechainicio=pFechainicio;
|
|
}
|
|
|
|
/**Obtiene el valor de fechafin
|
|
@return valor de fechafin*/
|
|
public Date getFechafin(){
|
|
return fechafin;
|
|
}
|
|
/**Fija el valor de fechafin
|
|
@param pFechafin nuevo Valor de fechafin*/
|
|
public void setFechafin(Date pFechafin){
|
|
fechafin=pFechafin;
|
|
}
|
|
|
|
/**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 anno
|
|
@return valor de ccentrocontrol*/
|
|
public Long getAnno() {
|
|
return anno;
|
|
}
|
|
/**Fija el valor de anno
|
|
@param pCcentrocontrol nuevo Valor de ccentrocontrol*/
|
|
public void setAnno(Long anno) {
|
|
this.anno = anno;
|
|
}
|
|
|
|
/**Obtiene el valor de aprobada
|
|
@return valor de aprobada*/
|
|
public String getAprobada() {
|
|
return aprobada;
|
|
}
|
|
/**Fija el valor de aprobada
|
|
@param pCcentrocontrol nuevo Valor de aprobada*/
|
|
public void setAprobada(String aprobada) {
|
|
this.aprobada = aprobada;
|
|
}
|
|
|
|
/**Obtiene el valor de xpath
|
|
@return valor de xpath*/
|
|
public String getXpath() {
|
|
return xpath;
|
|
}
|
|
/**Fija el valor de xpath
|
|
@param pCcentrocontrol nuevo Valor de xpath*/
|
|
public void setXpath(String xpath) {
|
|
this.xpath = xpath;
|
|
}
|
|
|
|
/**Obtiene el valor de planificacion
|
|
@return valor de planificacion*/
|
|
public String getIdPlanificacion() {
|
|
return idPlanificacion;
|
|
}
|
|
/**Fija el valor de planificacion
|
|
@param pidPlanificacion nuevo Valor de tipoplanificacionList*/
|
|
public void setIdPlanificacion(String pidPlanificacion) {
|
|
this.idPlanificacion = pidPlanificacion;
|
|
}
|
|
|
|
/**Obtiene el valor de planificacion
|
|
@return valor de planificacion*/
|
|
public String getPlanificacion() {
|
|
return Planificacion;
|
|
}
|
|
/**Fija el valor de planificacion
|
|
@param pidPlanificacion nuevo Valor de tipoplanificacionList*/
|
|
public void setPlanificacion(String pPlanificacion) {
|
|
this.Planificacion = pPlanificacion;
|
|
}
|
|
|
|
/**Obtiene el valor de presupuesto
|
|
@return valor de presupuesto*/
|
|
public Float getPresupuesto() {
|
|
return presupuesto;
|
|
}
|
|
/**Fija el valor de presupuesto
|
|
@param pidPlanificacion nuevo Valor de presupuesto*/
|
|
public void setPresupuesto(Float ppresupuesto) {
|
|
this.presupuesto = ppresupuesto;
|
|
}
|
|
|
|
|
|
public boolean equals(Object rhs){
|
|
if (rhs == null)return false;
|
|
if (! (rhs instanceof TarmPlanificacionInspeccion))return false;
|
|
TarmPlanificacionInspeccion that = (TarmPlanificacionInspeccion) rhs;
|
|
if (this.getPk() == null || that.getPk() == null)
|
|
return false;
|
|
return (this.getPk().equals(that.getPk()));
|
|
}
|
|
/**Implementacion del metodo hashCode de la la entidad TarmPlanificacionInspeccion
|
|
@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 TarmPlanificacionInspeccion
|
|
*/
|
|
public Object createInstance(){
|
|
TarmPlanificacionInspeccion instance=new TarmPlanificacionInspeccion();
|
|
return instance;
|
|
}
|
|
/**Clona la entidad TarmPlanificacionInspeccion
|
|
@see com.fp.dto.hb.HibernateBean#cloneMe()
|
|
*/
|
|
public Object cloneMe() throws CloneNotSupportedException{
|
|
TarmPlanificacionInspeccion p=(TarmPlanificacionInspeccion)this.clone();
|
|
return p;
|
|
}
|
|
|
|
|
|
}
|