Esempio n. 1
0
  @Override
  public RotinaPECS recuperarEntrada(long rotinaId, long pecsId) {

    StringBuffer buffer = new StringBuffer();
    buffer.append("SELECT * FROM ");
    buffer.append(Table.ROTINA_PECS.getName());
    buffer.append(" WHERE ");
    buffer.append(RotinaPECS.ID_PECS);
    buffer.append("=");
    buffer.append(pecsId);
    buffer.append(" AND ");
    buffer.append(RotinaPECS.ID_ROTINA);
    buffer.append("=");
    buffer.append(rotinaId);
    buffer.append(";");

    Cursor cursor = executeSelectQuery(buffer.toString());
    List<RotinaPECS> list = parseCursorToList(cursor);

    if (list != null && list.size() > 0) {
      return list.get(0);
    }

    return null;
  }
Esempio n. 2
0
  @Override
  public void removerPorRotina(long rotinaId) {

    StringBuffer buffer = new StringBuffer();
    buffer.append("DELETE FROM ");
    buffer.append(Table.ROTINA_PECS.getName());
    buffer.append(" WHERE ");
    buffer.append(RotinaPECS.ID_ROTINA);
    buffer.append("=");
    buffer.append(rotinaId);
    buffer.append(";");

    executeSQL(buffer.toString());
  }
Esempio n. 3
0
 public RotinasPECSDAO() {
   super(Table.ROTINA_PECS.getName());
 }