git-svn-id: https://svn.coded.pt/svn/SIPRP@808 bb69d46d-e84e-40c8-a05a-06db0d633741

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Tiago Simão 17 years ago
parent 6874da9d3d
commit dd5412e5e4

@ -1,10 +1,210 @@
package siprp.higiene.gestao.equipamentos;
import static com.evolute.utils.strings.UnicodeLatin1Map.atilde;
import static com.evolute.utils.strings.UnicodeLatin1Map.ccedil;
import static com.evolute.utils.strings.UnicodeLatin1Map.eacute;
import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstraints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
import leaf.ui.LeafButton;
import leaf.ui.LeafIconButton;
import leaf.ui.TreeTools;
import siprp.database.cayenne.objects.HsEquipamentoMedico;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.objects.HsRelatorioEquipamentoMedico;
public class AdicionarEquipamentosPanel extends JPanel
{
private static final long serialVersionUID = 1L;
public static final String SELECTION_CHANGED = "SELECTION_CHANGED";
private static final String ICON_NAME_SAVE = "siprp/higiene/gestao/equipamentos/add.png";
private static final String ICON_NAME_REVERT = "siprp/higiene/gestao/equipamentos/delete.png";
private final LeafButton buttonAdicionar = LeafIconButton.createButton( ICON_NAME_SAVE );
private final LeafButton buttonRemover = LeafIconButton.createButton( ICON_NAME_REVERT );
private final DefaultMutableTreeNode root = new DefaultMutableTreeNode();
private final DefaultTreeModel model = new DefaultTreeModel( root );
public final JTree tree = new JTree( model );
private final JScrollPane scroll = new JScrollPane( tree );
private HsRelatorio relatorio = null;
public AdicionarEquipamentosPanel()
{
startupComponents();
setupLayout();
placeComponents();
startupListeners();
}
private void startupComponents()
{
buttonAdicionar.setEnabled( false );
buttonRemover.setEnabled( false );
buttonAdicionar.setToolTipText( "Adicionar" );
buttonRemover.setToolTipText( "Remover" );
tree.setRootVisible( false );
tree.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION );
}
private void setupLayout()
{
TableLayout layout = new TableLayout(
new double[]{ TableLayout.MINIMUM, TableLayout.FILL },
new double[]{ TableLayout.FILL }
);
layout.setHGap( 5 );
layout.setVGap( 5 );
setLayout( layout );
}
private void placeComponents()
{
JPanel panel = new JPanel();
TableLayout layout = new TableLayout(
new double[]{ TableLayout.MINIMUM },
new double[]{ TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL }
);
layout.setHGap( 5 );
layout.setVGap( 5 );
panel.setLayout( layout );
panel.add( buttonAdicionar, new TableLayoutConstraints( 0, 0 ) );
panel.add( buttonRemover, new TableLayoutConstraints( 0, 1 ) );
add( panel, new TableLayoutConstraints( 0, 0 ) );
add( scroll, new TableLayoutConstraints( 1, 0 ) );
}
private void startupListeners()
{
tree.getSelectionModel().addTreeSelectionListener( new TreeSelectionListener(){
@Override
public void valueChanged( TreeSelectionEvent e )
{
setEnabled();
TreePath path = tree.getSelectionPath();
Object object = path == null ? null : path.getLastPathComponent();
HsRelatorioEquipamentoMedico rel = object == null ? null : ( (object instanceof HsRelatorioEquipamentoMedico) ? (HsRelatorioEquipamentoMedico) ((EquipamentoNode) object).getUserObject() : null);
firePropertyChange( SELECTION_CHANGED, null, rel == null ? null : rel.getToHsRelatorio() );
}
} );
buttonAdicionar.addActionListener( new ActionListener()
{
@Override
public void actionPerformed( ActionEvent e )
{
add();
}
} );
buttonRemover.addActionListener( new ActionListener()
{
@Override
public void actionPerformed( ActionEvent e )
{
rem();
}
} );
}
private void add()
{
if( relatorio != null )
{
String equipamentoString = JOptionPane.showInputDialog( this, "Descri" + ccedil + atilde + "o", "Criar novo equipamento m" + eacute + "dico", JOptionPane.QUESTION_MESSAGE );
if( equipamentoString != null )
{
HsEquipamentoMedico equipamento = new HsEquipamentoMedico();
equipamento.setNome( equipamentoString );
equipamento.save();
HsRelatorioEquipamentoMedico rel = new HsRelatorioEquipamentoMedico();
rel.setToHsRelatorio( relatorio );
rel.setToHsEquipamentoMedico( equipamento );
rel.save();
refresh();
}
}
}
// private void save( DefaultMutableTreeNode toadd )
// {
// Object obj = toadd.getUserObject();
// if( obj instanceof HsPosto )
// {
// rel.save();
// }
// else
// {
// for( int i = 0; i < toadd.getChildCount(); ++i )
// {
// save( (DefaultMutableTreeNode) toadd.getChildAt( i ) );
// }
// }
// }
private void rem()
{
TreePath path = tree.getSelectionPath();
if( path != null )
{
Object object = path.getLastPathComponent();
if( object instanceof EquipamentoNode )
{
HsRelatorioEquipamentoMedico rel = ((HsRelatorioEquipamentoMedico)((EquipamentoNode) object).getUserObject());
rel.delete();
}
}
refresh();
}
private void setEnabled()
{
buttonAdicionar.setEnabled( relatorio != null && relatorio.getIsSubmetido() == null );
buttonRemover.setEnabled( tree.getSelectionCount() > 0 );
}
public void refresh()
{
root.removeAllChildren();
if( relatorio != null )
{
for( HsRelatorioEquipamentoMedico rel : relatorio.getHsRelatorioEquipamentoMedicoArray() )
{
root.add( new EquipamentoNode(rel) );
}
}
setEnabled();
TreeTools.refreshTree( tree, root );
}
public void setRelatorio( HsRelatorio relatorio )
{
this.relatorio = relatorio;
refresh();
}
}

