forked from Coded/SIPRP
git-svn-id: https://svn.coded.pt/svn/SIPRP@808 bb69d46d-e84e-40c8-a05a-06db0d633741
parent
6874da9d3d
commit
dd5412e5e4
@ -1,10 +1,210 @@
|
|||||||
package siprp.higiene.gestao.equipamentos;
|
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.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
|
public class AdicionarEquipamentosPanel extends JPanel
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
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 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 899 B |
|
After Width: | Height: | Size: 947 B |
@ -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 {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -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 {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -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,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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in new issue