|
|
|
@ -130,4 +130,30 @@ public class LembretesDataProvider
|
|
|
|
new Field( "marcacao_trabalhador_id" ).isEqual( marcacaoID ) );
|
|
|
|
new Field( "marcacao_trabalhador_id" ).isEqual( marcacaoID ) );
|
|
|
|
EXECUTER.executeQuery( delete );
|
|
|
|
EXECUTER.executeQuery( delete );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int countLembretesByTipo( Integer tipoID )
|
|
|
|
|
|
|
|
throws Exception
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Select select =
|
|
|
|
|
|
|
|
new Select( new String[]{ "lembretes" },
|
|
|
|
|
|
|
|
new String[]{ "COUNT(*)" },
|
|
|
|
|
|
|
|
new Field( "tipo_id" ).isEqual( tipoID ).and(
|
|
|
|
|
|
|
|
new Field( "data" ).isLessOrEqual( new Date() ) ) );
|
|
|
|
|
|
|
|
Virtual2DArray array = EXECUTER.executeQuery( select );
|
|
|
|
|
|
|
|
if( array.columnLength() == 0 || array.get( 0, 0 ) == null )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ( ( Number ) array.get( 0, 0 ) ).intValue();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void getLembretesByTipo( Integer tipoID )
|
|
|
|
|
|
|
|
throws Exception
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|