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

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Tiago Simão 15 years ago
parent 3852e245bd
commit f978471807

Binary file not shown.

Binary file not shown.

@ -175,7 +175,7 @@ public class Main implements com.evolute.utils.ui.window.Connector
StatementExecuterFactory.initialize( new DBStatementExecuter( dbm.getSharedExecuter(this) ) ); StatementExecuterFactory.initialize( new DBStatementExecuter( dbm.getSharedExecuter(this) ) );
Updater.getInstance().executeUpdates( UpdateList.UPDATE_LIST ); Updater.getInstance().executeUpdates( UpdateList.getUpdates() );
// Updater.getInstance().executeUpdate(true, true, UpdateList.UPDATE_LIST); // Updater.getInstance().executeUpdate(true, true, UpdateList.UPDATE_LIST);
new ORMInitializer().initializeORM( url, user, passwd ); new ORMInitializer().initializeORM( url, user, passwd );

@ -434,29 +434,29 @@ public class PlanoActuacaoDataProvider
public List<EvoJoinObject> getRelatorioMedidasForPosto( HsRelatorioPostoData posto ) throws Exception public List<EvoJoinObject> getRelatorioMedidasForPosto( HsRelatorioPostoData posto ) throws Exception
{ {
List<EvoJoinObject> result = null;
List<ForeignKey> fks = new LinkedList<ForeignKey>();
// ForeignKey fk1 = new ForeignKey( HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL, HsRelatorioPostoRiscoData.class, HsRelatorioPostoRiscoData.RISCO_ID_FULL );
// fk1.setJoin( JOIN.INNER );
// ForeignKey fk2 = new ForeignKey( HsRelatorioPostoRiscoData.class, HsRelatorioPostoRiscoData.POSTO_ID_FULL, HsRelatorioPostoMedidaData.class, HsRelatorioPostoMedidaData.POSTO_ID_FULL );
// fk2.setJoin( JOIN.OUTER );
// ForeignKey fk3 = new ForeignKey( HsRelatorioPostoMedidaData.class, HsRelatorioPostoMedidaData.MEDIDA_ID_FULL, HsRelatorioMedidaData.class, HsRelatorioMedidaData.ID_FULL );
// fk3.setJoin( JOIN.OUTER );
// fks.add( fk1 );
// fks.add( fk2 );
// fks.add( fk3 );
fks.add( new ForeignKey( HsRelatorioPostoMedidaData.class, HsRelatorioPostoMedidaData.MEDIDA_ID_FULL, HsRelatorioMedidaData.class, HsRelatorioMedidaData.ID_FULL ) );
fks.add( new ForeignKey( HsRelatorioMedidaData.class, HsRelatorioMedidaData.RISCO_ID_FULL, HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL ) );
fks.add( new ForeignKey( HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL, HsRelatorioPostoRiscoData.class, HsRelatorioPostoRiscoData.RISCO_ID_FULL ) );
Expression where = new Field( HsRelatorioPostoMedidaData.POSTO_ID_FULL ).isEqual( posto.getId() ).and(
new Field( HsRelatorioRiscoData.DELETED_DATE_FULL ).isEqual( null )
);
result = ((EvoDataProvider)ENTITY_PROVIDER).listLoad( fks, where, HsRelatorioRiscoData.DESCRIPTION_FULL, HsRelatorioMedida.DESCRIPTION_FULL, HsRelatorioMedida.REQUESITOS_LEGAIS_FULL ); List<ForeignKey> fks = new LinkedList<ForeignKey>();
return result; /*
FROM hs_relatorio_posto_risco
INNER JOIN hs_relatorio_risco ON hs_relatorio_risco.id = hs_relatorio_posto_risco.risco_id
left outer JOIN hs_relatorio_medida ON hs_relatorio_medida.risco_id = hs_relatorio_risco.id AND hs_relatorio_medida.deleted_date IS NULL
*/
ForeignKey fk1 = new ForeignKey( HsRelatorioPostoRiscoData.class, HsRelatorioPostoRiscoData.RISCO_ID_FULL, HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL );
fk1.setJoin( JOIN.INNER );
ForeignKey fk2 = new ForeignKey( HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL, HsRelatorioMedidaData.class, HsRelatorioMedidaData.RISCO_ID_FULL );
fk2.setJoin( JOIN.OUTER );
fk2.setJoinExpression( fk2.getJoinExpression().and( new Field( HsRelatorioMedidaData.DELETED_DATE_FULL ).isEqual( null )) );
fks.add( fk1 );
fks.add( fk2 );
// fks.add( new ForeignKey( HsRelatorioPostoMedidaData.class, HsRelatorioPostoMedidaData.MEDIDA_ID_FULL, HsRelatorioMedidaData.class, HsRelatorioMedidaData.ID_FULL ) );
// fks.add( new ForeignKey( HsRelatorioMedidaData.class, HsRelatorioMedidaData.RISCO_ID_FULL, HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL ) );
// fks.add( new ForeignKey( HsRelatorioRiscoData.class, HsRelatorioRiscoData.ID_FULL, HsRelatorioPostoRiscoData.class, HsRelatorioPostoRiscoData.RISCO_ID_FULL ) );
Expression where = new Field( HsRelatorioPostoRiscoData.POSTO_ID_FULL ).isEqual( posto.getId() )
.and( new Field( HsRelatorioRiscoData.DELETED_DATE_FULL ).isEqual( null ) );
return ( (EvoDataProvider) ENTITY_PROVIDER ).listLoad( fks, where, HsRelatorioRiscoData.DESCRIPTION_FULL, HsRelatorioMedida.DESCRIPTION_FULL, HsRelatorioMedida.REQUESITOS_LEGAIS_FULL );
} }
public HsRelatorioRiscoData loadRelatorioRiscoByRiscoID( HsRelatorioPostoData posto, Integer hsRiscoID ) public HsRelatorioRiscoData loadRelatorioRiscoByRiscoID( HsRelatorioPostoData posto, Integer hsRiscoID )

