forked from Coded/SIPRP
no message
git-svn-id: https://svn.coded.pt/svn/SIPRP@284 bb69d46d-e84e-40c8-a05a-06db0d6337410'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
parent
0712bae237
commit
29a6eaecfa
@ -0,0 +1,107 @@
|
||||
/*
|
||||
* PrestadoresDataProvider.java
|
||||
*
|
||||
* Created on February 2, 2007, 9:53 AM
|
||||
*
|
||||
* To change this template, choose Tools | Template Manager
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package siprp.medicina.prestadores;
|
||||
|
||||
import com.evolute.utils.Singleton;
|
||||
import com.evolute.utils.arrays.Object2DArray;
|
||||
import com.evolute.utils.arrays.Virtual2DArray;
|
||||
import com.evolute.utils.db.DBManager;
|
||||
import com.evolute.utils.db.Executer;
|
||||
import com.evolute.utils.sql.Field;
|
||||
import com.evolute.utils.sql.Select;
|
||||
import com.evolute.utils.ui.search.SearchDialog;
|
||||
import com.evolute.utils.ui.search.SearchExecuter;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public class PrestadoresDataProvider
|
||||
implements SearchExecuter
|
||||
{
|
||||
private static final Object LOCK = new Object();
|
||||
private static PrestadoresDataProvider instance = null;
|
||||
|
||||
private static final String SEARCH_TITLE = "Procurar prestadores";
|
||||
private static final String SEARCH_COLUMNS[] =
|
||||
new String[]{ "Designa\u00e7\u00e3o", "Servi\u00e7os" };
|
||||
|
||||
private Executer EXECUTER;
|
||||
|
||||
/** Creates a new instance of PrestadoresDataProvider */
|
||||
public PrestadoresDataProvider()
|
||||
throws Exception
|
||||
{
|
||||
DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
|
||||
EXECUTER = dbm.getSharedExecuter( this );
|
||||
}
|
||||
|
||||
public static PrestadoresDataProvider getProvider()
|
||||
throws Exception
|
||||
{
|
||||
synchronized( LOCK )
|
||||
{
|
||||
if( instance == null )
|
||||
{
|
||||
instance = new PrestadoresDataProvider();
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public boolean hasDetails()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getSearchTitle()
|
||||
{
|
||||
return SEARCH_TITLE;
|
||||
}
|
||||
|
||||
public String[] getColumnNames()
|
||||
{
|
||||
return SEARCH_COLUMNS;
|
||||
}
|
||||
|
||||
public void showDetails(SearchDialog dialog, Object o) throws Exception
|
||||
{
|
||||
}
|
||||
|
||||
public Virtual2DArray search(String pattern) throws Exception
|
||||
{
|
||||
pattern = pattern.trim().toLowerCase();
|
||||
pattern = pattern.replace( ' ', '%' );
|
||||
Select select =
|
||||
new Select( new String[]{ "prestadores" },
|
||||
new String[]{ "id", "nome", "faz_consultas", "faz_ecds", "nome_plain" },
|
||||
new Field( "nome_plain" ).isLike( "%" + pattern + "%" ),
|
||||
new String[]{ "nome_plain" },
|
||||
null );
|
||||
Virtual2DArray array = EXECUTER.executeQuery( select );
|
||||
Object data[][] = new Object[ array.columnLength() ][ 3 ];
|
||||
for( int n = 0; n < data.length; n++ )
|
||||
{
|
||||
data[ n ][ 0 ] = array.get( n, 0 );
|
||||
data[ n ][ 1 ] = array.get( n, 1 );
|
||||
String str = "";
|
||||
if( "y".equals( array.get( n, 2 ) ) )
|
||||
{
|
||||
str += "consultas";
|
||||
}
|
||||
if( "y".equals( array.get( n, 3 ) ) )
|
||||
{
|
||||
str += ( str.length() > 0 ? ", " : "" ) + "ecds";
|
||||
}
|
||||
data[ n ][ 2 ] = str;
|
||||
}
|
||||
return new Object2DArray( data );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,185 @@
|
||||
/*
|
||||
* PrestadoresWindow.java
|
||||
*
|
||||
* Created on February 2, 2007, 9:44 AM
|
||||
*
|
||||
* To change this template, choose Tools | Template Manager
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package siprp.medicina.prestadores;
|
||||
|
||||
import com.evolute.utils.data.IDObject;
|
||||
import com.evolute.utils.ui.DialogException;
|
||||
import com.evolute.utils.ui.panel.CheckBoxPanel;
|
||||
import com.evolute.utils.ui.search.SearchDialog;
|
||||
import com.evolute.utils.ui.window.EditorWindow;
|
||||
import info.clearthought.layout.TableLayout;
|
||||
import info.clearthought.layout.TableLayoutConstraints;
|
||||
import java.awt.Dimension;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.JTextField;
|
||||
import siprp.clientes.ClientesDataProvider;
|
||||
import siprp.clientes.ContactoPanel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fpalma
|
||||
*/
|
||||
public class PrestadoresWindow extends EditorWindow
|
||||
{
|
||||
public static final String TITLE = "Prestadores";
|
||||
|
||||
protected JTextField nomeText;
|
||||
protected JCheckBox activoCheck;
|
||||
protected JCheckBox consultasCheck;
|
||||
protected JCheckBox ecdsCheck;
|
||||
protected CheckBoxPanel ecdsPanel;
|
||||
protected JTextArea moradaText;
|
||||
protected JTextField codigoPostalText;
|
||||
protected JTextField localidadeCodigoPostalText;
|
||||
protected JTextField localidadeText;
|
||||
protected ContactoPanel contactoPanel;
|
||||
|
||||
protected PrestadoresDataProvider provider;
|
||||
protected ClientesDataProvider clientesProvider;
|
||||
|
||||
/** Creates a new instance of PrestadoresWindow */
|
||||
public PrestadoresWindow()
|
||||
throws Exception
|
||||
{
|
||||
super( new int[][]{{ NEW_INDEX, EDIT_INDEX, CANCEL_INDEX, SAVE_INDEX, DELETE_INDEX,
|
||||
SELECT_BYNAME_INDEX }} );
|
||||
provider = PrestadoresDataProvider.getProvider();
|
||||
clientesProvider = ( ClientesDataProvider ) ClientesDataProvider.getProvider();
|
||||
setupComponents();
|
||||
}
|
||||
|
||||
private void setupComponents()
|
||||
throws Exception
|
||||
{
|
||||
setTitle( TITLE );
|
||||
JLabel nomeLabel = new JLabel( "Designa\u00e7\u00e3o" );
|
||||
nomeText = new JTextField();
|
||||
nomeText.setPreferredSize( new Dimension( 500, 20 ) );
|
||||
activoCheck = new JCheckBox( "Activo (actualmente fornece servi\u00e7os \u00e0 SIPRP)" );
|
||||
consultasCheck = new JCheckBox( "Faz consultas" );
|
||||
ecdsCheck = new JCheckBox( "Faz ecds" );
|
||||
List<IDObject> gruposProtocolo = new Vector<IDObject>();
|
||||
IDObject gruposProtocoloReais[] = clientesProvider.getAllGruposProtocoloReais();
|
||||
if( gruposProtocoloReais != null && gruposProtocoloReais.length > 0 )
|
||||
{
|
||||
gruposProtocolo.addAll( Arrays.asList( gruposProtocoloReais ) );
|
||||
}
|
||||
IDObject gruposProtocoloFalsos[] = clientesProvider.getAllGruposProtocoloFalsos();
|
||||
if( gruposProtocoloFalsos != null && gruposProtocoloFalsos.length > 0 )
|
||||
{
|
||||
gruposProtocolo.addAll( Arrays.asList( gruposProtocoloFalsos ) );
|
||||
}
|
||||
ecdsPanel = new CheckBoxPanel( gruposProtocolo.toArray( new IDObject[ gruposProtocolo.size() ] ) );
|
||||
JLabel contactoLabel = new JLabel( "Contacto" );
|
||||
contactoPanel = new ContactoPanel();
|
||||
contactoPanel.setPreferredSize( new Dimension( 350, 120 ) );
|
||||
contactoPanel.setBorder( BorderFactory.createEtchedBorder() );
|
||||
JLabel moradaLabel = new JLabel( "Morada" );
|
||||
moradaText = new JTextArea();
|
||||
moradaText.setLineWrap( true );
|
||||
moradaText.setWrapStyleWord( true );
|
||||
JScrollPane moradaScroll = new JScrollPane( moradaText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
|
||||
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
|
||||
moradaScroll.setPreferredSize( new Dimension( 500, 50 ) );
|
||||
JLabel codigoPostalLabel = new JLabel( "C\u00f3digo Postal" );
|
||||
codigoPostalText = new JTextField();
|
||||
codigoPostalText.setPreferredSize( new Dimension( 100, 50 ) );
|
||||
localidadeCodigoPostalText = new JTextField();
|
||||
localidadeCodigoPostalText.setPreferredSize( new Dimension( 150, 50 ) );
|
||||
JLabel localidadeLabel = new JLabel( "Localidade" );
|
||||
localidadeText = new JTextField();
|
||||
|
||||
double cols[] =
|
||||
new double[]{ TableLayout.MINIMUM, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.FILL };
|
||||
double rows[] =
|
||||
new double[]{ TableLayout.MINIMUM, TableLayout.MINIMUM, TableLayout.MINIMUM,
|
||||
TableLayout.FILL, TableLayout.PREFERRED, TableLayout.PREFERRED,
|
||||
TableLayout.MINIMUM, TableLayout.MINIMUM };
|
||||
TableLayout tableLayout = new TableLayout( cols,rows );
|
||||
getContentPane().setLayout( tableLayout );
|
||||
|
||||
getContentPane().add( nomeLabel, new TableLayoutConstraints( 0, 0 ) );
|
||||
getContentPane().add( nomeText, new TableLayoutConstraints( 1, 0, 3, 0 ) );
|
||||
getContentPane().add( activoCheck, new TableLayoutConstraints( 0, 1, 2, 1 ) );
|
||||
getContentPane().add( consultasCheck, new TableLayoutConstraints( 0, 2 ) );
|
||||
getContentPane().add( ecdsCheck, new TableLayoutConstraints( 0, 3 ) );
|
||||
getContentPane().add( ecdsPanel, new TableLayoutConstraints( 1, 3, 2, 3 ) );
|
||||
getContentPane().add( contactoLabel, new TableLayoutConstraints( 0, 4 ) );
|
||||
getContentPane().add( contactoPanel, new TableLayoutConstraints( 1, 4, 2, 4 ) );
|
||||
getContentPane().add( moradaLabel, new TableLayoutConstraints( 0, 5 ) );
|
||||
getContentPane().add( moradaScroll, new TableLayoutConstraints( 1, 5, 3, 5 ) );
|
||||
getContentPane().add( codigoPostalLabel, new TableLayoutConstraints( 0, 6 ) );
|
||||
getContentPane().add( codigoPostalText, new TableLayoutConstraints( 1, 6 ) );
|
||||
getContentPane().add( localidadeCodigoPostalText, new TableLayoutConstraints( 2, 6, 3, 6 ) );
|
||||
getContentPane().add( localidadeLabel, new TableLayoutConstraints( 0, 7 ) );
|
||||
getContentPane().add( localidadeText, new TableLayoutConstraints( 1, 7, 3, 7 ) );
|
||||
|
||||
pack();
|
||||
}
|
||||
|
||||
public boolean searchByName()
|
||||
{
|
||||
SearchDialog search = new SearchDialog( provider );
|
||||
Integer id = ( Integer )search.getSelected();
|
||||
if( id == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
clear( 0 );
|
||||
try
|
||||
{
|
||||
}
|
||||
catch( Exception ex )
|
||||
{
|
||||
DialogException.showExceptionMessage( ex, "Ocorreu um erro a carregar o prestador.", true );
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void enableComponents( int index, boolean enable )
|
||||
{
|
||||
}
|
||||
|
||||
public void reload( int index )
|
||||
{
|
||||
clear( 0 );
|
||||
try
|
||||
{
|
||||
}
|
||||
catch( Exception ex )
|
||||
{
|
||||
DialogException.showExceptionMessage( ex, "Erro a carregar dados", true );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void clear( int index )
|
||||
{
|
||||
}
|
||||
|
||||
public boolean newItem( int index )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean save( int index )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,271 @@
|
||||
/*
|
||||
* Prestadores.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 2, 2007
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.medicina.prestadores.data;
|
||||
|
||||
import java.util.Date;
|
||||
import com.evolute.utils.jdo.*;
|
||||
|
||||
public final class Prestadores implements JDOInnerObject
|
||||
{
|
||||
private Integer id;
|
||||
private String nome;
|
||||
private String nome_plain;
|
||||
private String morada;
|
||||
private String codigo_postal;
|
||||
private String localidade;
|
||||
private String localidade_cp;
|
||||
private Integer contacto_id;
|
||||
private Date inicio;
|
||||
private Date fim;
|
||||
private Integer ordem;
|
||||
private String activo;
|
||||
private String faz_consultas;
|
||||
private String faz_ecds;
|
||||
|
||||
public Prestadores()
|
||||
{
|
||||
}
|
||||
|
||||
public Object getField( String fieldName )
|
||||
{
|
||||
if( fieldName == PrestadoresData.ID )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.NOME )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.NOME_PLAIN )
|
||||
{
|
||||
return nome_plain;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.MORADA )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.CODIGO_POSTAL )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.LOCALIDADE )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.LOCALIDADE_CP )
|
||||
{
|
||||
return localidade_cp;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.CONTACTO_ID )
|
||||
{
|
||||
return contacto_id;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.INICIO )
|
||||
{
|
||||
return inicio;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FIM )
|
||||
{
|
||||
return fim;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.ORDEM )
|
||||
{
|
||||
return ordem;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.ACTIVO )
|
||||
{
|
||||
return activo;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FAZ_CONSULTAS )
|
||||
{
|
||||
return faz_consultas;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FAZ_ECDS )
|
||||
{
|
||||
return faz_ecds;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ID ) )
|
||||
{
|
||||
return id;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.NOME ) )
|
||||
{
|
||||
return nome;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.NOME_PLAIN ) )
|
||||
{
|
||||
return nome_plain;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.MORADA ) )
|
||||
{
|
||||
return morada;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.CODIGO_POSTAL ) )
|
||||
{
|
||||
return codigo_postal;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.LOCALIDADE ) )
|
||||
{
|
||||
return localidade;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.LOCALIDADE_CP ) )
|
||||
{
|
||||
return localidade_cp;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.CONTACTO_ID ) )
|
||||
{
|
||||
return contacto_id;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.INICIO ) )
|
||||
{
|
||||
return inicio;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FIM ) )
|
||||
{
|
||||
return fim;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ORDEM ) )
|
||||
{
|
||||
return ordem;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ACTIVO ) )
|
||||
{
|
||||
return activo;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FAZ_CONSULTAS ) )
|
||||
{
|
||||
return faz_consultas;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FAZ_ECDS ) )
|
||||
{
|
||||
return faz_ecds;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setField( String fieldName, Object value )
|
||||
{
|
||||
if( fieldName == PrestadoresData.ID )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.NOME )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.NOME_PLAIN )
|
||||
{
|
||||
nome_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.MORADA )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.CODIGO_POSTAL )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.LOCALIDADE )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.LOCALIDADE_CP )
|
||||
{
|
||||
localidade_cp = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.CONTACTO_ID )
|
||||
{
|
||||
contacto_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.INICIO )
|
||||
{
|
||||
inicio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FIM )
|
||||
{
|
||||
fim = ( Date ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.ORDEM )
|
||||
{
|
||||
ordem = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.ACTIVO )
|
||||
{
|
||||
activo = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FAZ_CONSULTAS )
|
||||
{
|
||||
faz_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName == PrestadoresData.FAZ_ECDS )
|
||||
{
|
||||
faz_ecds = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ID ) )
|
||||
{
|
||||
id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.NOME ) )
|
||||
{
|
||||
nome = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.NOME_PLAIN ) )
|
||||
{
|
||||
nome_plain = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.MORADA ) )
|
||||
{
|
||||
morada = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.CODIGO_POSTAL ) )
|
||||
{
|
||||
codigo_postal = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.LOCALIDADE ) )
|
||||
{
|
||||
localidade = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.LOCALIDADE_CP ) )
|
||||
{
|
||||
localidade_cp = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.CONTACTO_ID ) )
|
||||
{
|
||||
contacto_id = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.INICIO ) )
|
||||
{
|
||||
inicio = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FIM ) )
|
||||
{
|
||||
fim = ( Date ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ORDEM ) )
|
||||
{
|
||||
ordem = ( Integer ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.ACTIVO ) )
|
||||
{
|
||||
activo = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FAZ_CONSULTAS ) )
|
||||
{
|
||||
faz_consultas = ( String ) value;
|
||||
}
|
||||
else if( fieldName.equals( PrestadoresData.FAZ_ECDS ) )
|
||||
{
|
||||
faz_ecds = ( String ) value;
|
||||
}
|
||||
}
|
||||
|
||||
public Class getOuterClass()
|
||||
{
|
||||
return PrestadoresData.class;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* PrestadoresData.java
|
||||
*
|
||||
* Generated by com.evutils.codegen.JDOObjectGenerator on Feb 2, 2007
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.medicina.prestadores.data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import com.evolute.utils.jdo.*;
|
||||
|
||||
public final class PrestadoresData extends JDOObject
|
||||
{
|
||||
public static final String ID = "id";
|
||||
public static final String NOME = "nome";
|
||||
public static final String NOME_PLAIN = "nome_plain";
|
||||
public static final String MORADA = "morada";
|
||||
public static final String CODIGO_POSTAL = "codigo_postal";
|
||||
public static final String LOCALIDADE = "localidade";
|
||||
public static final String LOCALIDADE_CP = "localidade_cp";
|
||||
public static final String CONTACTO_ID = "contacto_id";
|
||||
public static final String INICIO = "inicio";
|
||||
public static final String FIM = "fim";
|
||||
public static final String ORDEM = "ordem";
|
||||
public static final String ACTIVO = "activo";
|
||||
public static final String FAZ_CONSULTAS = "faz_consultas";
|
||||
public static final String FAZ_ECDS = "faz_ecds";
|
||||
|
||||
public static final String FIELD_NAMES[] = new String[]{
|
||||
NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID,
|
||||
INICIO, FIM, ORDEM, ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, };
|
||||
|
||||
|
||||
protected static final String ALL_FIELD_NAMES[] = new String[]{
|
||||
ID, NOME, NOME_PLAIN, MORADA, CODIGO_POSTAL, LOCALIDADE, LOCALIDADE_CP, CONTACTO_ID,
|
||||
INICIO, FIM, ORDEM, ACTIVO, FAZ_CONSULTAS, FAZ_ECDS, };
|
||||
|
||||
private HashMap dataHash;
|
||||
|
||||
public PrestadoresData()
|
||||
{
|
||||
dataHash = new HashMap();
|
||||
}
|
||||
|
||||
protected Object innerGet( String fieldName )
|
||||
throws Exception
|
||||
{
|
||||
return dataHash.get( fieldName );
|
||||
}
|
||||
|
||||
protected void innerSet( String fieldName, Object value )
|
||||
throws Exception
|
||||
{
|
||||
dataHash.put( fieldName, value );
|
||||
}
|
||||
|
||||
public String []getFieldNames()
|
||||
{
|
||||
return FIELD_NAMES;
|
||||
}
|
||||
|
||||
protected String []getAllFieldNames()
|
||||
{
|
||||
return ALL_FIELD_NAMES;
|
||||
}
|
||||
|
||||
public Class getInnerClass()
|
||||
{
|
||||
return Prestadores.class;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* PrestadoresID.java
|
||||
*
|
||||
* Generated by com.evolute.codegen.jdo.idclassgenerators.JPOXIDClassGenerator on Feb 2, 2007
|
||||
*
|
||||
* Use but DON'T TOUCH
|
||||
*/
|
||||
package siprp.medicina.prestadores.data;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import com.evolute.utils.jdo.jpox.*;
|
||||
|
||||
public final class PrestadoresID extends IntegerID
|
||||
implements Serializable
|
||||
{
|
||||
public PrestadoresID()
|
||||
{
|
||||
}
|
||||
|
||||
public PrestadoresID( String str )
|
||||
{
|
||||
super( str );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">
|
||||
<jdo>
|
||||
<package name="siprp.medicina.prestadores.data">
|
||||
<class name="Prestadores" identity-type="application" objectid-class="siprp.medicina.prestadores.data.PrestadoresID">
|
||||
<extension vendor-name="jpox" key="table-name" value="prestadores"/>
|
||||
<extension vendor-name="jpox" key="use-poid-generator" value="true"/>
|
||||
<extension vendor-name="jpox" key="poid-class-generator" value="org.jpox.poid.MaxPoidGenerator"/>
|
||||
<extension vendor-name="evolute" key="import" value="java.util.Date"/>
|
||||
<field name="id" primary-key="true">
|
||||
<extension vendor-name="jpox" key="column-name" value="id"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="Integer"/>
|
||||
<extension vendor-name="evolute" key="visible" value="false"/>
|
||||
</field>
|
||||
<field name="nome" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="nome"/>
|
||||
<extension vendor-name="jpox" key="length" value="255"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="nome_plain" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="nome_plain"/>
|
||||
<extension vendor-name="jpox" key="length" value="255"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="morada" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="morada"/>
|
||||
<extension vendor-name="jpox" key="length" value="2048"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="codigo_postal" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="codigo_postal"/>
|
||||
<extension vendor-name="jpox" key="length" value="16"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="localidade" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="localidade"/>
|
||||
<extension vendor-name="jpox" key="length" value="255"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="localidade_cp" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="localidade_cp"/>
|
||||
<extension vendor-name="jpox" key="length" value="255"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="contacto_id" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="contacto_id"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="Integer"/>
|
||||
</field>
|
||||
<field name="inicio" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="inicio"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="Date"/>
|
||||
</field>
|
||||
<field name="fim" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="fim"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="Date"/>
|
||||
</field>
|
||||
<field name="ordem" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="ordem"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="Integer"/>
|
||||
</field>
|
||||
<field name="activo" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="activo"/>
|
||||
<extension vendor-name="jpox" key="length" value="1"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="faz_consultas" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="faz_consultas"/>
|
||||
<extension vendor-name="jpox" key="length" value="1"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
<field name="faz_ecds" primary-key="false">
|
||||
<extension vendor-name="jpox" key="column-name" value="faz_ecds"/>
|
||||
<extension vendor-name="jpox" key="length" value="1"/>
|
||||
<extension vendor-name="evolute" key="java-type" value="String"/>
|
||||
</field>
|
||||
</class>
|
||||
</package>
|
||||
</jdo>
|
||||
Loading…
Reference in new issue