Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM `character_bookmarks` WHERE char_Id=?");
      statement.setInt(1, charObjId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("INSERT INTO `character_bookmarks` VALUES(?,?,?,?,?,?,?,?);");
      int slotId = 0;
      for(BookMark bookmark : elementData)
      {
View Full Code Here


        statement.setString(4, bookmark.getAcronym());
        statement.setInt(5, bookmark.getIcon());
        statement.setInt(6, bookmark.x);
        statement.setInt(7, bookmark.y);
        statement.setInt(8, bookmark.z);
        statement.execute();
      }
    }
    catch(Exception e)
    {
      _log.warning("store: could not store char[" + charObjId + "] bookmarks: " + e);
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM siege_doorupgrade WHERE doorId IN (SELECT id FROM siege_door WHERE unitId=?)");
      statement.setInt(1, getId());
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: removeDoorUpgrade(): " + e);
    }
View Full Code Here

      statement = con.prepareStatement("Delete From siege_guards Where npcId = ? And x = ? AND y = ? AND z = ? AND isHired = 1");
      statement.setInt(1, npcId);
      statement.setInt(2, loc.x);
      statement.setInt(3, loc.y);
      statement.setInt(4, loc.z);
      statement.execute();
    }
    catch(Exception e1)
    {
      _log.warning("Error deleting hired siege guard at " + loc.toString() + ":" + e1);
    }
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("Delete From siege_guards Where unitId = ? And isHired = 1");
      statement.setInt(1, unitId);
      statement.execute();
    }
    catch(Exception e1)
    {
      _log.warning("Error deleting hired siege guard for unit " + unitId + ":" + e1);
    }
View Full Code Here

      else
      {
        statement.setInt(7, 600);
      }
      statement.setInt(8, isHire);
      statement.execute();
    }
    catch(Exception e1)
    {
      _log.warning("Error adding siege guard for unit " + getSiegeUnit().getName() + ":" + e1);
    }
View Full Code Here

          statement = con.prepareStatement("INSERT INTO `character_hennas` (char_obj_id, symbol_id, slot, class_index) VALUES (?,?,?,?)");
          statement.setInt(1, getObjectId());
          statement.setInt(2, henna.getSymbolId());
          statement.setInt(3, i + 1);
          statement.setInt(4, getActiveClassId());
          statement.execute();
        }
        catch(Exception e)
        {
          _log.warning("could not save char henna: " + e);
        }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE characters SET clanid=0,title='',pledge_type=0,pledge_rank=0,lvl_joined_academy=0,apprentice=0,leaveclan=? WHERE clanid=?");
      statement.setLong(1, curtime / 1000);
      statement.setInt(2, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?");
      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
View Full Code Here

      statement.setInt(2, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM clan_data WHERE clan_id=?");
      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM clan_subpledges WHERE clan_id=?");
      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
View Full Code Here

      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM clan_subpledges WHERE clan_id=?");
      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
      statement = con.prepareStatement("DELETE FROM clan_privs WHERE clan_id=?");
      statement.setInt(1, clanId);
      statement.execute();
      DatabaseUtils.closeStatement(statement);
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.