Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM residence_functions WHERE id=? AND type=?");
      statement.setInt(1, getId());
      statement.setInt(2, type);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: removeFunctions(int type): " + e);
    }
View Full Code Here


      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE clanhall SET ownerId=?, lease=?, inDebt=0 WHERE id=?");
      statement.setInt(1, getOwnerId());
      statement.setLong(2, getLease());
      statement.setInt(3, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE clan_data SET hasHideout=0 WHERE hasHideout=?");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
View Full Code Here

      statement.setInt(3, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE clan_data SET hasHideout=0 WHERE hasHideout=?");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE clan_data SET hasHideout=? WHERE clan_id=?");
      statement.setInt(1, getId());
      statement.setInt(2, getOwnerId());
      statement.execute();
View Full Code Here

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

      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("UPDATE clan_data SET hasHideout=? WHERE clan_id=?");
      statement.setInt(1, getId());
      statement.setInt(2, getOwnerId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM residence_functions WHERE id=?");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
View Full Code Here

      statement.setInt(2, getOwnerId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM residence_functions WHERE id=?");
      statement.setInt(1, getId());
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      // Announce to clan memebers
      if(clan != null)
      {
        clan.setHasHideout(getId()); // Set has hideout flag for new owner
View Full Code Here

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

        statement.setString(4, "NPC Clan");
        statement.setString(5, getName());
        statement.setLong(6, getPrice());
        statement.setLong(7, 0);
        statement.setLong(8, endDate.getTimeInMillis());
        statement.execute();
        DatabaseUtils.closeStatement(statement);
        //выставляем сразу на аукцион
        AuctionManager.getInstance().getAuctions().add(new Auction(getId()));
      }
    }
View Full Code Here

      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("REPLACE INTO siege_territory_members (obj_Id, side, type) VALUES (?, ?, ?)");
      statement.setInt(1, obj_Id);
      statement.setInt(2, side);
      statement.setInt(3, type);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: saveSiegeMember: " + e);
      e.printStackTrace();
View Full Code Here

    FiltredPreparedStatement statement = null;
    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM siege_territory_members");
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: clearSiegeMembers(): " + e);
      e.printStackTrace();
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.