@ -37,8 +37,6 @@ public class PlanoActuacaoPanel extends JPanel
private final GerirMedidaRelatorioPanel valoresMedida = new GerirMedidaRelatorioPanel(); private final GerirMedidaRelatorioPanel valoresMedida = new GerirMedidaRelatorioPanel();
// private final LeafButton refreshAreasButton = LeafIconButton.createButton( "Actualizar nomes de " + aacute + "reas/postos", PanelRelatorio.ICON_NAME_UNDO );
private final JPanel emptyPanel = new JPanel(); private final JPanel emptyPanel = new JPanel();
private final JPanel valoresPanel = new JPanel(); private final JPanel valoresPanel = new JPanel();
@ -113,111 +111,8 @@ public class PlanoActuacaoPanel extends JPanel
riscos.refresh(); riscos.refresh();
} }
} ); } );
// refreshAreasButton.addActionListener( new ActionListener()
// {
// @Override
// public void actionPerformed( ActionEvent e )
// {
// try
// {
// refreshAreas();
// }
// catch ( Exception ex )
// {
// ErrorLogger.logException( ex );
// }
// }
// } );
} }
// private void refreshAreas() throws Exception
// {
// if( relatorio != null )
// {
// MarcacoesEstabelecimento marcacao = relatorio.getToHsMarcacoesEstabelecimento();
// if( marcacao != null )
// {
// Estabelecimentos estabelecimento = marcacao.getToEstabelecimentos();
// if( estabelecimento != null )
// {
// for( HsPostoEstabelecimento postoEstabelecimento : estabelecimento.getHsPostoEstabelecimentoArray() )
// {
// refreshPostoEstabelecimento( postoEstabelecimento );
// }
// areas.refresh();
// }
// }
// }
// }
//
// private void refreshPostoEstabelecimento( HsPostoEstabelecimento postoEstabelecimento ) throws Exception
// {
// if( postoEstabelecimento != null )
// {
// HsPosto posto = postoEstabelecimento.getToHsPosto();
// if( posto != null )
// {
// HsArea area = posto.getToHsArea();
// HsRelatorioArea relatorioArea = null;
// if( area != null )
// {
// relatorioArea = getAreaInRelatorio( relatorio, area.getId() );
// if( relatorioArea == null )
// {
// relatorioArea = new HsRelatorioArea();
// }
// HigieneSegurancaLogic.updateRelatorioAreaFromHsArea( relatorio, relatorioArea, area );
// }
// HsRelatorioPosto relatorioPosto = getPostoInRelatorio( relatorio, posto.getId() );
// if( relatorioPosto == null )
// {
// relatorioPosto = HigieneSegurancaLogic.createRelatorioPostoFromHsPosto( relatorio , relatorioArea, posto );
// }
// else
// {
// HigieneSegurancaLogic.updateRelatorioPostoFromHsPosto( relatorioPosto, relatorioArea, posto );
// }
// }
// }
// }
//
// private HsRelatorioArea getAreaInRelatorio( HsRelatorio relatorio, Integer softRefId )
// {
// HsRelatorioArea result = null;
// if( relatorio != null && softRefId != null )
// {
// for( HsRelatorioArea relatArea : relatorio.getHsRelatorioArea() )
// {
// if( softRefId.equals( relatArea.getHsAreaId() ) )
// {
// result = relatArea;
// break;
// }
// }
// }
// return result;
// }
//
// private HsRelatorioPosto getPostoInRelatorio( HsRelatorio relatorio, Integer softRefId )
// {
// HsRelatorioPosto result = null;
// if( relatorio != null && softRefId != null )
// {
// for( HsRelatorioArea relatArea : relatorio.getHsRelatorioArea() )
// {
// for( HsRelatorioPosto relatPosto : relatArea.getHsRelatorioPostoArray() )
// {
// if( softRefId.equals( relatPosto.getHsPostoId() ) )
// {
// result = relatPosto;
// break;
// }
// }
// }
// }
// return result;
// }
private void startupComponents() private void startupComponents()
{ {
riscos.setBorder( BorderFactory.createTitledBorder( "Riscos" ) ); riscos.setBorder( BorderFactory.createTitledBorder( "Riscos" ) );
@ -242,17 +137,11 @@ public class PlanoActuacaoPanel extends JPanel
valoresPanel.add( valoresRisco, RISCO_PANEL ); valoresPanel.add( valoresRisco, RISCO_PANEL );
valoresPanel.add( valoresMedida, MEDIDA_PANEL ); valoresPanel.add( valoresMedida, MEDIDA_PANEL );
valoresPanel.add( emptyPanel, EMPTY_PANEL ); valoresPanel.add( emptyPanel, EMPTY_PANEL );
// add( refreshAreasButton, new TableLayoutConstraints( 0, 0, 1, 0 ) );
add( areas, new TableLayoutConstraints( 0, 1, 1, 1 ) ); add( areas, new TableLayoutConstraints( 0, 1, 1, 1 ) );
add( riscos, new TableLayoutConstraints( 2, 1 ) ); add( riscos, new TableLayoutConstraints( 2, 1 ) );
add( valoresPanel, new TableLayoutConstraints( 3, 1 ) ); add( valoresPanel, new TableLayoutConstraints( 3, 1 ) );
} }
private void setEnabled()
{
// refreshAreasButton.setEnabled(relatorio != null && relatorio.getIsSubmetido() == null );
}
public void setRelatorio( HsRelatorioData relatorio ) public void setRelatorio( HsRelatorioData relatorio )
{ {
this.relatorio = relatorio; this.relatorio = relatorio;
@ -262,7 +151,6 @@ public class PlanoActuacaoPanel extends JPanel
valoresRisco.setEnabled( relatorio != null && relatorio.getIs_submetido() == null ); valoresRisco.setEnabled( relatorio != null && relatorio.getIs_submetido() == null );
valoresMedida.setMedida( null ); valoresMedida.setMedida( null );
valoresMedida.setEnabled( relatorio != null && relatorio.getIs_submetido() == null ); valoresMedida.setEnabled( relatorio != null && relatorio.getIs_submetido() == null );
setEnabled( );
} }
public boolean isValidPlano() public boolean isValidPlano()