@ -0,0 +1,17 @@
package siprp.higiene.gestao.equipamentos;
import javax.swing.tree.DefaultMutableTreeNode;
import siprp.database.cayenne.objects.HsRelatorioEquipamentoMedico;
public class EquipamentoNode extends DefaultMutableTreeNode
{
private static final long serialVersionUID = 1L;
public EquipamentoNode( HsRelatorioEquipamentoMedico equipamento )
{
super( equipamento );
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

@ -8,7 +8,11 @@ import static com.evolute.utils.strings.UnicodeLatin1Map.otilde;
import info.clearthought.layout.TableLayout;
import info.clearthought.layout.TableLayoutConstraints;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.EventObject;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
@ -17,14 +21,20 @@ import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import leaf.ui.LeafIconButton;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.objects.MarcacoesEstabelecimento;
import siprp.database.cayenne.objects.MarcacoesTecnicosHst;
import siprp.higiene.gestao.equipamentos.AdicionarEquipamentosPanel;
import com.evolute.utils.ui.calendar.JCalendarPanel;
public class PanelRelatorio extends JPanel
public class PanelRelatorio extends JPanel implements CaretListener, ChangeListener, ActionListener
{
private static final long serialVersionUID = 1L;
@ -59,6 +69,8 @@ public class PanelRelatorio extends JPanel
private final PlanoActuacaoPanel panelPlano = new PlanoActuacaoPanel();
private final RelatorioLegislacoesPanel panelLegislacao = new RelatorioLegislacoesPanel();
ButtonGroup bg = new ButtonGroup();
private HsRelatorio relatorio = null;
@ -75,10 +87,10 @@ public class PanelRelatorio extends JPanel
dataRelatorio.setPreferredSize( new Dimension( 150, 0 ) );
panelEquipamentos.setPreferredSize( new Dimension( 200, 0 ) );
fieldFuncao1.setPreferredSize( new Dimension( 100, 0 ) );
ButtonGroup bg = new ButtonGroup();
bg.add( radioInicial );
bg.add( radioPeriodica );
panelAcompanhantes.setBorder( BorderFactory.createTitledBorder( "Pessoas que acompanharam" ) );
panelEquipamentos.setBorder( BorderFactory.createTitledBorder( "Equipamentos m"+eacute+"dicos" ) );
tabs.addTab( "Plano de actua" + ccedil + atilde + "o", panelPlano );
tabs.addTab( "Legisla" + ccedil + otilde + "es", panelLegislacao );
}
@ -86,9 +98,9 @@ public class PanelRelatorio extends JPanel
private void startupLayout()
{
TableLayout layout = new TableLayout( new double[] {
TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.MINIMUM
TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL
}, new double[] {
TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL
TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.FILL
} );
layout.setVGap( 5 );
layout.setHGap( 5 );
@ -118,34 +130,173 @@ public class PanelRelatorio extends JPanel
panelAcompanhantes.add( fieldNome3, new TableLayoutConstraints( 1, 2 ) );
panelAcompanhantes.add( new JLabel( "Fun" + ccedil + atilde + "o" ), new TableLayoutConstraints( 2, 2 ) );
panelAcompanhantes.add( fieldFuncao3, new TableLayoutConstraints( 3, 2 ) );
add( new JLabel( "Data do relat" + oacute + "rio" ), new TableLayoutConstraints( 0, 0 ) );
add( dataRelatorio, new TableLayoutConstraints( 1, 0 ) );
add( new JLabel( "Avalia" + ccedil + atilde + "o" ), new TableLayoutConstraints( 2, 0 ) );
add( radioInicial, new TableLayoutConstraints( 3, 0 ) );
add( radioPeriodica, new TableLayoutConstraints( 4, 0 ) );
add( buttonSave, new TableLayoutConstraints( 6, 0 ) );
add( buttonRevert, new TableLayoutConstraints( 7, 0 ) );
add( new JLabel( "T" + eacute + "cnico de H.S." ), new TableLayoutConstraints( 0, 1 ) );
add( fieldTecnico, new TableLayoutConstraints( 1, 1, 4, 1 ) );
add( panelEquipamentos, new TableLayoutConstraints( 5, 1, 7, 2 ) );
add( panelAcompanhantes, new TableLayoutConstraints( 0, 2, 4, 2 ) );
add( tabs, new TableLayoutConstraints( 0, 3, 7, 3 ) );
add( buttonSave, new TableLayoutConstraints( 0, 0 ) );
add( buttonRevert, new TableLayoutConstraints( 1, 0 ) );
add( new JLabel( "Data do relat" + oacute + "rio" ), new TableLayoutConstraints( 0, 1, 2, 1 ) );
add( dataRelatorio, new TableLayoutConstraints( 3, 1 ) );
add( new JLabel( "Avalia" + ccedil + atilde + "o" ), new TableLayoutConstraints( 4, 1 ) );
add( radioInicial, new TableLayoutConstraints( 5, 1 ) );
add( radioPeriodica, new TableLayoutConstraints( 6, 1 ) );
add( new JLabel( "T" + eacute + "cnico de H.S." ), new TableLayoutConstraints( 0, 2, 2, 2 ) );
add( fieldTecnico, new TableLayoutConstraints( 3, 2, 6, 2 ) );
add( panelEquipamentos, new TableLayoutConstraints( 7, 1, 7, 3 ) );
add( panelAcompanhantes, new TableLayoutConstraints( 0, 3, 6, 3 ) );
add( tabs, new TableLayoutConstraints( 0, 4, 7, 4 ) );
}
private void setupListeners()
{
fieldTecnico.addCaretListener( this );
fieldFuncao1.addCaretListener( this );
fieldFuncao2.addCaretListener( this );
fieldFuncao3.addCaretListener( this );
fieldNome1.addCaretListener( this );
fieldNome2.addCaretListener( this );
fieldNome3.addCaretListener( this );
dataRelatorio.addChangeListener( this );
radioInicial.addActionListener( this );
radioPeriodica.addActionListener( this );
buttonSave.addActionListener( new ActionListener()
{
@Override
public void actionPerformed( ActionEvent e )
{
save();
}
} );
buttonRevert.addActionListener( new ActionListener()
{
@Override
public void actionPerformed( ActionEvent e )
{
revert();
}
} );
}
private void save()
{
if( relatorio != null )
{
relatorio.setData( dataRelatorio.getDate() );
relatorio.setAvaliacaoInicial( radioInicial.isSelected() );
MarcacoesEstabelecimento marcacao = relatorio.getToHsMarcacoesEstabelecimento();
if( marcacao != null )
{
MarcacoesTecnicosHst tecnico = marcacao.getToMarcacoesTecnicosHst();
if( tecnico != null )
{
tecnico.setNome( fieldTecnico.getText() );
}
}
}
relatorio.setAcompanhante1( fieldNome1.getText() );
relatorio.setAcompanhante2( fieldNome2.getText() );
relatorio.setAcompanhante3( fieldNome3.getText() );
relatorio.setFuncaoAcompanhante1(fieldFuncao1.getText());
relatorio.setFuncaoAcompanhante2(fieldFuncao2.getText());
relatorio.setFuncaoAcompanhante3(fieldFuncao3.getText());
refresh();
buttonRevert.setEnabled( false );
buttonSave.setEnabled( false );
}
private void revert()
{
refresh();
buttonRevert.setEnabled( false );
buttonSave.setEnabled( false );
}
private void refresh()
{
dataRelatorio.setDate( relatorio == null ? null : relatorio.getData() );
if( relatorio == null || relatorio.getAvaliacaoInicial() == null )
{
bg.clearSelection();
}
else
{
radioInicial.setSelected( relatorio.getAvaliacaoInicial() );
radioPeriodica.setSelected( !relatorio.getAvaliacaoInicial() );
}
String tecnicoName = null;
if(relatorio != null)
{
MarcacoesEstabelecimento marcacao = relatorio.getToHsMarcacoesEstabelecimento();
if( marcacao != null )
{
MarcacoesTecnicosHst tecnico = marcacao.getToMarcacoesTecnicosHst();
if( tecnico != null )
{
tecnicoName = tecnico.getNome();
}
}
}
fieldTecnico.setText( tecnicoName );
fieldNome1.setText( relatorio == null ? null : relatorio.getAcompanhante1() );
fieldNome2.setText( relatorio == null ? null : relatorio.getAcompanhante2() );
fieldNome3.setText( relatorio == null ? null : relatorio.getAcompanhante3() );
fieldFuncao1.setText( relatorio == null ? null : relatorio.getFuncaoAcompanhante1() );
fieldFuncao2.setText( relatorio == null ? null : relatorio.getFuncaoAcompanhante2() );
fieldFuncao3.setText( relatorio == null ? null : relatorio.getFuncaoAcompanhante3() );
}
private void setEnabled()
{
boolean enabled = relatorio != null && relatorio.getIsSubmetido() == null;
dataRelatorio.setEnabled( enabled );
radioInicial.setEnabled( enabled );;
radioPeriodica.setEnabled( enabled );
fieldTecnico.setEnabled( enabled );
fieldNome1.setEnabled( enabled );
fieldNome2.setEnabled( enabled );
fieldNome3.setEnabled( enabled );
fieldFuncao1.setEnabled( enabled );
fieldFuncao2.setEnabled( enabled );
fieldFuncao3.setEnabled( enabled );
}
public void setRelatorio( HsRelatorio relatorio )
{
this.relatorio = relatorio;
buttonSave.setEnabled( false );
buttonRevert.setEnabled( false );
panelEquipamentos.setRelatorio( relatorio );
refresh();
setEnabled();
}
private void updated( EventObject e )
{
Object source = e.getSource();
if( source instanceof Component )
{
if(((Component)source).isEnabled())
{
buttonSave.setEnabled( true );
buttonRevert.setEnabled( true );
}
}
}
private void refresh()
@Override
public void caretUpdate( CaretEvent e )
{
updated(e);
}
@Override
public void stateChanged( ChangeEvent e )
{
updated(e);
}
@Override
public void actionPerformed( ActionEvent e )
{
// TODO
updated(e);
}
}

@ -170,6 +170,8 @@ public class RelatorioHigieneSegurancaWindow extends JFrame implements Trackable
{
relatorio = new HsRelatorio();
relatorio.setData( new Date() );
relatorio.setToHsMarcacoesEstabelecimento( visita );
relatorio.save();
}
panelRelatorio.setRelatorio( relatorio );
}

