Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


      if(clan != null)
      {
        statement = con.prepareStatement("UPDATE clan_data SET hasCastle=? 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 castle set treasury = ? where id = ?");
      statement.setLong(1, getTreasury());
      statement.setInt(2, getId());
      statement.execute();
      statement.close();
      DatabaseUtils.closeDatabaseCS(con, statement);
    }
    catch(Exception e)
    {
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE castle SET taxPercent = ? WHERE id = ? LIMIT 1");
      statement.setInt(1, taxPercent);
      statement.setInt(2, getId());
      statement.execute();
    }
    catch(Exception e)
    {
    }
    finally
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(CASTLE_MANOR_DELETE_PRODUCTION);
      statement.setInt(1, getId());
      statement.execute();
      statement.close();
      if(_production != null)
      {
        int count = 0;
        String query = "INSERT INTO castle_manor_production VALUES ";
View Full Code Here

          for(int i = 1; i < values.length; i++)
          {
            query += "," + values[i];
          }
          statement = con.prepareStatement(query);
          statement.execute();
          statement.close();
        }
      }
      if(_productionNext != null)
      {
View Full Code Here

          for(int i = 1; i < values.length; i++)
          {
            query += "," + values[i];
          }
          statement = con.prepareStatement(query);
          statement.execute();
          statement.close();
        }
      }
      DatabaseUtils.closeDatabaseCS(con, statement);
    }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(CASTLE_MANOR_DELETE_PRODUCTION_PERIOD);
      statement.setInt(1, getId());
      statement.setInt(2, period);
      statement.execute();
      statement.close();
      GArray<SeedProduction> prod = null;
      prod = getSeedProduction(period);
      if(prod != null)
      {
View Full Code Here

          for(int i = 1; i < values.length; i++)
          {
            query += "," + values[i];
          }
          statement = con.prepareStatement(query);
          statement.execute();
          statement.close();
        }
      }
      DatabaseUtils.closeDatabaseCS(con, statement);
    }
View Full Code Here

        {
          statement.setInt(1, heroId);
          statement.setInt(2, hero.getInteger(COUNT));
          statement.setInt(3, hero.getInteger(PLAYED));
          statement.setInt(4, hero.getInteger(ACTIVE));
          statement.execute();
          if(_completeHeroes != null && !_completeHeroes.containsKey(heroId))
          {
            HeroSetClanAndAlly(heroId, hero);
            _completeHeroes.put(heroId, hero);
          }
View Full Code Here

    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM siege_clans WHERE unit_id=?");
      statement.setInt(1, unit_id);
      statement.execute();
    }
    catch(Exception e)
    {
      _log.warning("Exception: clearSiegeClan(): " + 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.