@ -88,7 +88,7 @@ public class VerAreasRelatorioPanel extends JPanel
boolean allOk = true; boolean allOk = true;
for( HsRelatorioPostoRiscoData rel : posto.fromHsRelatorioPostoRisco_posto_id() ) for( HsRelatorioPostoRiscoData rel : posto.fromHsRelatorioPostoRisco_posto_id() )
{ {
if( rel.toRisco_id().getDeleted_date() != null ) if( rel.toRisco_id().getDeleted_date() == null )
{ {
allOk &= HigieneSegurancaLogic.isRelatorioRiscoPreenchido( rel ); allOk &= HigieneSegurancaLogic.isRelatorioRiscoPreenchido( rel );
} }

@ -207,8 +207,6 @@ public class HigieneSegurancaLogic
public static void reverterRelatorio( HsRelatorioData relatorio ) public static void reverterRelatorio( HsRelatorioData relatorio )
{ {
// System.out.println( "\nreverterRelatorio( " + relatorio + " ) : " );
try try
{ {
if(relatorio != null) if(relatorio != null)
@ -321,7 +319,6 @@ public class HigieneSegurancaLogic
HsRelatorioPostoRiscoData rPostoRisco = new HsRelatorioPostoRiscoData(); HsRelatorioPostoRiscoData rPostoRisco = new HsRelatorioPostoRiscoData();
rPostoRisco.setToPosto_id( rPosto ); rPostoRisco.setToPosto_id( rPosto );
rPostoRisco.setToRisco_id( relatorioRisco ); rPostoRisco.setToRisco_id( relatorioRisco );
//rPostoRisco.setOrdem( order );
rPostoRisco.save(); rPostoRisco.save();
} }
@ -488,42 +485,19 @@ public class HigieneSegurancaLogic
DefaultMutableTreeNode internacional = new DefaultMutableTreeNode("Normaliza" + ccedil + atilde + "o Internacional" ); DefaultMutableTreeNode internacional = new DefaultMutableTreeNode("Normaliza" + ccedil + atilde + "o Internacional" );
for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEmpresa( true, empresa ) ) for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEmpresa( true, empresa ) )
{ {
// if( empresa == null || hasEmpresa( normalizacao, empresa ) ) DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
// { portuguesa.add( normalizacaoNode );
DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
portuguesa.add( normalizacaoNode );
// }
} }
for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEmpresa( false, empresa ) ) for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEmpresa( false, empresa ) )
{ {
// if( empresa == null || hasEmpresa( normalizacao, empresa ) ) DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
// { internacional.add( normalizacaoNode );
DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
internacional.add( normalizacaoNode );
// }
} }
result.add( portuguesa ); result.add( portuguesa );
result.add( internacional ); result.add( internacional );
return result; return result;
} }
// private static boolean hasEmpresa( HsNormalizacaoData normalizacao, EmpresasData empresa )
// {
// boolean result = false;
// if( normalizacao != null && empresa != null )
// {
// for( HsNormalizacaoEmpresaData rel : normalizacao.fromHsNormalizacaoEmpresa_normalizacao_id() )
// {
// result = empresa.equals( rel.toEmpresa_id() );
// if( result )
// {
// break;
// }
// }
// }
// return result;
// }
public static DefaultMutableTreeNode getNormalizacaoTreeForEstabelecimento( EstabelecimentosData estabelecimento ) public static DefaultMutableTreeNode getNormalizacaoTreeForEstabelecimento( EstabelecimentosData estabelecimento )
{ {
DefaultMutableTreeNode result = new DefaultMutableTreeNode(); DefaultMutableTreeNode result = new DefaultMutableTreeNode();
@ -531,42 +505,19 @@ public class HigieneSegurancaLogic
DefaultMutableTreeNode internacional = new DefaultMutableTreeNode("Normaliza" + ccedil + atilde + "o Internacional" ); DefaultMutableTreeNode internacional = new DefaultMutableTreeNode("Normaliza" + ccedil + atilde + "o Internacional" );
for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEstabelecimento( true, estabelecimento ) ) for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEstabelecimento( true, estabelecimento ) )
{ {
// if( estabelecimento == null || hasEstabelecimento( normalizacao, estabelecimento ) ) DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
// { portuguesa.add( normalizacaoNode );
DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
portuguesa.add( normalizacaoNode );
// }
} }
for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEstabelecimento( false, estabelecimento ) ) for( HsNormalizacaoData normalizacao : planoProvider.getNormalizacaoForEstabelecimento( false, estabelecimento ) )
{ {
// if( estabelecimento == null || hasEstabelecimento( normalizacao, estabelecimento ) ) DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
// { internacional.add( normalizacaoNode );
DefaultMutableTreeNode normalizacaoNode = new DefaultMutableTreeNode( normalizacao );
internacional.add( normalizacaoNode );
// }
} }
result.add( portuguesa ); result.add( portuguesa );
result.add( internacional ); result.add( internacional );
return result; return result;
} }
private static boolean hasEstabelecimento( HsNormalizacaoData normalizacao, EstabelecimentosData estabelecimento )
{
boolean result = false;
if( normalizacao != null && estabelecimento != null )
{
for( HsNormalizacaoEstabelecimentoData rel : normalizacao.fromHsNormalizacaoEstabelecimento_normalizacao_id() )
{
result = estabelecimento.equals( rel.toEstabelecimento_id() );
if( result )
{
break;
}
}
}
return result;
}
public static DefaultMutableTreeNode getLegislacaoTreeForEmpresa( EmpresasData empresa ) public static DefaultMutableTreeNode getLegislacaoTreeForEmpresa( EmpresasData empresa )
{ {
DefaultMutableTreeNode result = new DefaultMutableTreeNode(); DefaultMutableTreeNode result = new DefaultMutableTreeNode();

@ -9,80 +9,10 @@
package siprp.update; package siprp.update;
import shst.update.updates.SHSTUpdate11; import java.util.List;
import shst.update.updates.SHSTUpdate12;
import shst.update.updates.SHSTUpdate8; import shst.update.SHSTUpdateList;
import shst.update.updates.SHSTUpdate9;
import siprp.update.updates.V10_0_To_V10_1;
import siprp.update.updates.V10_1_To_V10_2;
import siprp.update.updates.V10_2_To_V10_3;
import siprp.update.updates.V10_3_To_V10_4;
import siprp.update.updates.V10_4_To_V10_5;
import siprp.update.updates.V10_5_To_V10_6;
import siprp.update.updates.V10_6_To_V10_7;
import siprp.update.updates.V10_7_To_V10_8;
import siprp.update.updates.V10_8_To_V10_9;
import siprp.update.updates.V10_9_To_V11_0;
import siprp.update.updates.V11_0_To_V11_1;
import siprp.update.updates.V11_1_To_V11_2;
import siprp.update.updates.V11_2_To_V11_3;
import siprp.update.updates.V11_3_To_V11_4;
import siprp.update.updates.V11_4_To_V11_5;
import siprp.update.updates.V11_5_To_V11_6;
import siprp.update.updates.V11_6_To_V11_7;
import siprp.update.updates.V11_7_To_V11_8;
import siprp.update.updates.V11_8_To_V11_9;
import siprp.update.updates.V11_9_To_V12_0;
import siprp.update.updates.V12_0_To_V12_1;
import siprp.update.updates.V12_1_To_V12_2;
import siprp.update.updates.V12_2_To_V12_3;
import siprp.update.updates.V12_3_To_V12_4;
import siprp.update.updates.V12_4_To_V12_5;
import siprp.update.updates.V12_5_To_V12_6;
import siprp.update.updates.V12_6_To_V12_7;
import siprp.update.updates.V12_7_To_V12_8;
import siprp.update.updates.V12_8_To_V12_9;
import siprp.update.updates.V12_9_To_V13_0;
import siprp.update.updates.V13_0_To_V13_1;
import siprp.update.updates.V13_1_To_V13_2;
import siprp.update.updates.V13_2_To_V13_3;
import siprp.update.updates.V13_3_To_V13_4;
import siprp.update.updates.V13_7_To_V13_8;
import siprp.update.updates.V14_1_To_V14_2;
import siprp.update.updates.V14_2_To_V14_3;
import siprp.update.updates.V6_1_To_V7_0;
import siprp.update.updates.V7_0_To_V7_2;
import siprp.update.updates.V7_2_To_V7_4;
import siprp.update.updates.V7_4_To_V7_5;
import siprp.update.updates.V7_5_To_V7_6;
import siprp.update.updates.V7_6_To_V7_7;
import siprp.update.updates.V7_7_To_V7_8;
import siprp.update.updates.V7_8_To_V7_9;
import siprp.update.updates.V7_9_To_V8_0;
import siprp.update.updates.V8_0_To_V8_1;
import siprp.update.updates.V8_1_To_V8_2;
import siprp.update.updates.V8_2_To_V8_3;
import siprp.update.updates.V8_3_To_V8_4;
import siprp.update.updates.V8_4_To_V8_5;
import siprp.update.updates.V8_5_To_V8_6;
import siprp.update.updates.V8_6_To_V8_7;
import siprp.update.updates.V8_7_To_V8_8;
import siprp.update.updates.V8_8_To_V8_9;
import siprp.update.updates.V8_9_To_V9_0;
import siprp.update.updates.V9_0_To_V9_1;
import siprp.update.updates.V9_1_To_V9_2;
import siprp.update.updates.V9_2_To_V9_3;
import siprp.update.updates.V9_3_To_V9_4;
import siprp.update.updates.V9_4_To_V9_5;
import siprp.update.updates.V9_5_To_V9_6;
import siprp.update.updates.V9_6_To_V9_7;
import siprp.update.updates.V9_7_To_V9_8;
import siprp.update.updates.V9_8_To_V9_9;
import siprp.update.updates.V9_9_To_V10_0;
import com.evolute.module.cursos.EvoCursosInstallUpdate;
import com.evolute.module.cursos.EvoCursosUpdate1;
import com.evolute.module.cursos.EvoCursosUpdate2;
import com.evolute.module.updater.AbstractUpdate; import com.evolute.module.updater.AbstractUpdate;
@ -92,122 +22,56 @@ import com.evolute.module.updater.AbstractUpdate;
*/ */
public class UpdateList public class UpdateList
{ {
public static final AbstractUpdate UPDATE_LIST[] = // OBSOLETE!
new AbstractUpdate[]{ // private static final AbstractUpdate UPDATE_LIST[] =
new V6_1_To_V7_0(), new V7_0_To_V7_2(), // new AbstractUpdate[]{
new V7_2_To_V7_4(), new V7_4_To_V7_5(), // new V6_1_To_V7_0(), new V7_0_To_V7_2(),
new V7_5_To_V7_6(), new V7_6_To_V7_7(), // new V7_2_To_V7_4(), new V7_4_To_V7_5(),
new V7_7_To_V7_8(), new V7_8_To_V7_9(), // new V7_5_To_V7_6(), new V7_6_To_V7_7(),
new V7_9_To_V8_0(), new V8_0_To_V8_1(), // new V7_7_To_V7_8(), new V7_8_To_V7_9(),
new V8_1_To_V8_2(), new V8_2_To_V8_3(), // new V7_9_To_V8_0(), new V8_0_To_V8_1(),
new V8_3_To_V8_4(), new V8_4_To_V8_5(), // new V8_1_To_V8_2(), new V8_2_To_V8_3(),
new V8_5_To_V8_6(), new V8_6_To_V8_7(), // new V8_3_To_V8_4(), new V8_4_To_V8_5(),
new V8_7_To_V8_8(), new V8_8_To_V8_9(), // new V8_5_To_V8_6(), new V8_6_To_V8_7(),
new V8_9_To_V9_0(), new V9_0_To_V9_1(), // new V8_7_To_V8_8(), new V8_8_To_V8_9(),
new V9_1_To_V9_2(), new V9_2_To_V9_3(), // new V8_9_To_V9_0(), new V9_0_To_V9_1(),
new V9_3_To_V9_4(), new V9_4_To_V9_5(), // new V9_1_To_V9_2(), new V9_2_To_V9_3(),
new V9_5_To_V9_6(), new V9_6_To_V9_7(), // new V9_3_To_V9_4(), new V9_4_To_V9_5(),
new V9_7_To_V9_8(), new V9_8_To_V9_9(), // new V9_5_To_V9_6(), new V9_6_To_V9_7(),
new V9_9_To_V10_0(), new V10_0_To_V10_1(), // new V9_7_To_V9_8(), new V9_8_To_V9_9(),
new V10_1_To_V10_2(), new V10_2_To_V10_3(), // new V9_9_To_V10_0(), new V10_0_To_V10_1(),
new V10_3_To_V10_4(), new V10_4_To_V10_5(), // new V10_1_To_V10_2(), new V10_2_To_V10_3(),
new V10_5_To_V10_6(), new V10_6_To_V10_7(), // new V10_3_To_V10_4(), new V10_4_To_V10_5(),
new V10_7_To_V10_8(), new V10_8_To_V10_9(), // new V10_5_To_V10_6(), new V10_6_To_V10_7(),
new V10_9_To_V11_0(), new V11_0_To_V11_1(), // new V10_7_To_V10_8(), new V10_8_To_V10_9(),
new V11_1_To_V11_2(), new V11_2_To_V11_3(), // new V10_9_To_V11_0(), new V11_0_To_V11_1(),
new V11_3_To_V11_4(), new V11_4_To_V11_5(), // new V11_1_To_V11_2(), new V11_2_To_V11_3(),
new V11_5_To_V11_6(), new V11_6_To_V11_7(), // new V11_3_To_V11_4(), new V11_4_To_V11_5(),
new V11_7_To_V11_8(), new V11_8_To_V11_9(), // new V11_5_To_V11_6(), new V11_6_To_V11_7(),
new V11_9_To_V12_0(), new V12_0_To_V12_1(), // new V11_7_To_V11_8(), new V11_8_To_V11_9(),
new V12_1_To_V12_2(), new V12_2_To_V12_3(), // new V11_9_To_V12_0(), new V12_0_To_V12_1(),
new V12_3_To_V12_4(), new V12_4_To_V12_5(), // new V12_1_To_V12_2(), new V12_2_To_V12_3(),
new V12_5_To_V12_6(), new V12_6_To_V12_7(), // new V12_3_To_V12_4(), new V12_4_To_V12_5(),
new V12_7_To_V12_8(), new V12_8_To_V12_9(), // new V12_5_To_V12_6(), new V12_6_To_V12_7(),
new V12_9_To_V13_0(), new V13_0_To_V13_1(), // new V12_7_To_V12_8(), new V12_8_To_V12_9(),
new V13_1_To_V13_2(), new V13_2_To_V13_3(), // new V12_9_To_V13_0(), new V13_0_To_V13_1(),
new V13_3_To_V13_4(), // new V13_1_To_V13_2(), new V13_2_To_V13_3(),
new EvoCursosInstallUpdate( 13.4, 13.5 ), // new V13_3_To_V13_4(),
new EvoCursosUpdate1( 13.5, 13.6 ), // new EvoCursosInstallUpdate( 13.4, 13.5 ),
new EvoCursosUpdate2( 13.6, 13.7 ), // new EvoCursosUpdate1( 13.5, 13.6 ),
new V13_7_To_V13_8(), // new EvoCursosUpdate2( 13.6, 13.7 ),
new SHSTUpdate8( 13.8, 13.9 ), // new V13_7_To_V13_8(),
new SHSTUpdate9( 13.9, 14.1 ), // new SHSTUpdate8( 13.8, 13.9 ),
new V14_1_To_V14_2(), new V14_2_To_V14_3(), // new SHSTUpdate9( 13.9, 14.1 ),
new SHSTUpdate11( 14.3, 14.4 ), new SHSTUpdate12( 14.4, 14.5 ), // new V14_1_To_V14_2(),
}; // new V14_2_To_V14_3(),
// // new SHSTUpdate11( 14.3, 14.4 ), new SHSTUpdate12( 14.4, 14.5 ),
// protected static Executer EXECUTER; // // OBSOLETE! do not add updates -> use SHST instead
// protected static double version = -1; // };
//
// private UpdateList() public static List<AbstractUpdate> getUpdates()
// { {
// } return SHSTUpdateList.getUpdatesOnly();
// }
// public static double getCurrentVersion()
// throws Exception
// {
// if( version < 0 )
// {
// version = getVersion();
// }
// return version;
// }
//
// public static Update [] getUpdates()
// throws Exception
// {
// if( version < 0 )
// {
// version = getVersion();
// }
// Vector<Update> validUpdates = new Vector<Update>();
// for( int n = 0; n < UPDATE_LIST.length; n++ )
// {
// if( version <= UPDATE_LIST[ n ].getStartVersion() )
// {
// validUpdates.add( UPDATE_LIST[ n ] );
// }
// }
// return validUpdates.toArray( new Update[ validUpdates.size() ] );
// }
//
// protected static double getVersion()
// throws Exception
// {
// DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
// EXECUTER = dbm.getSharedExecuter();
// try
// {
// return readVersion();
// }
// catch( Exception ex )
// {
// createVersionTable();
// }
// return readVersion();
// }
//
// protected static double readVersion()
// throws Exception
// {
// Select select =
// new Select( new String[]{ "version" },
// new String[]{ "MAX(current_version)" },
// null );
// Virtual2DArray array = EXECUTER.executeQuery( select );
// return ( ( Number ) array.get( 0, 0 ) ).doubleValue();
// }
//
// protected static void createVersionTable()
// throws Exception
// {
// com.evolute.utils.sql.Update update =
// new com.evolute.utils.sql.Update( "CREATE TABLE version( current_version float );" );
// EXECUTER.executeQuery( update );
// Insert insert =
// new Insert( "version",
// new Assignment[]{
// new Assignment( new Field( "current_version" ), new Double( 0.1 ) ) } );
// EXECUTER.executeQuery( insert );
// }
} }

Loading…
Cancel
Save