Ejemplo n.º 1
0
 public boolean update(Team team) {
   try {
     this.connect
         .createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)
         .executeUpdate(
             "UPDATE teams SET te_points =" + team.getPoints() + "WHERE te_id = " + team.getID());
   } catch (SQLException e) {
     e.printStackTrace();
     return false;
   }
   return true;
 }
Ejemplo n.º 2
0
 public boolean create(Team team) {
   try {
     this.connect
         .createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)
         .executeUpdate(
             "INSERT INTO teams VALUES (" + team.getID() + "," + team.getPoints() + ")");
   } catch (SQLException e) {
     e.printStackTrace();
     return false;
   }
   return true;
 }