Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE castle SET siegeDate = ? WHERE id = ?");
      statement.setLong(1, _siege.getSiegeDate().getTimeInMillis() / 1000);
      statement.setInt(2, _siege.getSiegeUnit().getId());
      statement.execute();
    }
    catch(Exception e)
    {
      System.out.println("Exception: saveSiegeDate(): " + e.getMessage());
      e.printStackTrace();
View Full Code Here


    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE clanhall SET siegeDate = ? WHERE id = ?");
      statement.setLong(1, _siege.getSiegeDate().getTimeInMillis() / 1000);
      statement.setInt(2, _siege.getSiegeUnit().getId());
      statement.execute();
    }
    catch(Exception e)
    {
      System.out.println("Exception: saveSiegeDate(): " + e.getMessage());
      e.printStackTrace();
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE clan_data SET hasFortress=0 WHERE hasFortress=? LIMIT 1");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = null;
      if(clan != null)
      {
        statement = con.prepareStatement("UPDATE clan_data SET hasFortress=? WHERE clan_id=? LIMIT 1");
View Full Code Here

      if(clan != null)
      {
        statement = con.prepareStatement("UPDATE clan_data SET hasFortress=? WHERE clan_id=? LIMIT 1");
        statement.setInt(1, getId());
        statement.setInt(2, getOwnerId());
        statement.execute();
        clan.broadcastClanStatus(false, true, true);
        clan.broadcastToOnlineMembers(new PlaySound("Siege_Victory"));
      }
    }
    catch(Exception e)
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE forts SET ownDate = ? WHERE id = ?");
      statement.setInt(1, getOwnerId() != 0 ? getOwnDate() : 0);
      statement.setInt(2, getId());
      statement.execute();
    }
    catch(Exception e)
    {
      System.out.println("Exception: saveOwnDate(): " + e.getMessage());
      e.printStackTrace();
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE forts SET state = ?, castleId = ? WHERE id = ?");
      statement.setInt(1, getFortState());
      statement.setInt(2, getCastleId());
      statement.setInt(3, getId());
      statement.execute();
      statement.close();
    }
    catch(Exception e)
    {
      System.out.println("Exception: setFortState(int state, int castleId): " + e.getMessage());
View Full Code Here

    FiltredPreparedStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(Olympiad.OLYMPIAD_CALCULATE_LAST_PERIOD);
      statement.execute();
    }
    catch(Exception e)
    {
      Olympiad._log.warning("Olympiad System: Couldn't calculate last period!");
      e.printStackTrace();
View Full Code Here

    Olympiad._log.info("Olympiad: Clearing nobles table...");
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(Olympiad.OLYMPIAD_CLEANUP_NOBLES);
      statement.execute();
    }
    catch(Exception e)
    {
      Olympiad._log.warning("Olympiad System: Couldn't cleanup nobles table!");
      e.printStackTrace();
View Full Code Here

      statement.setInt(5, points_past);
      statement.setInt(6, points_past_static);
      statement.setInt(7, compDone);
      statement.setInt(8, compWin);
      statement.setInt(9, compLoose);
      statement.execute();
    }
    catch(Exception e)
    {
      Olympiad._log.warning("Olympiad System: Couldnt save noble info in db for player " + (player != null ? player.getName() : "null"));
      e.printStackTrace();
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE clan_data SET hasCastle=0 WHERE hasCastle=? LIMIT 1");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = null;
      if(clan != null)
      {
        statement = con.prepareStatement("UPDATE clan_data SET hasCastle=? WHERE clan_id=? LIMIT 1");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.