|
|
|
|
@ -463,4 +463,60 @@ public class FichaDataProvider extends MetaProvider implements SearchExecuter {
|
|
|
|
|
}
|
|
|
|
|
return new Integer( ( ( Number ) array.get( 0, 0 ) ).intValue() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDObject[] getAllEmpresasDeleted()
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select = new Select( new String[]{ T_EMPRESAS },
|
|
|
|
|
new String[]{ ID, DESIGNACAO_SOCIAL },
|
|
|
|
|
new Field( INACTIVO ).isEqual( "y" ),
|
|
|
|
|
new String[]{ "lower(" + DESIGNACAO_SOCIAL + ")" }, null );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
IDObject empresas[] = new IDObject[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < array.columnLength(); n++ )
|
|
|
|
|
{
|
|
|
|
|
Integer id = new Integer( ((Number)array.get( n, 0 )).intValue() );
|
|
|
|
|
String designacao = ( String ) array.get( n, 1 );
|
|
|
|
|
empresas[ n ] = new MappableObject( id, designacao );
|
|
|
|
|
}
|
|
|
|
|
return empresas;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDObject []getAllEstabelecimentosDeletedForEmpresa( Integer empresaID )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select = new Select( new String[]{ T_ESTABELECIMENTOS },
|
|
|
|
|
new String[]{ ID, NOME },
|
|
|
|
|
new Field( EMPRESA_ID ).isEqual( empresaID ).and(
|
|
|
|
|
new Field( INACTIVO ).isEqual( "y" ) ),
|
|
|
|
|
new String[]{ "lower(" + NOME + ")" }, null );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
IDObject objects[] = new IDObject[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < objects.length; n++ )
|
|
|
|
|
{
|
|
|
|
|
Integer id = new Integer( ((Number)array.get( n, 0 )).intValue() );
|
|
|
|
|
String desc = (String)array.get( n, 1 );
|
|
|
|
|
objects[ n ] = new MappableObject( id, desc );
|
|
|
|
|
}
|
|
|
|
|
return objects;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IDObject []getAllTrabalhadoresDeletedForEstabelecimento( Integer estabelecimentoID )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
Select select = new Select( new String[]{ T_TRABALHADORES },
|
|
|
|
|
new String[]{ ID, NOME },
|
|
|
|
|
new Field( ESTABELECIMENTO_ID ).isEqual( estabelecimentoID ).and(
|
|
|
|
|
new Field( INACTIVO ).isEqual( "y" ) ),
|
|
|
|
|
new String[]{ "lower(" + NOME + ")" }, null );
|
|
|
|
|
Virtual2DArray array = executer.executeQuery( select );
|
|
|
|
|
IDObject objects[] = new IDObject[ array.columnLength() ];
|
|
|
|
|
for( int n = 0; n < objects.length; n++ )
|
|
|
|
|
{
|
|
|
|
|
Integer id = new Integer( ((Number)array.get( n, 0 )).intValue() );
|
|
|
|
|
String desc = (String)array.get( n, 1 );
|
|
|
|
|
objects[ n ] = new MappableObject( id, desc );
|
|
|
|
|
}
|
|
|
|
|
return objects;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|