Example #1
0
  private void deleteItemCooldowns(final Player player) {
    DB.insertUpdate(
        DELETE_QUERY,
        new IUStH() {

          @Override
          public void handleInsertUpdate(PreparedStatement stmt) throws SQLException {
            stmt.setInt(1, player.getObjectId());
            stmt.execute();
          }
        });
  }
Example #2
0
  /** {@inheritDoc} */
  @Override
  public void storeLegionMember(final int playerId, final LegionMember legionMember) {
    DB.insertUpdate(
        UPDATE_LEGIONMEMBER_QUERY,
        new IUStH() {

          @Override
          public void handleInsertUpdate(PreparedStatement stmt) throws SQLException {
            stmt.setString(1, legionMember.getNickname());
            stmt.setString(2, legionMember.getRank().toString());
            stmt.setString(3, legionMember.getSelfIntro());
            stmt.setInt(4, playerId);
            stmt.execute();
          }
        });
  }
Example #3
0
  /** {@inheritDoc} */
  @Override
  public boolean saveNewLegionMember(final LegionMember legionMember) {
    boolean success =
        DB.insertUpdate(
            INSERT_LEGIONMEMBER_QUERY,
            new IUStH() {

              @Override
              public void handleInsertUpdate(PreparedStatement preparedStatement)
                  throws SQLException {
                preparedStatement.setInt(1, legionMember.getLegion().getLegionId());
                preparedStatement.setInt(2, legionMember.getObjectId());
                preparedStatement.setString(3, legionMember.getRank().toString());
                preparedStatement.execute();
              }
            });
    return success;
  }