コード例 #1
0
ファイル: DbUtils.java プロジェクト: miagosen/market
  public void delete(Class<?> entityType, WhereBuilder whereBuilder) throws DbException {
    if (!tableIsExist(entityType)) return;
    try {
      beginTransaction();

      execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entityType, whereBuilder));

      setTransactionSuccessful();
    } finally {
      endTransaction();
    }
  }
コード例 #2
0
ファイル: DbUtils.java プロジェクト: miagosen/market
  public void delete(Object entity) throws DbException {
    if (!tableIsExist(entity.getClass())) return;
    try {
      beginTransaction();

      execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entity));

      setTransactionSuccessful();
    } finally {
      endTransaction();
    }
  }
コード例 #3
0
ファイル: DbUtils.java プロジェクト: miagosen/market
  public void deleteAll(List<?> entities) throws DbException {
    if (entities == null || entities.size() == 0 || !tableIsExist(entities.get(0).getClass()))
      return;
    try {
      beginTransaction();

      for (Object entity : entities) {
        execNonQuery(SqlInfoBuilder.buildDeleteSqlInfo(this, entity));
      }

      setTransactionSuccessful();
    } finally {
      endTransaction();
    }
  }