@ -106,7 +106,7 @@ public class V9_0_To_V9_1
" descricao varchar(1024) NOT NULL," +
" portuguesa boolean NOT NULL" +
");" +
"create table hs_equipamento_medicao(" +
"create table hs_equipamento_medico(" +
" id serial PRIMARY KEY," +
" nome varchar(255) NOT NULL" +
");" +

@ -50,10 +50,10 @@ public class V9_9_To_V10_0
" hs_normalizacao_id int4 REFERENCES hs_normalizacao(id), " +
" CONSTRAINT hs_relatorio_normalizacao_pkey PRIMARY KEY (hs_relatorio_id,hs_normalizacao_id) " +
"); " +
"create table hs_relatorio_equipamento_medicao( " +
"create table hs_relatorio_equipamento_medico( " +
" hs_relatorio_id int4 REFERENCES hs_relatorio(id), " +
" hs_equipamento_medicao_id int4 REFERENCES hs_normalizacao(id), " +
" CONSTRAINT hs_relatorio_equipamento_medicao_pkey PRIMARY KEY (hs_relatorio_id,hs_equipamento_medicao_id) " +
" hs_equipamento_medico_id int4 REFERENCES hs_equipamento_medico(id), " +
" CONSTRAINT hs_relatorio_equipamento_medico_pkey PRIMARY KEY (hs_relatorio_id,hs_equipamento_medico_id) " +
"); " +
"alter table hs_relatorio add column avaliacao_inicial boolean; " +
"alter table hs_relatorio add column acompanhante1 varchar(256); " +

