forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@2005 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
f710a49fb6
commit
5199d99807
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Context antiJARLocking="true" path="/SiprpWebFichasClinicas"/>
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans;
|
||||||
|
|
||||||
|
public class DocumentoBean
|
||||||
|
{
|
||||||
|
private Integer id;
|
||||||
|
private String categoria;
|
||||||
|
private String detalhe;
|
||||||
|
private String tipo;
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategoria()
|
||||||
|
{
|
||||||
|
return categoria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoria(String categoria)
|
||||||
|
{
|
||||||
|
this.categoria = categoria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetalhe()
|
||||||
|
{
|
||||||
|
return detalhe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetalhe(String detalhe)
|
||||||
|
{
|
||||||
|
this.detalhe = detalhe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTipo()
|
||||||
|
{
|
||||||
|
return tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipo(String tipo)
|
||||||
|
{
|
||||||
|
this.tipo = tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst;
|
||||||
|
|
||||||
|
import shst.medicina.fichasclinicas.beans.shst.inner.FilCategoriasBean;
|
||||||
|
|
||||||
|
public class FilCategoriasBeanData extends FilCategoriasBean
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public FilCategoriasBeanData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst;
|
||||||
|
|
||||||
|
import shst.medicina.fichasclinicas.beans.shst.inner.FilFileBean;
|
||||||
|
|
||||||
|
public class FilFileBeanData extends FilFileBean
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public FilFileBeanData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst;
|
||||||
|
|
||||||
|
import shst.medicina.fichasclinicas.beans.shst.inner.FilFileTrabalhadorBean;
|
||||||
|
|
||||||
|
public class FilFileTrabalhadorBeanData extends FilFileTrabalhadorBean
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public FilFileTrabalhadorBeanData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst.inner;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@javax.xml.bind.annotation.XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
|
||||||
|
|
||||||
|
public class FilCategoriasBean implements Serializable
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Integer id;
|
||||||
|
private String codigo;
|
||||||
|
private String descricao;
|
||||||
|
private Integer ordem;
|
||||||
|
private Timestamp deleted_stamp;
|
||||||
|
|
||||||
|
public FilCategoriasBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapData(Map<String,Object> map)
|
||||||
|
{
|
||||||
|
setId( (Integer)map.get( "id") );
|
||||||
|
setCodigo( (String)map.get( "codigo") );
|
||||||
|
setDescricao( (String)map.get( "descricao") );
|
||||||
|
setOrdem( (Integer)map.get( "ordem") );
|
||||||
|
setDeleted_stamp( (Timestamp)map.get( "deleted_stamp") );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String,Object> getMapData()
|
||||||
|
{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
map.put( "id", getId() );
|
||||||
|
map.put( "codigo", getCodigo() );
|
||||||
|
map.put( "descricao", getDescricao() );
|
||||||
|
map.put( "ordem", getOrdem() );
|
||||||
|
map.put( "deleted_stamp", getDeleted_stamp() );
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodigo()
|
||||||
|
{
|
||||||
|
return this.codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigo(String codigo)
|
||||||
|
{
|
||||||
|
this.codigo = codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescricao()
|
||||||
|
{
|
||||||
|
return this.descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescricao(String descricao)
|
||||||
|
{
|
||||||
|
this.descricao = descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrdem()
|
||||||
|
{
|
||||||
|
return this.ordem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrdem(Integer ordem)
|
||||||
|
{
|
||||||
|
this.ordem = ordem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getDeleted_stamp()
|
||||||
|
{
|
||||||
|
return this.deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted_stamp(Timestamp deleted_stamp)
|
||||||
|
{
|
||||||
|
this.deleted_stamp = deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,134 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst.inner;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@javax.xml.bind.annotation.XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
|
||||||
|
|
||||||
|
public class FilFileBean implements Serializable
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Integer id;
|
||||||
|
private Timestamp deleted_stamp;
|
||||||
|
private String name;
|
||||||
|
private String mime_type;
|
||||||
|
private Timestamp inserted_stamp;
|
||||||
|
private Integer user_id;
|
||||||
|
private byte[] file_data;
|
||||||
|
private String details;
|
||||||
|
|
||||||
|
public FilFileBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapData(Map<String,Object> map)
|
||||||
|
{
|
||||||
|
setId( (Integer)map.get( "id") );
|
||||||
|
setDeleted_stamp( (Timestamp)map.get( "deleted_stamp") );
|
||||||
|
setName( (String)map.get( "name") );
|
||||||
|
setMime_type( (String)map.get( "mime_type") );
|
||||||
|
setInserted_stamp( (Timestamp)map.get( "inserted_stamp") );
|
||||||
|
setUser_id( (Integer)map.get( "user_id") );
|
||||||
|
setFile_data( (byte[])map.get( "file_data") );
|
||||||
|
setDetails( (String)map.get( "details") );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String,Object> getMapData()
|
||||||
|
{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
map.put( "id", getId() );
|
||||||
|
map.put( "deleted_stamp", getDeleted_stamp() );
|
||||||
|
map.put( "name", getName() );
|
||||||
|
map.put( "mime_type", getMime_type() );
|
||||||
|
map.put( "inserted_stamp", getInserted_stamp() );
|
||||||
|
map.put( "user_id", getUser_id() );
|
||||||
|
map.put( "file_data", getFile_data() );
|
||||||
|
map.put( "details", getDetails() );
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getDeleted_stamp()
|
||||||
|
{
|
||||||
|
return this.deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted_stamp(Timestamp deleted_stamp)
|
||||||
|
{
|
||||||
|
this.deleted_stamp = deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMime_type()
|
||||||
|
{
|
||||||
|
return this.mime_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMime_type(String mime_type)
|
||||||
|
{
|
||||||
|
this.mime_type = mime_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getInserted_stamp()
|
||||||
|
{
|
||||||
|
return this.inserted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInserted_stamp(Timestamp inserted_stamp)
|
||||||
|
{
|
||||||
|
this.inserted_stamp = inserted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUser_id()
|
||||||
|
{
|
||||||
|
return this.user_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_id(Integer user_id)
|
||||||
|
{
|
||||||
|
this.user_id = user_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getFile_data()
|
||||||
|
{
|
||||||
|
return this.file_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_data(byte[] file_data)
|
||||||
|
{
|
||||||
|
this.file_data = file_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetails()
|
||||||
|
{
|
||||||
|
return this.details;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetails(String details)
|
||||||
|
{
|
||||||
|
this.details = details;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package shst.medicina.fichasclinicas.beans.shst.inner;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@javax.xml.bind.annotation.XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
|
||||||
|
|
||||||
|
public class FilFileTrabalhadorBean implements Serializable
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private Integer id;
|
||||||
|
private Integer file_id;
|
||||||
|
private Integer trabalhador_id;
|
||||||
|
private Integer categoria_id;
|
||||||
|
private Boolean online;
|
||||||
|
|
||||||
|
public FilFileTrabalhadorBean()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapData(Map<String,Object> map)
|
||||||
|
{
|
||||||
|
setId( (Integer)map.get( "id") );
|
||||||
|
setFile_id( (Integer)map.get( "file_id") );
|
||||||
|
setTrabalhador_id( (Integer)map.get( "trabalhador_id") );
|
||||||
|
setCategoria_id( (Integer)map.get( "categoria_id") );
|
||||||
|
setOnline( (Boolean)map.get( "online") );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String,Object> getMapData()
|
||||||
|
{
|
||||||
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
map.put( "id", getId() );
|
||||||
|
map.put( "file_id", getFile_id() );
|
||||||
|
map.put( "trabalhador_id", getTrabalhador_id() );
|
||||||
|
map.put( "categoria_id", getCategoria_id() );
|
||||||
|
map.put( "online", getOnline() );
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFile_id()
|
||||||
|
{
|
||||||
|
return this.file_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_id(Integer file_id)
|
||||||
|
{
|
||||||
|
this.file_id = file_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTrabalhador_id()
|
||||||
|
{
|
||||||
|
return this.trabalhador_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrabalhador_id(Integer trabalhador_id)
|
||||||
|
{
|
||||||
|
this.trabalhador_id = trabalhador_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCategoria_id()
|
||||||
|
{
|
||||||
|
return this.categoria_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoria_id(Integer categoria_id)
|
||||||
|
{
|
||||||
|
this.categoria_id = categoria_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getOnline()
|
||||||
|
{
|
||||||
|
return this.online;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnline(Boolean online)
|
||||||
|
{
|
||||||
|
this.online = online;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* FilCategoriasData.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Edit at will
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst;
|
||||||
|
|
||||||
|
|
||||||
|
public final class FilCategoriasData extends shst.medicina.fichasclinicas.data.shst.inner.FilCategorias
|
||||||
|
{
|
||||||
|
|
||||||
|
public FilCategoriasData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* FilFileData.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Edit at will
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst;
|
||||||
|
|
||||||
|
|
||||||
|
public final class FilFileData extends shst.medicina.fichasclinicas.data.shst.inner.FilFile
|
||||||
|
{
|
||||||
|
|
||||||
|
public FilFileData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* FilFileTrabalhadorData.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Edit at will
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst;
|
||||||
|
|
||||||
|
|
||||||
|
public final class FilFileTrabalhadorData extends shst.medicina.fichasclinicas.data.shst.inner.FilFileTrabalhador
|
||||||
|
{
|
||||||
|
|
||||||
|
public FilFileTrabalhadorData()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,459 @@
|
|||||||
|
/*
|
||||||
|
* FilCategorias.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Use but DON'T TOUCH
|
||||||
|
* -> (can't touch this)
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst.inner;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
public class FilCategorias extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
|
||||||
|
{
|
||||||
|
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
FIELD_INDEXES.put( FilCategorias.ID, FilCategorias.ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.ID_FULL, FilCategorias.ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.CODIGO, FilCategorias.CODIGO_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.CODIGO_FULL, FilCategorias.CODIGO_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.DESCRICAO, FilCategorias.DESCRICAO_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.DESCRICAO_FULL, FilCategorias.DESCRICAO_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.ORDEM, FilCategorias.ORDEM_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.ORDEM_FULL, FilCategorias.ORDEM_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.DELETED_STAMP, FilCategorias.DELETED_STAMP_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilCategorias.DELETED_STAMP_FULL, FilCategorias.DELETED_STAMP_INDEX );
|
||||||
|
}
|
||||||
|
|
||||||
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||||
|
|
||||||
|
|
||||||
|
public static final String TABLENAME = "fil_categorias";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CLASS_IDENTIFIER = "shst.medicina.fichasclinicas.data.shst.inner.fil_categorias";
|
||||||
|
|
||||||
|
public static final int _INVALID__INDEX = -1;
|
||||||
|
public static final String ID = "id";
|
||||||
|
public static final String ID_FULL = "fil_categorias.id";
|
||||||
|
public static final int ID_INDEX = 0;
|
||||||
|
public static final String CODIGO = "codigo";
|
||||||
|
public static final String CODIGO_FULL = "fil_categorias.codigo";
|
||||||
|
public static final int CODIGO_INDEX = 1;
|
||||||
|
public static final String DESCRICAO = "descricao";
|
||||||
|
public static final String DESCRICAO_FULL = "fil_categorias.descricao";
|
||||||
|
public static final int DESCRICAO_INDEX = 2;
|
||||||
|
public static final String ORDEM = "ordem";
|
||||||
|
public static final String ORDEM_FULL = "fil_categorias.ordem";
|
||||||
|
public static final int ORDEM_INDEX = 3;
|
||||||
|
public static final String DELETED_STAMP = "deleted_stamp";
|
||||||
|
public static final String DELETED_STAMP_FULL = "fil_categorias.deleted_stamp";
|
||||||
|
public static final int DELETED_STAMP_INDEX = 4;
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES[] = new String[]{
|
||||||
|
CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, };
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||||
|
TABLENAME + "." + CODIGO, TABLENAME + "." + DESCRICAO, TABLENAME + "." + ORDEM, TABLENAME + "." + DELETED_STAMP, };
|
||||||
|
|
||||||
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, };
|
||||||
|
|
||||||
|
|
||||||
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, };
|
||||||
|
|
||||||
|
|
||||||
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||||
|
ID, CODIGO, DESCRICAO, ORDEM, DELETED_STAMP, };
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private String codigo;
|
||||||
|
private String descricao;
|
||||||
|
private Integer ordem;
|
||||||
|
private Timestamp deleted_stamp;
|
||||||
|
|
||||||
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||||
|
|
||||||
|
public FilCategorias()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
dirtyProperties = new boolean[]{ false, false, false,
|
||||||
|
false, false };
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId( Integer id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( ID, id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.id = id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public java.util.List<shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData>fromFilFileTrabalhador_categoria_id()
|
||||||
|
{
|
||||||
|
java.util.List<shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData> result = new java.util.LinkedList< shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData >();
|
||||||
|
if ( getPrimaryKey() != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = fromReference( shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "categoria_id" );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodigo()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( CODIGO );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.codigo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigo( String codigo )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( CODIGO, codigo );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.codigo = codigo;
|
||||||
|
LAZY_LOADED_OBJECTS.put( CODIGO, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescricao()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( DESCRICAO );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescricao( String descricao )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( DESCRICAO, descricao );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.descricao = descricao;
|
||||||
|
LAZY_LOADED_OBJECTS.put( DESCRICAO, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrdem()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( ORDEM );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.ordem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrdem( Integer ordem )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( ORDEM, ordem );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.ordem = ordem;
|
||||||
|
LAZY_LOADED_OBJECTS.put( ORDEM, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getDeleted_stamp()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( DELETED_STAMP );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted_stamp( Timestamp deleted_stamp )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( DELETED_STAMP, deleted_stamp );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.deleted_stamp = deleted_stamp;
|
||||||
|
LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object get( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilCategorias.ID_INDEX:
|
||||||
|
value = getId();
|
||||||
|
break;
|
||||||
|
case FilCategorias.CODIGO_INDEX:
|
||||||
|
value = getCodigo();
|
||||||
|
break;
|
||||||
|
case FilCategorias.DESCRICAO_INDEX:
|
||||||
|
value = getDescricao();
|
||||||
|
break;
|
||||||
|
case FilCategorias.ORDEM_INDEX:
|
||||||
|
value = getOrdem();
|
||||||
|
break;
|
||||||
|
case FilCategorias.DELETED_STAMP_INDEX:
|
||||||
|
value = getDeleted_stamp();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object rawGet( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilCategorias.ID_INDEX:
|
||||||
|
value = this.id;
|
||||||
|
break;
|
||||||
|
case FilCategorias.CODIGO_INDEX:
|
||||||
|
value = this.codigo;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DESCRICAO_INDEX:
|
||||||
|
value = this.descricao;
|
||||||
|
break;
|
||||||
|
case FilCategorias.ORDEM_INDEX:
|
||||||
|
value = this.ordem;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DELETED_STAMP_INDEX:
|
||||||
|
value = this.deleted_stamp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilCategorias.ID_INDEX:
|
||||||
|
setId( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilCategorias.CODIGO_INDEX:
|
||||||
|
setCodigo( ( String ) value );
|
||||||
|
break;
|
||||||
|
case FilCategorias.DESCRICAO_INDEX:
|
||||||
|
setDescricao( ( String ) value );
|
||||||
|
break;
|
||||||
|
case FilCategorias.ORDEM_INDEX:
|
||||||
|
setOrdem( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilCategorias.DELETED_STAMP_INDEX:
|
||||||
|
setDeleted_stamp( ( Timestamp ) value );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rawSet( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilCategorias.ID_INDEX:
|
||||||
|
this.id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilCategorias.CODIGO_INDEX:
|
||||||
|
this.codigo = ( String ) value;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DESCRICAO_INDEX:
|
||||||
|
this.descricao = ( String ) value;
|
||||||
|
break;
|
||||||
|
case FilCategorias.ORDEM_INDEX:
|
||||||
|
this.ordem = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DELETED_STAMP_INDEX:
|
||||||
|
this.deleted_stamp = ( Timestamp ) value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNames()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNamesFull()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDBFieldNames()
|
||||||
|
{
|
||||||
|
return DB_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getPrimaryKeyNames()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDefaultLoadSet()
|
||||||
|
{
|
||||||
|
return DEFAULT_LOAD_SET;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrimaryKeyName()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getFieldClass( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
Class<?> theClass = null;
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilCategorias.ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilCategorias.CODIGO_INDEX:
|
||||||
|
theClass = String.class;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DESCRICAO_INDEX:
|
||||||
|
theClass = String.class;
|
||||||
|
break;
|
||||||
|
case FilCategorias.ORDEM_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilCategorias.DELETED_STAMP_INDEX:
|
||||||
|
theClass = Timestamp.class;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return theClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFieldIndex( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = FIELD_INDEXES.get( fieldName );
|
||||||
|
return index != null ? index : FilCategorias._INVALID__INDEX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTableName()
|
||||||
|
{
|
||||||
|
return TABLENAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassIdentifier()
|
||||||
|
{
|
||||||
|
return CLASS_IDENTIFIER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
|
||||||
|
{
|
||||||
|
if( primaryKey == null )
|
||||||
|
{
|
||||||
|
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, FilCategorias.PK_FIELD_NAMES );
|
||||||
|
Object idObject = array.get( row, col + 0 );
|
||||||
|
try
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ( Integer ) idObject );
|
||||||
|
setId( ( Integer ) idObject );
|
||||||
|
}
|
||||||
|
catch( ClassCastException ex )
|
||||||
|
{
|
||||||
|
if( idObject instanceof Number )
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ((Number)idObject).intValue() );
|
||||||
|
setId( ((Number)idObject).intValue() );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
|
||||||
|
{
|
||||||
|
return primaryKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initLazyLoadFields()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPropertyLoaded( String fieldName )
|
||||||
|
{
|
||||||
|
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return LAZY_LOADED_OBJECTS.get( fieldName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,613 @@
|
|||||||
|
/*
|
||||||
|
* FilFile.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Use but DON'T TOUCH
|
||||||
|
* -> (can't touch this)
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst.inner;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
public class FilFile extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
|
||||||
|
{
|
||||||
|
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
FIELD_INDEXES.put( FilFile.ID, FilFile.ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.ID_FULL, FilFile.ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.DELETED_STAMP, FilFile.DELETED_STAMP_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.DELETED_STAMP_FULL, FilFile.DELETED_STAMP_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.NAME, FilFile.NAME_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.NAME_FULL, FilFile.NAME_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.MIME_TYPE, FilFile.MIME_TYPE_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.MIME_TYPE_FULL, FilFile.MIME_TYPE_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.INSERTED_STAMP, FilFile.INSERTED_STAMP_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.INSERTED_STAMP_FULL, FilFile.INSERTED_STAMP_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.USER_ID, FilFile.USER_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.USER_ID_FULL, FilFile.USER_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.FILE_DATA, FilFile.FILE_DATA_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.FILE_DATA_FULL, FilFile.FILE_DATA_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.DETAILS, FilFile.DETAILS_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFile.DETAILS_FULL, FilFile.DETAILS_INDEX );
|
||||||
|
}
|
||||||
|
|
||||||
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||||
|
|
||||||
|
|
||||||
|
public static final String TABLENAME = "fil_file";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CLASS_IDENTIFIER = "shst.medicina.fichasclinicas.data.shst.inner.fil_file";
|
||||||
|
|
||||||
|
public static final int _INVALID__INDEX = -1;
|
||||||
|
public static final String ID = "id";
|
||||||
|
public static final String ID_FULL = "fil_file.id";
|
||||||
|
public static final int ID_INDEX = 0;
|
||||||
|
public static final String DELETED_STAMP = "deleted_stamp";
|
||||||
|
public static final String DELETED_STAMP_FULL = "fil_file.deleted_stamp";
|
||||||
|
public static final int DELETED_STAMP_INDEX = 1;
|
||||||
|
public static final String NAME = "name";
|
||||||
|
public static final String NAME_FULL = "fil_file.name";
|
||||||
|
public static final int NAME_INDEX = 2;
|
||||||
|
public static final String MIME_TYPE = "mime_type";
|
||||||
|
public static final String MIME_TYPE_FULL = "fil_file.mime_type";
|
||||||
|
public static final int MIME_TYPE_INDEX = 3;
|
||||||
|
public static final String INSERTED_STAMP = "inserted_stamp";
|
||||||
|
public static final String INSERTED_STAMP_FULL = "fil_file.inserted_stamp";
|
||||||
|
public static final int INSERTED_STAMP_INDEX = 4;
|
||||||
|
public static final String USER_ID = "user_id";
|
||||||
|
public static final String USER_ID_FULL = "fil_file.user_id";
|
||||||
|
public static final int USER_ID_INDEX = 5;
|
||||||
|
public static final String FILE_DATA = "file_data";
|
||||||
|
public static final String FILE_DATA_FULL = "fil_file.file_data";
|
||||||
|
public static final int FILE_DATA_INDEX = 6;
|
||||||
|
public static final String DETAILS = "details";
|
||||||
|
public static final String DETAILS_FULL = "fil_file.details";
|
||||||
|
public static final int DETAILS_INDEX = 7;
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES[] = new String[]{
|
||||||
|
DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, FILE_DATA, DETAILS, };
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||||
|
TABLENAME + "." + DELETED_STAMP, TABLENAME + "." + NAME, TABLENAME + "." + MIME_TYPE, TABLENAME + "." + INSERTED_STAMP, TABLENAME + "." + USER_ID, TABLENAME + "." + FILE_DATA, TABLENAME + "." + DETAILS, };
|
||||||
|
|
||||||
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, FILE_DATA, DETAILS, };
|
||||||
|
|
||||||
|
|
||||||
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, };
|
||||||
|
|
||||||
|
|
||||||
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||||
|
ID, DELETED_STAMP, NAME, MIME_TYPE, INSERTED_STAMP, USER_ID, DETAILS, };
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private Timestamp deleted_stamp;
|
||||||
|
private String name;
|
||||||
|
private String mime_type;
|
||||||
|
private Timestamp inserted_stamp;
|
||||||
|
private Integer user_id;
|
||||||
|
private byte[] file_data;
|
||||||
|
private String details;
|
||||||
|
|
||||||
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||||
|
|
||||||
|
public FilFile()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
dirtyProperties = new boolean[]{ false, false, false,
|
||||||
|
false, false, false, false, false };
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId( Integer id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( ID, id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.id = id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public java.util.List<shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData>fromFilFileTrabalhador_file_id()
|
||||||
|
{
|
||||||
|
java.util.List<shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData> result = new java.util.LinkedList< shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData >();
|
||||||
|
if ( getPrimaryKey() != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = fromReference( shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData.class , getPrimaryKey().getMap().get("id"), "file_id" );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getDeleted_stamp()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( DELETED_STAMP );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.deleted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted_stamp( Timestamp deleted_stamp )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( DELETED_STAMP, deleted_stamp );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.deleted_stamp = deleted_stamp;
|
||||||
|
LAZY_LOADED_OBJECTS.put( DELETED_STAMP, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( NAME );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName( String name )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( NAME, name );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.name = name;
|
||||||
|
LAZY_LOADED_OBJECTS.put( NAME, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMime_type()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( MIME_TYPE );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.mime_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMime_type( String mime_type )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( MIME_TYPE, mime_type );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.mime_type = mime_type;
|
||||||
|
LAZY_LOADED_OBJECTS.put( MIME_TYPE, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Timestamp getInserted_stamp()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( INSERTED_STAMP );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.inserted_stamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInserted_stamp( Timestamp inserted_stamp )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( INSERTED_STAMP, inserted_stamp );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.inserted_stamp = inserted_stamp;
|
||||||
|
LAZY_LOADED_OBJECTS.put( INSERTED_STAMP, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUser_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( USER_ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.user_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser_id( Integer user_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( USER_ID, user_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.user_id = user_id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( USER_ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getFile_data()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( FILE_DATA );
|
||||||
|
Boolean isLazyLoaded = isPropertyLoaded( FILE_DATA );
|
||||||
|
if ( ! isLazyLoaded )
|
||||||
|
{
|
||||||
|
this.file_data = ( byte[] ) getProvider().loadFieldFromDatabase( FILE_DATA, this );
|
||||||
|
LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.file_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_data( byte[] file_data )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( FILE_DATA, file_data );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.file_data = file_data;
|
||||||
|
LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDetails()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( DETAILS );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.details;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetails( String details )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( DETAILS, details );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.details = details;
|
||||||
|
LAZY_LOADED_OBJECTS.put( DETAILS, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object get( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFile.ID_INDEX:
|
||||||
|
value = getId();
|
||||||
|
break;
|
||||||
|
case FilFile.DELETED_STAMP_INDEX:
|
||||||
|
value = getDeleted_stamp();
|
||||||
|
break;
|
||||||
|
case FilFile.NAME_INDEX:
|
||||||
|
value = getName();
|
||||||
|
break;
|
||||||
|
case FilFile.MIME_TYPE_INDEX:
|
||||||
|
value = getMime_type();
|
||||||
|
break;
|
||||||
|
case FilFile.INSERTED_STAMP_INDEX:
|
||||||
|
value = getInserted_stamp();
|
||||||
|
break;
|
||||||
|
case FilFile.USER_ID_INDEX:
|
||||||
|
value = getUser_id();
|
||||||
|
break;
|
||||||
|
case FilFile.FILE_DATA_INDEX:
|
||||||
|
value = getFile_data();
|
||||||
|
break;
|
||||||
|
case FilFile.DETAILS_INDEX:
|
||||||
|
value = getDetails();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object rawGet( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFile.ID_INDEX:
|
||||||
|
value = this.id;
|
||||||
|
break;
|
||||||
|
case FilFile.DELETED_STAMP_INDEX:
|
||||||
|
value = this.deleted_stamp;
|
||||||
|
break;
|
||||||
|
case FilFile.NAME_INDEX:
|
||||||
|
value = this.name;
|
||||||
|
break;
|
||||||
|
case FilFile.MIME_TYPE_INDEX:
|
||||||
|
value = this.mime_type;
|
||||||
|
break;
|
||||||
|
case FilFile.INSERTED_STAMP_INDEX:
|
||||||
|
value = this.inserted_stamp;
|
||||||
|
break;
|
||||||
|
case FilFile.USER_ID_INDEX:
|
||||||
|
value = this.user_id;
|
||||||
|
break;
|
||||||
|
case FilFile.FILE_DATA_INDEX:
|
||||||
|
value = this.file_data;
|
||||||
|
break;
|
||||||
|
case FilFile.DETAILS_INDEX:
|
||||||
|
value = this.details;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFile.ID_INDEX:
|
||||||
|
setId( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.DELETED_STAMP_INDEX:
|
||||||
|
setDeleted_stamp( ( Timestamp ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.NAME_INDEX:
|
||||||
|
setName( ( String ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.MIME_TYPE_INDEX:
|
||||||
|
setMime_type( ( String ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.INSERTED_STAMP_INDEX:
|
||||||
|
setInserted_stamp( ( Timestamp ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.USER_ID_INDEX:
|
||||||
|
setUser_id( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.FILE_DATA_INDEX:
|
||||||
|
setFile_data( ( byte[] ) value );
|
||||||
|
break;
|
||||||
|
case FilFile.DETAILS_INDEX:
|
||||||
|
setDetails( ( String ) value );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rawSet( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFile.ID_INDEX:
|
||||||
|
this.id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.DELETED_STAMP_INDEX:
|
||||||
|
this.deleted_stamp = ( Timestamp ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.NAME_INDEX:
|
||||||
|
this.name = ( String ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.MIME_TYPE_INDEX:
|
||||||
|
this.mime_type = ( String ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.INSERTED_STAMP_INDEX:
|
||||||
|
this.inserted_stamp = ( Timestamp ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.USER_ID_INDEX:
|
||||||
|
this.user_id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.FILE_DATA_INDEX:
|
||||||
|
this.file_data = ( byte[] ) value;
|
||||||
|
break;
|
||||||
|
case FilFile.DETAILS_INDEX:
|
||||||
|
this.details = ( String ) value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNames()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNamesFull()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDBFieldNames()
|
||||||
|
{
|
||||||
|
return DB_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getPrimaryKeyNames()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDefaultLoadSet()
|
||||||
|
{
|
||||||
|
return DEFAULT_LOAD_SET;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrimaryKeyName()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getFieldClass( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
Class<?> theClass = null;
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFile.ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFile.DELETED_STAMP_INDEX:
|
||||||
|
theClass = Timestamp.class;
|
||||||
|
break;
|
||||||
|
case FilFile.NAME_INDEX:
|
||||||
|
theClass = String.class;
|
||||||
|
break;
|
||||||
|
case FilFile.MIME_TYPE_INDEX:
|
||||||
|
theClass = String.class;
|
||||||
|
break;
|
||||||
|
case FilFile.INSERTED_STAMP_INDEX:
|
||||||
|
theClass = Timestamp.class;
|
||||||
|
break;
|
||||||
|
case FilFile.USER_ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFile.FILE_DATA_INDEX:
|
||||||
|
theClass = byte[].class;
|
||||||
|
break;
|
||||||
|
case FilFile.DETAILS_INDEX:
|
||||||
|
theClass = String.class;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return theClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFieldIndex( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = FIELD_INDEXES.get( fieldName );
|
||||||
|
return index != null ? index : FilFile._INVALID__INDEX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTableName()
|
||||||
|
{
|
||||||
|
return TABLENAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassIdentifier()
|
||||||
|
{
|
||||||
|
return CLASS_IDENTIFIER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
|
||||||
|
{
|
||||||
|
if( primaryKey == null )
|
||||||
|
{
|
||||||
|
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, FilFile.PK_FIELD_NAMES );
|
||||||
|
Object idObject = array.get( row, col + 0 );
|
||||||
|
try
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ( Integer ) idObject );
|
||||||
|
setId( ( Integer ) idObject );
|
||||||
|
}
|
||||||
|
catch( ClassCastException ex )
|
||||||
|
{
|
||||||
|
if( idObject instanceof Number )
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ((Number)idObject).intValue() );
|
||||||
|
setId( ((Number)idObject).intValue() );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
|
||||||
|
{
|
||||||
|
return primaryKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initLazyLoadFields()
|
||||||
|
{
|
||||||
|
LAZY_LOADED_OBJECTS.put( FILE_DATA, Boolean.FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPropertyLoaded( String fieldName )
|
||||||
|
{
|
||||||
|
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return LAZY_LOADED_OBJECTS.get( fieldName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,593 @@
|
|||||||
|
/*
|
||||||
|
* FilFileTrabalhador.java
|
||||||
|
*
|
||||||
|
* Generated by com.evutils.codegen.EntityObjectGenerator
|
||||||
|
*
|
||||||
|
* Use but DON'T TOUCH
|
||||||
|
* -> (can't touch this)
|
||||||
|
*/
|
||||||
|
package shst.medicina.fichasclinicas.data.shst.inner;
|
||||||
|
|
||||||
|
|
||||||
|
public class FilFileTrabalhador extends com.evolute.entity.evo.EvoDataObject<com.evolute.entity.utils.IntegerPrimaryKey>
|
||||||
|
{
|
||||||
|
private static final java.util.HashMap<String,Integer> FIELD_INDEXES = new java.util.HashMap<String,Integer>();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.ID, FilFileTrabalhador.ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.ID_FULL, FilFileTrabalhador.ID_INDEX );
|
||||||
|
com.evolute.entity.evo.EvoDataObject.register( FilFileTrabalhador.CLASS_IDENTIFIER, FilFileTrabalhador.FILE_ID, FilFileTrabalhador.TO_FILE_ID );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.FILE_ID, FilFileTrabalhador.FILE_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.FILE_ID_FULL, FilFileTrabalhador.FILE_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.TO_FILE_ID, FilFileTrabalhador.TO_FILE_ID_INDEX );
|
||||||
|
com.evolute.entity.evo.EvoDataObject.register( FilFileTrabalhador.CLASS_IDENTIFIER, FilFileTrabalhador.TRABALHADOR_ID, FilFileTrabalhador.TO_TRABALHADOR_ID );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.TRABALHADOR_ID, FilFileTrabalhador.TRABALHADOR_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.TRABALHADOR_ID_FULL, FilFileTrabalhador.TRABALHADOR_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.TO_TRABALHADOR_ID, FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX );
|
||||||
|
com.evolute.entity.evo.EvoDataObject.register( FilFileTrabalhador.CLASS_IDENTIFIER, FilFileTrabalhador.CATEGORIA_ID, FilFileTrabalhador.TO_CATEGORIA_ID );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.CATEGORIA_ID, FilFileTrabalhador.CATEGORIA_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.CATEGORIA_ID_FULL, FilFileTrabalhador.CATEGORIA_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.TO_CATEGORIA_ID, FilFileTrabalhador.TO_CATEGORIA_ID_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.ONLINE, FilFileTrabalhador.ONLINE_INDEX );
|
||||||
|
FIELD_INDEXES.put( FilFileTrabalhador.ONLINE_FULL, FilFileTrabalhador.ONLINE_INDEX );
|
||||||
|
}
|
||||||
|
|
||||||
|
private final java.util.HashMap< String, Boolean > LAZY_LOADED_OBJECTS = new java.util.HashMap< String, Boolean >();
|
||||||
|
|
||||||
|
|
||||||
|
public static final com.evolute.entity.ForeignKey ForeignKeyfile_idTofil_file =
|
||||||
|
new com.evolute.entity.ForeignKey( FilFileTrabalhador.class, FilFileTrabalhador.FILE_ID, shst.medicina.fichasclinicas.data.shst.FilFileData.class, shst.medicina.fichasclinicas.data.shst.FilFileData.ID );
|
||||||
|
|
||||||
|
public static final com.evolute.entity.ForeignKey ForeignKeytrabalhador_idTotrabalhadores =
|
||||||
|
new com.evolute.entity.ForeignKey( FilFileTrabalhador.class, FilFileTrabalhador.TRABALHADOR_ID, shst.medicina.fichasclinicas.data.shst.TrabalhadoresData.class, shst.medicina.fichasclinicas.data.shst.TrabalhadoresData.ID );
|
||||||
|
|
||||||
|
public static final com.evolute.entity.ForeignKey ForeignKeycategoria_idTofil_categorias =
|
||||||
|
new com.evolute.entity.ForeignKey( FilFileTrabalhador.class, FilFileTrabalhador.CATEGORIA_ID, shst.medicina.fichasclinicas.data.shst.FilCategoriasData.class, shst.medicina.fichasclinicas.data.shst.FilCategoriasData.ID );
|
||||||
|
|
||||||
|
public static final String TABLENAME = "fil_file_trabalhador";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String CLASS_IDENTIFIER = "shst.medicina.fichasclinicas.data.shst.inner.fil_file_trabalhador";
|
||||||
|
|
||||||
|
public static final int _INVALID__INDEX = -1;
|
||||||
|
public static final String ID = "id";
|
||||||
|
public static final String ID_FULL = "fil_file_trabalhador.id";
|
||||||
|
public static final int ID_INDEX = 0;
|
||||||
|
public static final String FILE_ID = "file_id";
|
||||||
|
public static final String FILE_ID_FULL = "fil_file_trabalhador.file_id";
|
||||||
|
public static final int FILE_ID_INDEX = 1;
|
||||||
|
public static final String TO_FILE_ID = "to_file_id";
|
||||||
|
public static final String TO_FILE_ID_FULL = "fil_file_trabalhador.to_file_id";
|
||||||
|
public static final int TO_FILE_ID_INDEX = 2;
|
||||||
|
public static final String TRABALHADOR_ID = "trabalhador_id";
|
||||||
|
public static final String TRABALHADOR_ID_FULL = "fil_file_trabalhador.trabalhador_id";
|
||||||
|
public static final int TRABALHADOR_ID_INDEX = 3;
|
||||||
|
public static final String TO_TRABALHADOR_ID = "to_trabalhador_id";
|
||||||
|
public static final String TO_TRABALHADOR_ID_FULL = "fil_file_trabalhador.to_trabalhador_id";
|
||||||
|
public static final int TO_TRABALHADOR_ID_INDEX = 4;
|
||||||
|
public static final String CATEGORIA_ID = "categoria_id";
|
||||||
|
public static final String CATEGORIA_ID_FULL = "fil_file_trabalhador.categoria_id";
|
||||||
|
public static final int CATEGORIA_ID_INDEX = 5;
|
||||||
|
public static final String TO_CATEGORIA_ID = "to_categoria_id";
|
||||||
|
public static final String TO_CATEGORIA_ID_FULL = "fil_file_trabalhador.to_categoria_id";
|
||||||
|
public static final int TO_CATEGORIA_ID_INDEX = 6;
|
||||||
|
public static final String ONLINE = "online";
|
||||||
|
public static final String ONLINE_FULL = "fil_file_trabalhador.online";
|
||||||
|
public static final int ONLINE_INDEX = 7;
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES[] = new String[]{
|
||||||
|
FILE_ID, TO_FILE_ID, TRABALHADOR_ID, TO_TRABALHADOR_ID, CATEGORIA_ID,
|
||||||
|
TO_CATEGORIA_ID, ONLINE, };
|
||||||
|
|
||||||
|
public static final String FIELD_NAMES_FULL[] = new String[]{
|
||||||
|
TABLENAME + "." + FILE_ID, TABLENAME + "." + TO_FILE_ID, TABLENAME + "." + TRABALHADOR_ID, TABLENAME + "." + TO_TRABALHADOR_ID, TABLENAME + "." + CATEGORIA_ID,
|
||||||
|
TABLENAME + "." + TO_CATEGORIA_ID, TABLENAME + "." + ONLINE, };
|
||||||
|
|
||||||
|
protected static final String DB_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, FILE_ID, TRABALHADOR_ID, CATEGORIA_ID, ONLINE, };
|
||||||
|
|
||||||
|
|
||||||
|
protected static final String PK_FIELD_NAMES[] = new String[]{
|
||||||
|
ID, };
|
||||||
|
|
||||||
|
|
||||||
|
public static final String DEFAULT_LOAD_SET[] = new String[] {
|
||||||
|
ID, FILE_ID, TRABALHADOR_ID, CATEGORIA_ID, ONLINE, };
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
private Integer file_id;
|
||||||
|
private shst.medicina.fichasclinicas.data.shst.FilFileData to_file_id;
|
||||||
|
private Integer trabalhador_id;
|
||||||
|
private shst.medicina.fichasclinicas.data.shst.TrabalhadoresData to_trabalhador_id;
|
||||||
|
private Integer categoria_id;
|
||||||
|
private shst.medicina.fichasclinicas.data.shst.FilCategoriasData to_categoria_id;
|
||||||
|
private Boolean online;
|
||||||
|
|
||||||
|
protected com.evolute.entity.utils.IntegerPrimaryKey primaryKey;
|
||||||
|
|
||||||
|
public FilFileTrabalhador()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
dirtyProperties = new boolean[]{ false, false, false,
|
||||||
|
false, false, false, false, false };
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId( Integer id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( ID, id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.id = id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFile_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( FILE_ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.file_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFile_id( Integer file_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( FILE_ID, file_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.file_id = file_id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( FILE_ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public shst.medicina.fichasclinicas.data.shst.FilFileData toFile_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
prepare( TO_FILE_ID );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
return this.to_file_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToFile_id( shst.medicina.fichasclinicas.data.shst.FilFileData to_file_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( TO_FILE_ID, to_file_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.to_file_id = to_file_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTrabalhador_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( TRABALHADOR_ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.trabalhador_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrabalhador_id( Integer trabalhador_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( TRABALHADOR_ID, trabalhador_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.trabalhador_id = trabalhador_id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( TRABALHADOR_ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public shst.medicina.fichasclinicas.data.shst.TrabalhadoresData toTrabalhador_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
prepare( TO_TRABALHADOR_ID );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
return this.to_trabalhador_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToTrabalhador_id( shst.medicina.fichasclinicas.data.shst.TrabalhadoresData to_trabalhador_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( TO_TRABALHADOR_ID, to_trabalhador_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.to_trabalhador_id = to_trabalhador_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCategoria_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( CATEGORIA_ID );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.categoria_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoria_id( Integer categoria_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( CATEGORIA_ID, categoria_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.categoria_id = categoria_id;
|
||||||
|
LAZY_LOADED_OBJECTS.put( CATEGORIA_ID, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public shst.medicina.fichasclinicas.data.shst.FilCategoriasData toCategoria_id()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
prepare( TO_CATEGORIA_ID );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
return this.to_categoria_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToCategoria_id( shst.medicina.fichasclinicas.data.shst.FilCategoriasData to_categoria_id )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( TO_CATEGORIA_ID, to_categoria_id );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.to_categoria_id = to_categoria_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getOnline()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
setLastAccess( System.currentTimeMillis() );
|
||||||
|
prepare( ONLINE );
|
||||||
|
}
|
||||||
|
catch( java.lang.Exception ex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( ex );
|
||||||
|
}
|
||||||
|
return this.online;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnline( Boolean online )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
preProcess( ONLINE, online );
|
||||||
|
}
|
||||||
|
catch( com.evolute.entity.evo.EvoDataException edex )
|
||||||
|
{
|
||||||
|
throw new RuntimeException( edex );
|
||||||
|
}
|
||||||
|
this.online = online;
|
||||||
|
LAZY_LOADED_OBJECTS.put( ONLINE, Boolean.TRUE );
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object get( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFileTrabalhador.ID_INDEX:
|
||||||
|
value = getId();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.FILE_ID_INDEX:
|
||||||
|
value = getFile_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_FILE_ID_INDEX:
|
||||||
|
value = toFile_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TRABALHADOR_ID_INDEX:
|
||||||
|
value = getTrabalhador_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX:
|
||||||
|
value = toTrabalhador_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.CATEGORIA_ID_INDEX:
|
||||||
|
value = getCategoria_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_CATEGORIA_ID_INDEX:
|
||||||
|
value = toCategoria_id();
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.ONLINE_INDEX:
|
||||||
|
value = getOnline();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object rawGet( String fieldName )
|
||||||
|
{
|
||||||
|
Object value = null;
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFileTrabalhador.ID_INDEX:
|
||||||
|
value = this.id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.FILE_ID_INDEX:
|
||||||
|
value = this.file_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_FILE_ID_INDEX:
|
||||||
|
value = this.to_file_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TRABALHADOR_ID_INDEX:
|
||||||
|
value = this.trabalhador_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX:
|
||||||
|
value = this.to_trabalhador_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.CATEGORIA_ID_INDEX:
|
||||||
|
value = this.categoria_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_CATEGORIA_ID_INDEX:
|
||||||
|
value = this.to_categoria_id;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.ONLINE_INDEX:
|
||||||
|
value = this.online;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFileTrabalhador.ID_INDEX:
|
||||||
|
setId( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.FILE_ID_INDEX:
|
||||||
|
setFile_id( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_FILE_ID_INDEX:
|
||||||
|
setToFile_id( ( shst.medicina.fichasclinicas.data.shst.FilFileData ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TRABALHADOR_ID_INDEX:
|
||||||
|
setTrabalhador_id( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX:
|
||||||
|
setToTrabalhador_id( ( shst.medicina.fichasclinicas.data.shst.TrabalhadoresData ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.CATEGORIA_ID_INDEX:
|
||||||
|
setCategoria_id( ( Integer ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_CATEGORIA_ID_INDEX:
|
||||||
|
setToCategoria_id( ( shst.medicina.fichasclinicas.data.shst.FilCategoriasData ) value );
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.ONLINE_INDEX:
|
||||||
|
setOnline( ( Boolean ) value );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rawSet( String fieldName, Object value )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFileTrabalhador.ID_INDEX:
|
||||||
|
this.id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.FILE_ID_INDEX:
|
||||||
|
this.file_id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_FILE_ID_INDEX:
|
||||||
|
this.to_file_id = ( shst.medicina.fichasclinicas.data.shst.FilFileData ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TRABALHADOR_ID_INDEX:
|
||||||
|
this.trabalhador_id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX:
|
||||||
|
this.to_trabalhador_id = ( shst.medicina.fichasclinicas.data.shst.TrabalhadoresData ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.CATEGORIA_ID_INDEX:
|
||||||
|
this.categoria_id = ( Integer ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_CATEGORIA_ID_INDEX:
|
||||||
|
this.to_categoria_id = ( shst.medicina.fichasclinicas.data.shst.FilCategoriasData ) value;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.ONLINE_INDEX:
|
||||||
|
this.online = ( Boolean ) value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNames()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getFieldNamesFull()
|
||||||
|
{
|
||||||
|
return FIELD_NAMES_FULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDBFieldNames()
|
||||||
|
{
|
||||||
|
return DB_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getPrimaryKeyNames()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String []getDefaultLoadSet()
|
||||||
|
{
|
||||||
|
return DEFAULT_LOAD_SET;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrimaryKeyName()
|
||||||
|
{
|
||||||
|
return PK_FIELD_NAMES[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Class<?> getFieldClass( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = getFieldIndex( fieldName );
|
||||||
|
Class<?> theClass = null;
|
||||||
|
switch( index )
|
||||||
|
{
|
||||||
|
case FilFileTrabalhador.ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.FILE_ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_FILE_ID_INDEX:
|
||||||
|
theClass = shst.medicina.fichasclinicas.data.shst.FilFileData.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TRABALHADOR_ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_TRABALHADOR_ID_INDEX:
|
||||||
|
theClass = shst.medicina.fichasclinicas.data.shst.TrabalhadoresData.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.CATEGORIA_ID_INDEX:
|
||||||
|
theClass = Integer.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.TO_CATEGORIA_ID_INDEX:
|
||||||
|
theClass = shst.medicina.fichasclinicas.data.shst.FilCategoriasData.class;
|
||||||
|
break;
|
||||||
|
case FilFileTrabalhador.ONLINE_INDEX:
|
||||||
|
theClass = Boolean.class;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return theClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFieldIndex( String fieldName )
|
||||||
|
{
|
||||||
|
Integer index = FIELD_INDEXES.get( fieldName );
|
||||||
|
return index != null ? index : FilFileTrabalhador._INVALID__INDEX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTableName()
|
||||||
|
{
|
||||||
|
return TABLENAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassIdentifier()
|
||||||
|
{
|
||||||
|
return CLASS_IDENTIFIER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setPrimaryKeyFromVirtual2DArray( com.evolute.utils.arrays.Virtual2DArray array, int row, int col )
|
||||||
|
{
|
||||||
|
if( primaryKey == null )
|
||||||
|
{
|
||||||
|
primaryKey = new com.evolute.entity.utils.IntegerPrimaryKey( TABLENAME, FilFileTrabalhador.PK_FIELD_NAMES );
|
||||||
|
Object idObject = array.get( row, col + 0 );
|
||||||
|
try
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ( Integer ) idObject );
|
||||||
|
setId( ( Integer ) idObject );
|
||||||
|
}
|
||||||
|
catch( ClassCastException ex )
|
||||||
|
{
|
||||||
|
if( idObject instanceof Number )
|
||||||
|
{
|
||||||
|
primaryKey.set( 0, ((Number)idObject).intValue() );
|
||||||
|
setId( ((Number)idObject).intValue() );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public com.evolute.entity.utils.IntegerPrimaryKey getPrimaryKey()
|
||||||
|
{
|
||||||
|
return primaryKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initLazyLoadFields()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPropertyLoaded( String fieldName )
|
||||||
|
{
|
||||||
|
if ( LAZY_LOADED_OBJECTS.get( fieldName ) == null )
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return LAZY_LOADED_OBJECTS.get( fieldName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,144 @@
|
|||||||
|
package shst.medicina.fichasclinicas.logic;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import shst.medicina.fichasclinicas.beans.DocumentoBean;
|
||||||
|
import shst.medicina.fichasclinicas.beans.EvoMessageBean;
|
||||||
|
import shst.medicina.fichasclinicas.beans.EvoMessageTypeBean;
|
||||||
|
import shst.medicina.fichasclinicas.beans.EvoResponseBean;
|
||||||
|
import shst.medicina.fichasclinicas.data.shst.FilFileData;
|
||||||
|
import shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData;
|
||||||
|
import shst.medicina.fichasclinicas.provider.DocumentosDataProvider;
|
||||||
|
|
||||||
|
import com.evolute.module.utilizadores.data.EvoUsrUserData;
|
||||||
|
import com.evolute.utils.error.ErrorLogger;
|
||||||
|
|
||||||
|
|
||||||
|
public class DocumentosLogic
|
||||||
|
{
|
||||||
|
|
||||||
|
@Autowired(required = true)
|
||||||
|
DocumentosDataProvider documentosProvider;
|
||||||
|
|
||||||
|
public EvoResponseBean<Long> getDocumentosCount(EvoUsrUserData user, Integer trabalhadorID)
|
||||||
|
{
|
||||||
|
EvoResponseBean<Long> result = new EvoResponseBean<Long>();
|
||||||
|
if(user != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Long rst = documentosProvider.getDocumentosCount(trabalhadorID);
|
||||||
|
result.setSuccess(true);
|
||||||
|
result.setData(rst);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
result.setSuccess(false);
|
||||||
|
EvoMessageBean msg = new EvoMessageBean();
|
||||||
|
msg.setType(EvoMessageTypeBean.ERROR);
|
||||||
|
msg.setMessageData("Erro ao comunicar com a Base de dados!");
|
||||||
|
result.addMessage(msg);
|
||||||
|
ErrorLogger.logException(ex, Level.SEVERE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.setSuccess(false);
|
||||||
|
EvoMessageBean msg = new EvoMessageBean();
|
||||||
|
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
|
||||||
|
msg.setMessageData("Utilizador asssociado à sessão inválido/inexistente!");
|
||||||
|
result.addMessage(msg);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EvoResponseBean<List<DocumentoBean>> getDocumentosList( EvoUsrUserData user, Integer trabalhadorID)
|
||||||
|
{
|
||||||
|
EvoResponseBean<List<DocumentoBean>> result = new EvoResponseBean<List<DocumentoBean>>();
|
||||||
|
if(user != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
List<DocumentoBean> outSet = new LinkedList<DocumentoBean>();
|
||||||
|
for(FilFileTrabalhadorData in : documentosProvider.getDocumentosList(trabalhadorID))
|
||||||
|
{
|
||||||
|
DocumentoBean out = null;
|
||||||
|
if(in.toFile_id() != null)
|
||||||
|
{
|
||||||
|
out = new DocumentoBean();
|
||||||
|
outSet.add(out);
|
||||||
|
FilFileData doc = in.toFile_id();
|
||||||
|
out.setId(doc.getId());
|
||||||
|
out.setDetalhe(doc.getDetails());
|
||||||
|
out.setTipo(doc.getMime_type());
|
||||||
|
}
|
||||||
|
if(out != null && in.toCategoria_id() != null)
|
||||||
|
{
|
||||||
|
out.setCategoria(in.toCategoria_id().getDescricao());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result.setSuccess(true);
|
||||||
|
result.setData(outSet);
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
result.setSuccess(false);
|
||||||
|
EvoMessageBean msg = new EvoMessageBean();
|
||||||
|
msg.setType(EvoMessageTypeBean.ERROR);
|
||||||
|
msg.setMessageData("Erro ao comunicar com a Base de dados!");
|
||||||
|
result.addMessage(msg);
|
||||||
|
ErrorLogger.logException(ex, Level.SEVERE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.setSuccess(false);
|
||||||
|
EvoMessageBean msg = new EvoMessageBean();
|
||||||
|
msg.setType(EvoMessageTypeBean.SESSIONTIMEOUT);
|
||||||
|
msg.setMessageData("Utilizador asssociado à sessão inválido/inexistente!");
|
||||||
|
result.addMessage(msg);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Response getDocumentoAsResponse(EvoUsrUserData user, Integer documentoID)
|
||||||
|
{
|
||||||
|
Response response = null;
|
||||||
|
if(user != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FilFileData doc = documentosProvider.getDocumento(documentoID);
|
||||||
|
|
||||||
|
if(doc != null)
|
||||||
|
{
|
||||||
|
response = Response.ok(doc.getFile_data(),doc.getMime_type()).header("Content-Disposition", "inline; filename=\""+doc.getName()+"\"").build();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response = Response.noContent().build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
response = Response.serverError().build();
|
||||||
|
ErrorLogger.logException(ex, Level.SEVERE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response = Response.status(Response.Status.UNAUTHORIZED).build();
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
package shst.medicina.fichasclinicas.provider;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
|
||||||
|
import pt.evolute.data.ProviderSpringBean;
|
||||||
|
import shst.medicina.fichasclinicas.data.shst.FilFileData;
|
||||||
|
import shst.medicina.fichasclinicas.data.shst.FilFileTrabalhadorData;
|
||||||
|
|
||||||
|
import com.evolute.utils.arrays.Virtual2DArray;
|
||||||
|
import com.evolute.utils.sql.Expression;
|
||||||
|
import com.evolute.utils.sql.Field;
|
||||||
|
import com.evolute.utils.sql.Select2;
|
||||||
|
|
||||||
|
|
||||||
|
public class DocumentosDataProvider
|
||||||
|
{
|
||||||
|
@Autowired(required = true)
|
||||||
|
@Qualifier("siprpProvider")
|
||||||
|
ProviderSpringBean siprpProvidersBean;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Long getDocumentosCount(Integer trabalhadorID) throws Exception
|
||||||
|
{
|
||||||
|
Select2 sel = new Select2(
|
||||||
|
new String[]{FilFileTrabalhadorData.TABLENAME,FilFileData.TABLENAME},
|
||||||
|
new Integer[]{Select2.JOIN_INNER},
|
||||||
|
new Expression[]{
|
||||||
|
new Field(FilFileTrabalhadorData.FILE_ID_FULL).isEqual(new Field(FilFileData.ID_FULL))
|
||||||
|
.and(new Field(FilFileData.DELETED_STAMP).isEqual(null))
|
||||||
|
.and(new Field(FilFileTrabalhadorData.TRABALHADOR_ID_FULL).isEqual(trabalhadorID))
|
||||||
|
.and(new Field(FilFileTrabalhadorData.ONLINE_FULL).isEqual(true))},
|
||||||
|
new String[]{"COUNT(DISTINCT("+FilFileData.ID_FULL+"))"},
|
||||||
|
/*expression*/null,
|
||||||
|
/*order*/null,
|
||||||
|
/*group*/null,
|
||||||
|
/*having*/null,
|
||||||
|
null);
|
||||||
|
Virtual2DArray queryResult = siprpProvidersBean.getDBMANAGER().getSharedExecuter(this).executeQuery(sel);
|
||||||
|
Long rst = null;
|
||||||
|
if(queryResult.rowCount()==1)
|
||||||
|
{
|
||||||
|
rst = queryResult.get(0,0);
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<FilFileTrabalhadorData> getDocumentosList(Integer trabalhadorID) throws Exception
|
||||||
|
{
|
||||||
|
Select2 excludDeleted = new Select2(FilFileData.TABLENAME,new Field(FilFileData.DELETED_STAMP).isEqual(null), FilFileData.ID);
|
||||||
|
|
||||||
|
return siprpProvidersBean.getENTITY_PROVIDER().listLoad(FilFileTrabalhadorData.class,new Field(FilFileTrabalhadorData.TRABALHADOR_ID).isEqual(trabalhadorID).and(new Field(FilFileTrabalhadorData.ONLINE).isEqual(true)).and(new Field(FilFileTrabalhadorData.FILE_ID).in(excludDeleted)),null,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public FilFileData getDocumento(Integer documentoID) throws Exception
|
||||||
|
{
|
||||||
|
return siprpProvidersBean.getENTITY_PROVIDER().load(FilFileData.class, new Object[]{documentoID,null},new String[]{FilFileData.ID,FilFileData.DELETED_STAMP});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
package shst.medicina.fichasclinicas.webservices.jaxrs;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.POST;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
|
import javax.ws.rs.core.Context;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
import javax.ws.rs.core.Response;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import shst.medicina.fichasclinicas.beans.DocumentoBean;
|
||||||
|
import shst.medicina.fichasclinicas.beans.EvoResponseBean;
|
||||||
|
import shst.medicina.fichasclinicas.logic.DocumentosLogic;
|
||||||
|
import shst.medicina.fichasclinicas.webservices.WebServicesConst;
|
||||||
|
|
||||||
|
import com.evolute.module.utilizadores.data.EvoUsrUserData;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Path("/documentos")
|
||||||
|
public class DocumentosImpl {
|
||||||
|
|
||||||
|
@Autowired(required = true)
|
||||||
|
DocumentosLogic documentosLogic;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getDocumentosCount")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public EvoResponseBean<Long> getDocumentosCount(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
|
||||||
|
{
|
||||||
|
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
|
||||||
|
return documentosLogic.getDocumentosCount(user, trabalhadorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getDocumentosList")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public EvoResponseBean<List<DocumentoBean>> getDocumentosList(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
|
||||||
|
{
|
||||||
|
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
|
||||||
|
return documentosLogic.getDocumentosList(user, trabalhadorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("/getDocumento")
|
||||||
|
@Produces(MediaType.WILDCARD)
|
||||||
|
public Response getDocumento(@Context HttpServletRequest req, @QueryParam("documentoID") Integer documentoID)
|
||||||
|
{
|
||||||
|
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
|
||||||
|
|
||||||
|
return documentosLogic.getDocumentoAsResponse(user,documentoID);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/saveDocumento")
|
||||||
|
@Consumes(MediaType.MULTIPART_FORM_DATA)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public EvoResponseBean<Boolean> saveDocumento(@Context HttpServletRequest req, @QueryParam("trabalhadorID") Integer trabalhadorID)
|
||||||
|
{
|
||||||
|
EvoUsrUserData user = (EvoUsrUserData) req.getSession().getAttribute(WebServicesConst.USER_SESSION_STORE_VAR);
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// for(Part p : req.getParts())
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// catch (Exception e)
|
||||||
|
// {
|
||||||
|
// // TODO Auto-generated catch block
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in new issue