@ -208,13 +208,12 @@
<db-attribute name="email_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="estabelecimento_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
</db-entity>
<db-entity name="hs_equipamento_medicao" schema="public">
<db-attribute name="deleted_date" type="TIMESTAMP"/>
<db-entity name="hs_equipamento_medico" schema="public">
<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="nome" type="VARCHAR" isMandatory="true" length="255"/>
<db-key-generator>
<db-generator-type>ORACLE</db-generator-type>
<db-generator-name>hs_equipamento_medicao_id_seq</db-generator-name>
<db-generator-name>hs_equipamento_medico_id_seq</db-generator-name>
<db-key-cache-size>1</db-key-cache-size>
</db-key-generator>
</db-entity>
@ -298,6 +297,7 @@
<db-attribute name="valor_qualitativo" type="INTEGER" length="10"/>
</db-entity>
<db-entity name="hs_relatorio" schema="public">
<db-attribute name="acompanhante1" type="VARCHAR" length="256"/>
<db-attribute name="acompanhante2" type="VARCHAR" length="256"/>
<db-attribute name="acompanhante3" type="VARCHAR" length="256"/>
<db-attribute name="avaliacao_inicial" type="BOOLEAN"/>
@ -325,8 +325,8 @@
<db-key-cache-size>1</db-key-cache-size>
</db-key-generator>
</db-entity>
<db-entity name="hs_relatorio_equipamento_medicao" schema="public">
<db-attribute name="hs_equipamento_medicao_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-entity name="hs_relatorio_equipamento_medico" schema="public">
<db-attribute name="hs_equipamento_medico_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="hs_relatorio_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
</db-entity>
<db-entity name="hs_relatorio_legislacao" schema="public">
@ -779,7 +779,7 @@
<obj-attribute name="id" type="java.lang.Integer" db-attribute-path="id"/>
<obj-attribute name="ordem" type="java.lang.Integer" db-attribute-path="ordem"/>
</obj-entity>
<obj-entity name="EmailPlanoDeActuacao" className="siprp.database.cayenne.objects.EmailPlanoDeActuacao" dbEntityName="email_plano_de_actuacao">
<obj-entity name="EmailPlanoDeActuacao" className="siprp.database.cayenne.objects.EmailPlanoDeActuacao" dbEntityName="email_plano_de_actuacao" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
</obj-entity>
<obj-entity name="Empresas" className="siprp.database.cayenne.objects.Empresas" lock-type="optimistic" dbEntityName="empresas" superClassName="siprp.database.cayenne.objects.BaseObject">
@ -905,8 +905,7 @@
</obj-entity>
<obj-entity name="HsEmailEstabelecimento" className="siprp.database.cayenne.objects.HsEmailEstabelecimento" dbEntityName="hs_email_estabelecimento" superClassName="siprp.database.cayenne.objects.BaseObject">
</obj-entity>
<obj-entity name="HsEquipamentoMedicao" className="siprp.database.cayenne.objects.HsEquipamentoMedicao" dbEntityName="hs_equipamento_medicao" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="deletedDate" type="java.util.Date" db-attribute-path="deleted_date"/>
<obj-entity name="HsEquipamentoMedico" className="siprp.database.cayenne.objects.HsEquipamentoMedico" dbEntityName="hs_equipamento_medico" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="nome" type="java.lang.String" db-attribute-path="nome"/>
</obj-entity>
<obj-entity name="HsLegislacao" className="siprp.database.cayenne.objects.HsLegislacao" dbEntityName="hs_legislacao" superClassName="siprp.database.cayenne.objects.BaseObject">
@ -947,6 +946,7 @@
<obj-attribute name="valorQualitativo" type="java.lang.Integer" db-attribute-path="valor_qualitativo"/>
</obj-entity>
<obj-entity name="HsRelatorio" className="siprp.database.cayenne.objects.HsRelatorio" dbEntityName="hs_relatorio" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="acompanhante1" type="java.lang.String" db-attribute-path="acompanhante1"/>
<obj-attribute name="acompanhante2" type="java.lang.String" db-attribute-path="acompanhante2"/>
<obj-attribute name="acompanhante3" type="java.lang.String" db-attribute-path="acompanhante3"/>
<obj-attribute name="avaliacaoInicial" type="java.lang.Boolean" db-attribute-path="avaliacao_inicial"/>
@ -962,16 +962,16 @@
<obj-attribute name="deletedDate" type="java.util.Date" db-attribute-path="deleted_date"/>
<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
</obj-entity>
<obj-entity name="HsRelatorioEquipamentoMedicao" className="siprp.database.cayenne.objects.HsRelatorioEquipamentoMedicao" dbEntityName="hs_relatorio_equipamento_medicao">
<obj-entity name="HsRelatorioEquipamentoMedico" className="siprp.database.cayenne.objects.HsRelatorioEquipamentoMedico" dbEntityName="hs_relatorio_equipamento_medico" superClassName="siprp.database.cayenne.objects.BaseObject">
</obj-entity>
<obj-entity name="HsRelatorioLegislacao" className="siprp.database.cayenne.objects.HsRelatorioLegislacao" dbEntityName="hs_relatorio_legislacao">
<obj-entity name="HsRelatorioLegislacao" className="siprp.database.cayenne.objects.HsRelatorioLegislacao" dbEntityName="hs_relatorio_legislacao" superClassName="siprp.database.cayenne.objects.BaseObject">
</obj-entity>
<obj-entity name="HsRelatorioMedida" className="siprp.database.cayenne.objects.HsRelatorioMedida" dbEntityName="hs_relatorio_medida" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="deletedDate" type="java.util.Date" db-attribute-path="deleted_date"/>
<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
<obj-attribute name="requesitosLegais" type="java.lang.String" db-attribute-path="requesitos_legais"/>
</obj-entity>
<obj-entity name="HsRelatorioNormalizacao" className="siprp.database.cayenne.objects.HsRelatorioNormalizacao" dbEntityName="hs_relatorio_normalizacao">
<obj-entity name="HsRelatorioNormalizacao" className="siprp.database.cayenne.objects.HsRelatorioNormalizacao" dbEntityName="hs_relatorio_normalizacao" superClassName="siprp.database.cayenne.objects.BaseObject">
</obj-entity>
<obj-entity name="HsRelatorioPosto" className="siprp.database.cayenne.objects.HsRelatorioPosto" dbEntityName="hs_relatorio_posto" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="deletedDate" type="java.util.Date" db-attribute-path="deleted_date"/>
@ -1002,7 +1002,7 @@
<obj-attribute name="deletedDate" type="java.util.Date" db-attribute-path="deleted_date"/>
<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
</obj-entity>
<obj-entity name="Image" className="siprp.database.cayenne.objects.Image" dbEntityName="image">
<obj-entity name="Image" className="siprp.database.cayenne.objects.Image" dbEntityName="image" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="imageData" type="byte[]" db-attribute-path="image_data"/>
<obj-attribute name="name" type="java.lang.String" db-attribute-path="name"/>
</obj-entity>
@ -1163,7 +1163,7 @@
<obj-attribute name="estado" type="java.lang.Integer" db-attribute-path="estado"/>
<obj-attribute name="id" type="java.lang.Integer" db-attribute-path="id"/>
</obj-entity>
<obj-entity name="TrabalhadoresEcdsAnalise" className="siprp.database.cayenne.objects.TrabalhadoresEcdsAnalise" dbEntityName="trabalhadores_ecds_analise">
<obj-entity name="TrabalhadoresEcdsAnalise" className="siprp.database.cayenne.objects.TrabalhadoresEcdsAnalise" dbEntityName="trabalhadores_ecds_analise" superClassName="siprp.database.cayenne.objects.BaseObject">
<obj-attribute name="data" type="java.util.Date" db-attribute-path="data"/>
</obj-entity>
<obj-entity name="TrabalhadoresEcdsDatas" className="siprp.database.cayenne.objects.TrabalhadoresEcdsDatas" lock-type="optimistic" dbEntityName="trabalhadores_ecds_datas" superClassName="siprp.database.cayenne.objects.BaseObject">
@ -1328,6 +1328,9 @@
<db-relationship name="toHsEmail" source="hs_email_estabelecimento" target="hs_email" toMany="false">
<db-attribute-pair source="email_id" target="id"/>
</db-relationship>
<db-relationship name="hsRelatorioEquipamentoMedicoArray" source="hs_equipamento_medico" target="hs_relatorio_equipamento_medico" toDependentPK="true" toMany="true">
<db-attribute-pair source="id" target="hs_equipamento_medico_id"/>
</db-relationship>
<db-relationship name="hsLegislacaoEmpresaArray" source="hs_legislacao" target="hs_legislacao_empresa" toDependentPK="true" toMany="true">
<db-attribute-pair source="id" target="legislacao_id"/>
</db-relationship>
@ -1388,7 +1391,7 @@
<db-relationship name="toHsRisco" source="hs_posto_risco" target="hs_risco" toMany="false">
<db-attribute-pair source="risco_id" target="id"/>
</db-relationship>
<db-relationship name="hsRelatorioEquipamentoMedicaoArray" source="hs_relatorio" target="hs_relatorio_equipamento_medicao" toDependentPK="true" toMany="true">
<db-relationship name="hsRelatorioEquipamentoMedicoArray" source="hs_relatorio" target="hs_relatorio_equipamento_medico" toDependentPK="true" toMany="true">
<db-attribute-pair source="id" target="hs_relatorio_id"/>
</db-relationship>
<db-relationship name="hsRelatorioLegislacaoArray" source="hs_relatorio" target="hs_relatorio_legislacao" toDependentPK="true" toMany="true">
@ -1406,7 +1409,10 @@
<db-relationship name="hsRelatorioPostoArray" source="hs_relatorio_area" target="hs_relatorio_posto" toMany="true">
<db-attribute-pair source="id" target="area_id"/>
</db-relationship>
<db-relationship name="toHsRelatorio" source="hs_relatorio_equipamento_medicao" target="hs_relatorio" toMany="false">
<db-relationship name="toHsEquipamentoMedico" source="hs_relatorio_equipamento_medico" target="hs_equipamento_medico" toMany="false">
<db-attribute-pair source="hs_equipamento_medico_id" target="id"/>
</db-relationship>
<db-relationship name="toHsRelatorio" source="hs_relatorio_equipamento_medico" target="hs_relatorio" toMany="false">
<db-attribute-pair source="hs_relatorio_id" target="id"/>
</db-relationship>
<db-relationship name="toHsRelatorio" source="hs_relatorio_legislacao" target="hs_relatorio" toMany="false">
@ -1801,6 +1807,7 @@
<obj-relationship name="toHsEmail" source="HsEmailEmpresa" target="HsEmail" deleteRule="Nullify" db-relationship-path="toHsEmail"/>
<obj-relationship name="toEstabelecimento" source="HsEmailEstabelecimento" target="Estabelecimentos" deleteRule="Nullify" db-relationship-path="toEstabelecimento"/>
<obj-relationship name="toHsEmail" source="HsEmailEstabelecimento" target="HsEmail" deleteRule="Nullify" db-relationship-path="toHsEmail"/>
<obj-relationship name="hsRelatorioEquipamentoMedicoArray" source="HsEquipamentoMedico" target="HsRelatorioEquipamentoMedico" db-relationship-path="hsRelatorioEquipamentoMedicoArray"/>
<obj-relationship name="hsLegislacaoEmpresaArray" source="HsLegislacao" target="HsLegislacaoEmpresa" deleteRule="Cascade" db-relationship-path="hsLegislacaoEmpresaArray"/>
<obj-relationship name="hsLegislacaoEstabelecimentoArray" source="HsLegislacao" target="HsLegislacaoEstabelecimento" deleteRule="Cascade" db-relationship-path="hsLegislacaoEstabelecimentoArray"/>
<obj-relationship name="toHsLegislacaoCategoria" source="HsLegislacao" target="HsLegislacaoCategoria" deleteRule="Nullify" db-relationship-path="toHsLegislacaoCategoria"/>
@ -1820,13 +1827,14 @@
<obj-relationship name="toHsPosto" source="HsPostoRisco" target="HsPosto" deleteRule="Nullify" db-relationship-path="toHsPosto"/>
<obj-relationship name="toHsRelatorioRiscoValorQualitativo" source="HsPostoRisco" target="HsRelatorioRiscoValorQualitativo" deleteRule="Nullify" db-relationship-path="toHsRelatorioRiscoValorQualitativo"/>
<obj-relationship name="toHsRisco" source="HsPostoRisco" target="HsRisco" deleteRule="Nullify" db-relationship-path="toHsRisco"/>
<obj-relationship name="hsRelatorioEquipamentoMedicaoArray" source="HsRelatorio" target="HsRelatorioEquipamentoMedicao" db-relationship-path="hsRelatorioEquipamentoMedicaoArray"/>
<obj-relationship name="hsRelatorioEquipamentoMedicoArray" source="HsRelatorio" target="HsRelatorioEquipamentoMedico" deleteRule="Cascade" db-relationship-path="hsRelatorioEquipamentoMedicoArray"/>
<obj-relationship name="hsRelatorioLegislacaoArray" source="HsRelatorio" target="HsRelatorioLegislacao" db-relationship-path="hsRelatorioLegislacaoArray"/>
<obj-relationship name="hsRelatorioNormalizacaoArray" source="HsRelatorio" target="HsRelatorioNormalizacao" db-relationship-path="hsRelatorioNormalizacaoArray"/>
<obj-relationship name="hsRelatorioRiscoArray" source="HsRelatorio" target="HsRelatorioRisco" db-relationship-path="hsRelatorioRiscoArray"/>
<obj-relationship name="toHsMarcacoesEstabelecimento" source="HsRelatorio" target="MarcacoesEstabelecimento" db-relationship-path="toHsMarcacoesEstabelecimento"/>
<obj-relationship name="hsRelatorioPostoArray" source="HsRelatorioArea" target="HsRelatorioPosto" db-relationship-path="hsRelatorioPostoArray"/>
<obj-relationship name="toHsRelatorio" source="HsRelatorioEquipamentoMedicao" target="HsRelatorio" db-relationship-path="toHsRelatorio"/>
<obj-relationship name="toHsEquipamentoMedico" source="HsRelatorioEquipamentoMedico" target="HsEquipamentoMedico" deleteRule="Nullify" db-relationship-path="toHsEquipamentoMedico"/>
<obj-relationship name="toHsRelatorio" source="HsRelatorioEquipamentoMedico" target="HsRelatorio" deleteRule="Nullify" db-relationship-path="toHsRelatorio"/>
<obj-relationship name="toHsRelatorio" source="HsRelatorioLegislacao" target="HsRelatorio" db-relationship-path="toHsRelatorio"/>
<obj-relationship name="hsRelatorioPostoMedidaArray" source="HsRelatorioMedida" target="HsRelatorioPostoMedida" db-relationship-path="hsRelatorioPostoMedidaArray"/>
<obj-relationship name="toHsRelatorioRisco" source="HsRelatorioMedida" target="HsRelatorioRisco" db-relationship-path="toHsRelatorioRisco"/>

@ -59,13 +59,13 @@ public class BaseObject extends CayenneDataObject
protected String parseToUnicode( String string )
{
String result = UnicodeChecker.parseToUnicode( string );
return result.replaceAll( "\\\\\\\\", "\\\\" );
String result = string == null ? null : UnicodeChecker.parseToUnicode( string );
return result == null ? null : result.replaceAll( "\\\\\\\\", "\\\\" );
}
protected String parseFromUnicode( String string )
{
return UnicodeChecker.parseFromUnicode( string );
return string == null ? null : UnicodeChecker.parseFromUnicode( string );
}
}

@ -5,45 +5,19 @@ import java.util.List;
import siprp.database.cayenne.objects.auto._Empresas;
import com.evolute.utils.strings.UnicodeChecker;
public class Empresas extends _Empresas {
private static final long serialVersionUID = 1L;
private String name = null;
private String convertedName = null;
@Override
public String getDesignacaoSocial()
{
String currentName = super.getDesignacaoSocial();
if( name == null || !name.equals( currentName ))
{
name = currentName;
convertedName = null;
}
return convertName();
return parseFromUnicode( super.getDesignacaoSocial() );
}
@Override
public void setDesignacaoSocial( String nome )
{
super.setDesignacaoSocial( parseToUnicode( name ) );
getDesignacaoSocial();
}
private String convertName()
{
if( name == null )
{
convertedName = null;
}
else
{
convertedName = parseFromUnicode( name );
}
return convertedName;
super.setDesignacaoSocial( parseToUnicode( nome ) );
}
@Override

@ -6,6 +6,18 @@ public class HsArea extends _HsArea {
private static final long serialVersionUID = 1L;
@Override
public String getDescription()
{
return parseFromUnicode( super.getDescription() );
}
@Override
public void setDescription( String nome )
{
super.setDescription( parseToUnicode( nome ) );
}
@Override
public String toString()
{

@ -4,4 +4,23 @@ import siprp.database.cayenne.objects.auto._HsEmail;
public class HsEmail extends _HsEmail {
private static final long serialVersionUID = 1L;
@Override
public String getEmail()
{
return parseFromUnicode( super.getEmail() );
}
@Override
public void setEmail( String nome )
{
super.setEmail( parseToUnicode( nome ) );
}
@Override
public String toString()
{
return getEmail();
}
}

@ -1,7 +0,0 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsEquipamentoMedicao;
public class HsEquipamentoMedicao extends _HsEquipamentoMedicao {
}

@ -0,0 +1,28 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsEquipamentoMedico;
public class HsEquipamentoMedico extends _HsEquipamentoMedico {
private static final long serialVersionUID = 1L;
@Override
public String getNome()
{
return parseFromUnicode( super.getNome() );
}
@Override
public void setNome( String nome )
{
super.setNome( parseToUnicode( nome ) );
}
@Override
public String toString()
{
return getNome();
}
}

@ -1,7 +0,0 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsMedidaClassificacao;
public class HsMedidaClassificacao extends _HsMedidaClassificacao {
}

@ -3,7 +3,71 @@ package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsRelatorio;
public class HsRelatorio extends _HsRelatorio {
private static final long serialVersionUID = 1L;
@Override
public String getAcompanhante1()
{
return parseFromUnicode( super.getAcompanhante1() );
}
@Override
public String getAcompanhante2()
{
return parseFromUnicode( super.getAcompanhante2() );
}
@Override
public String getAcompanhante3()
{
return parseFromUnicode( super.getAcompanhante3() );
}
@Override
public String getFuncaoAcompanhante1()
{
return parseFromUnicode( super.getFuncaoAcompanhante1() );
}
@Override
public String getFuncaoAcompanhante2()
{
return parseFromUnicode( super.getFuncaoAcompanhante2() );
}
@Override
public String getFuncaoAcompanhante3()
{
return parseFromUnicode( super.getFuncaoAcompanhante3() );
}
@Override
public void setAcompanhante1( String nome )
{
super.setAcompanhante1( parseToUnicode( nome ) );
}
@Override
public void setAcompanhante2( String nome )
{
super.setAcompanhante2( parseToUnicode( nome ) );
}
@Override
public void setAcompanhante3( String nome )
{
super.setAcompanhante3( parseToUnicode( nome ) );
}
@Override
public void setFuncaoAcompanhante1( String nome )
{
super.setFuncaoAcompanhante1( parseToUnicode( nome ) );
}
@Override
public void setFuncaoAcompanhante2( String nome )
{
super.setFuncaoAcompanhante2( parseToUnicode( nome ) );
}
@Override
public void setFuncaoAcompanhante3( String nome )
{
super.setFuncaoAcompanhante3( parseToUnicode( nome ) );
}
}

@ -1,7 +0,0 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsRelatorioEquipamentoMedicao;
public class HsRelatorioEquipamentoMedicao extends _HsRelatorioEquipamentoMedicao {
}

@ -0,0 +1,15 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsRelatorioEquipamentoMedico;
public class HsRelatorioEquipamentoMedico extends _HsRelatorioEquipamentoMedico {
private static final long serialVersionUID = 1L;
@Override
public String toString()
{
return getToHsEquipamentoMedico().toString();
}
}

@ -1,7 +0,0 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsRelatorioMedidaArea;
public class HsRelatorioMedidaArea extends _HsRelatorioMedidaArea {
}

@ -1,7 +0,0 @@
package siprp.database.cayenne.objects;
import siprp.database.cayenne.objects.auto._HsRelatorioMedidaPosto;
public class HsRelatorioMedidaPosto extends _HsRelatorioMedidaPosto {
}

@ -4,6 +4,26 @@ import siprp.database.cayenne.objects.auto._MarcacoesTecnicosHst;
public class MarcacoesTecnicosHst extends _MarcacoesTecnicosHst {
private static final long serialVersionUID = 1L;
@Override
public String getNome()
{
return parseFromUnicode( super.getNome() );
}
@Override
public void setNome( String nome )
{
super.setNome( parseToUnicode( nome ) );
}
@Override
public String toString()
{
return getNome();
}
}

@ -1,7 +1,6 @@
package siprp.database.cayenne.objects.auto;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.Estabelecimentos;
/**
@ -10,7 +9,7 @@ import siprp.database.cayenne.objects.Estabelecimentos;
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _EmailPlanoDeActuacao extends CayenneDataObject {
public abstract class _EmailPlanoDeActuacao extends BaseObject {
public static final String DESCRIPTION_PROPERTY = "description";
public static final String TO_ESTABELECIMENTOS_PROPERTY = "toEstabelecimentos";

@ -1,34 +0,0 @@
package siprp.database.cayenne.objects.auto;
import java.util.Date;
import siprp.database.cayenne.objects.BaseObject;
/**
* Class _HsEquipamentoMedicao was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsEquipamentoMedicao extends BaseObject {
public static final String DELETED_DATE_PROPERTY = "deletedDate";
public static final String NOME_PROPERTY = "nome";
public static final String ID_PK_COLUMN = "id";
public void setDeletedDate(Date deletedDate) {
writeProperty("deletedDate", deletedDate);
}
public Date getDeletedDate() {
return (Date)readProperty("deletedDate");
}
public void setNome(String nome) {
writeProperty("nome", nome);
}
public String getNome() {
return (String)readProperty("nome");
}
}

@ -0,0 +1,40 @@
package siprp.database.cayenne.objects.auto;
import java.util.List;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorioEquipamentoMedico;
/**
* Class _HsEquipamentoMedico was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsEquipamentoMedico extends BaseObject {
public static final String NOME_PROPERTY = "nome";
public static final String HS_RELATORIO_EQUIPAMENTO_MEDICO_ARRAY_PROPERTY = "hsRelatorioEquipamentoMedicoArray";
public static final String ID_PK_COLUMN = "id";
public void setNome(String nome) {
writeProperty("nome", nome);
}
public String getNome() {
return (String)readProperty("nome");
}
public void addToHsRelatorioEquipamentoMedicoArray(HsRelatorioEquipamentoMedico obj) {
addToManyTarget("hsRelatorioEquipamentoMedicoArray", obj, true);
}
public void removeFromHsRelatorioEquipamentoMedicoArray(HsRelatorioEquipamentoMedico obj) {
removeToManyTarget("hsRelatorioEquipamentoMedicoArray", obj, true);
}
@SuppressWarnings("unchecked")
public List<HsRelatorioEquipamentoMedico> getHsRelatorioEquipamentoMedicoArray() {
return (List<HsRelatorioEquipamentoMedico>)readProperty("hsRelatorioEquipamentoMedicoArray");
}
}

@ -1,49 +0,0 @@
package siprp.database.cayenne.objects.auto;
import java.util.Date;
import java.util.List;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorioMedida;
/**
* Class _HsMedidaClassificacao was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsMedidaClassificacao extends BaseObject {
public static final String DELETED_DATE_PROPERTY = "deletedDate";
public static final String DESCRIPTION_PROPERTY = "description";
public static final String HS_RELATORIO_MEDIDA_ARRAY_PROPERTY = "hsRelatorioMedidaArray";
public static final String ID_PK_COLUMN = "id";
public void setDeletedDate(Date deletedDate) {
writeProperty("deletedDate", deletedDate);
}
public Date getDeletedDate() {
return (Date)readProperty("deletedDate");
}
public void setDescription(String description) {
writeProperty("description", description);
}
public String getDescription() {
return (String)readProperty("description");
}
public void addToHsRelatorioMedidaArray(HsRelatorioMedida obj) {
addToManyTarget("hsRelatorioMedidaArray", obj, true);
}
public void removeFromHsRelatorioMedidaArray(HsRelatorioMedida obj) {
removeToManyTarget("hsRelatorioMedidaArray", obj, true);
}
@SuppressWarnings("unchecked")
public List<HsRelatorioMedida> getHsRelatorioMedidaArray() {
return (List<HsRelatorioMedida>)readProperty("hsRelatorioMedidaArray");
}
}

@ -4,7 +4,7 @@ import java.util.Date;
import java.util.List;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorioEquipamentoMedicao;
import siprp.database.cayenne.objects.HsRelatorioEquipamentoMedico;
import siprp.database.cayenne.objects.HsRelatorioLegislacao;
import siprp.database.cayenne.objects.HsRelatorioNormalizacao;
import siprp.database.cayenne.objects.HsRelatorioRisco;
@ -18,6 +18,7 @@ import siprp.database.cayenne.objects.MarcacoesEstabelecimento;
*/
public abstract class _HsRelatorio extends BaseObject {
public static final String ACOMPANHANTE1_PROPERTY = "acompanhante1";
public static final String ACOMPANHANTE2_PROPERTY = "acompanhante2";
public static final String ACOMPANHANTE3_PROPERTY = "acompanhante3";
public static final String AVALIACAO_INICIAL_PROPERTY = "avaliacaoInicial";
@ -28,7 +29,7 @@ public abstract class _HsRelatorio extends BaseObject {
public static final String FUNCAO_ACOMPANHANTE3_PROPERTY = "funcaoAcompanhante3";
public static final String ID_PROPERTY = "id";
public static final String IS_SUBMETIDO_PROPERTY = "isSubmetido";
public static final String HS_RELATORIO_EQUIPAMENTO_MEDICAO_ARRAY_PROPERTY = "hsRelatorioEquipamentoMedicaoArray";
public static final String HS_RELATORIO_EQUIPAMENTO_MEDICO_ARRAY_PROPERTY = "hsRelatorioEquipamentoMedicoArray";
public static final String HS_RELATORIO_LEGISLACAO_ARRAY_PROPERTY = "hsRelatorioLegislacaoArray";
public static final String HS_RELATORIO_NORMALIZACAO_ARRAY_PROPERTY = "hsRelatorioNormalizacaoArray";
public static final String HS_RELATORIO_RISCO_ARRAY_PROPERTY = "hsRelatorioRiscoArray";
@ -36,6 +37,13 @@ public abstract class _HsRelatorio extends BaseObject {
public static final String ID_PK_COLUMN = "id";
public void setAcompanhante1(String acompanhante1) {
writeProperty("acompanhante1", acompanhante1);
}
public String getAcompanhante1() {
return (String)readProperty("acompanhante1");
}
public void setAcompanhante2(String acompanhante2) {
writeProperty("acompanhante2", acompanhante2);
}
@ -106,15 +114,15 @@ public abstract class _HsRelatorio extends BaseObject {
return (Date)readProperty("isSubmetido");
}
public void addToHsRelatorioEquipamentoMedicaoArray(HsRelatorioEquipamentoMedicao obj) {
addToManyTarget("hsRelatorioEquipamentoMedicaoArray", obj, true);
public void addToHsRelatorioEquipamentoMedicoArray(HsRelatorioEquipamentoMedico obj) {
addToManyTarget("hsRelatorioEquipamentoMedicoArray", obj, true);
}
public void removeFromHsRelatorioEquipamentoMedicaoArray(HsRelatorioEquipamentoMedicao obj) {
removeToManyTarget("hsRelatorioEquipamentoMedicaoArray", obj, true);
public void removeFromHsRelatorioEquipamentoMedicoArray(HsRelatorioEquipamentoMedico obj) {
removeToManyTarget("hsRelatorioEquipamentoMedicoArray", obj, true);
}
@SuppressWarnings("unchecked")
public List<HsRelatorioEquipamentoMedicao> getHsRelatorioEquipamentoMedicaoArray() {
return (List<HsRelatorioEquipamentoMedicao>)readProperty("hsRelatorioEquipamentoMedicaoArray");
public List<HsRelatorioEquipamentoMedico> getHsRelatorioEquipamentoMedicoArray() {
return (List<HsRelatorioEquipamentoMedico>)readProperty("hsRelatorioEquipamentoMedicoArray");
}

@ -1,29 +0,0 @@
package siprp.database.cayenne.objects.auto;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.HsRelatorio;
/**
* Class _HsRelatorioEquipamentoMedicao was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioEquipamentoMedicao extends CayenneDataObject {
public static final String TO_HS_RELATORIO_PROPERTY = "toHsRelatorio";
public static final String HS_EQUIPAMENTO_MEDICAO_ID_PK_COLUMN = "hs_equipamento_medicao_id";
public static final String HS_RELATORIO_ID_PK_COLUMN = "hs_relatorio_id";
public void setToHsRelatorio(HsRelatorio toHsRelatorio) {
setToOneTarget("toHsRelatorio", toHsRelatorio, true);
}
public HsRelatorio getToHsRelatorio() {
return (HsRelatorio)readProperty("toHsRelatorio");
}
}

@ -0,0 +1,39 @@
package siprp.database.cayenne.objects.auto;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsEquipamentoMedico;
import siprp.database.cayenne.objects.HsRelatorio;
/**
* Class _HsRelatorioEquipamentoMedico was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioEquipamentoMedico extends BaseObject {
public static final String TO_HS_EQUIPAMENTO_MEDICO_PROPERTY = "toHsEquipamentoMedico";
public static final String TO_HS_RELATORIO_PROPERTY = "toHsRelatorio";
public static final String HS_EQUIPAMENTO_MEDICO_ID_PK_COLUMN = "hs_equipamento_medico_id";
public static final String HS_RELATORIO_ID_PK_COLUMN = "hs_relatorio_id";
public void setToHsEquipamentoMedico(HsEquipamentoMedico toHsEquipamentoMedico) {
setToOneTarget("toHsEquipamentoMedico", toHsEquipamentoMedico, true);
}
public HsEquipamentoMedico getToHsEquipamentoMedico() {
return (HsEquipamentoMedico)readProperty("toHsEquipamentoMedico");
}
public void setToHsRelatorio(HsRelatorio toHsRelatorio) {
setToOneTarget("toHsRelatorio", toHsRelatorio, true);
}
public HsRelatorio getToHsRelatorio() {
return (HsRelatorio)readProperty("toHsRelatorio");
}
}

@ -1,7 +1,6 @@
package siprp.database.cayenne.objects.auto;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorio;
/**
@ -10,7 +9,7 @@ import siprp.database.cayenne.objects.HsRelatorio;
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioLegislacao extends CayenneDataObject {
public abstract class _HsRelatorioLegislacao extends BaseObject {
public static final String TO_HS_RELATORIO_PROPERTY = "toHsRelatorio";

@ -1,40 +0,0 @@
package siprp.database.cayenne.objects.auto;
import java.util.List;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorioMedidaPosto;
/**
* Class _HsRelatorioMedidaArea was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioMedidaArea extends BaseObject {
public static final String DESCRIPTION_PROPERTY = "description";
public static final String HS_RELATORIO_MEDIDA_POSTO_ARRAY_PROPERTY = "hsRelatorioMedidaPostoArray";
public static final String ID_PK_COLUMN = "id";
public void setDescription(String description) {
writeProperty("description", description);
}
public String getDescription() {
return (String)readProperty("description");
}
public void addToHsRelatorioMedidaPostoArray(HsRelatorioMedidaPosto obj) {
addToManyTarget("hsRelatorioMedidaPostoArray", obj, true);
}
public void removeFromHsRelatorioMedidaPostoArray(HsRelatorioMedidaPosto obj) {
removeToManyTarget("hsRelatorioMedidaPostoArray", obj, true);
}
@SuppressWarnings("unchecked")
public List<HsRelatorioMedidaPosto> getHsRelatorioMedidaPostoArray() {
return (List<HsRelatorioMedidaPosto>)readProperty("hsRelatorioMedidaPostoArray");
}
}

@ -1,35 +0,0 @@
package siprp.database.cayenne.objects.auto;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorioMedidaArea;
/**
* Class _HsRelatorioMedidaPosto was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioMedidaPosto extends BaseObject {
public static final String DESCRIPTION_PROPERTY = "description";
public static final String TO_HS_RELATORIO_MEDIDA_AREA_PROPERTY = "toHsRelatorioMedidaArea";
public static final String ID_PK_COLUMN = "id";
public void setDescription(String description) {
writeProperty("description", description);
}
public String getDescription() {
return (String)readProperty("description");
}
public void setToHsRelatorioMedidaArea(HsRelatorioMedidaArea toHsRelatorioMedidaArea) {
setToOneTarget("toHsRelatorioMedidaArea", toHsRelatorioMedidaArea, true);
}
public HsRelatorioMedidaArea getToHsRelatorioMedidaArea() {
return (HsRelatorioMedidaArea)readProperty("toHsRelatorioMedidaArea");
}
}

@ -1,7 +1,6 @@
package siprp.database.cayenne.objects.auto;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.HsRelatorio;
/**
@ -10,7 +9,7 @@ import siprp.database.cayenne.objects.HsRelatorio;
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _HsRelatorioNormalizacao extends CayenneDataObject {
public abstract class _HsRelatorioNormalizacao extends BaseObject {
public static final String TO_HS_RELATORIO_PROPERTY = "toHsRelatorio";

@ -2,8 +2,7 @@ package siprp.database.cayenne.objects.auto;
import java.util.List;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.Empresas;
/**
@ -12,7 +11,7 @@ import siprp.database.cayenne.objects.Empresas;
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _Image extends CayenneDataObject {
public abstract class _Image extends BaseObject {
public static final String IMAGE_DATA_PROPERTY = "imageData";
public static final String NAME_PROPERTY = "name";

@ -2,8 +2,7 @@ package siprp.database.cayenne.objects.auto;
import java.util.Date;
import org.apache.cayenne.CayenneDataObject;
import siprp.database.cayenne.objects.BaseObject;
import siprp.database.cayenne.objects.Prestadores;
import siprp.database.cayenne.objects.PrtGruposProtocolo;
@ -13,7 +12,7 @@ import siprp.database.cayenne.objects.PrtGruposProtocolo;
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public abstract class _TrabalhadoresEcdsAnalise extends CayenneDataObject {
public abstract class _TrabalhadoresEcdsAnalise extends BaseObject {
public static final String DATA_PROPERTY = "data";
public static final String TO_PRESTADORES_PROPERTY = "toPrestadores";

Loading…
Cancel
Save