Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.execute()


    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("DELETE FROM auction WHERE id=?");
      statement.setInt(1, _auction.getId());
      statement.execute();
    }
    catch(Exception e)
    {
      _log.log(Level.SEVERE, "Exception: Auction.deleteFromDB(): " + e.getMessage(), e);
    }
View Full Code Here


    try
    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement(CASTLE_MANOR_DELETE_PROCURE);
      statement.setInt(1, getId());
      statement.execute();
      statement.close();
      if(_procure != null)
      {
        int count = 0;
        String query = "INSERT INTO castle_manor_procure 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(_procureNext != 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_PROCURE_PERIOD);
      statement.setInt(1, getId());
      statement.setInt(2, period);
      statement.execute();
      statement.close();
      GArray<CropProcure> proc = null;
      proc = getCropProcure(period);
      if(proc != 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 = con.prepareStatement(CASTLE_UPDATE_CROP);
      statement.setLong(1, amount);
      statement.setInt(2, cropId);
      statement.setInt(3, getId());
      statement.setInt(4, period);
      statement.execute();
      statement.close();
    }
    catch(Exception e)
    {
      _log.info("Error adding crop data for castle " + getName() + ": " + e.getMessage());
View Full Code Here

      statement = con.prepareStatement(CASTLE_UPDATE_SEED);
      statement.setLong(1, amount);
      statement.setInt(2, seedId);
      statement.setInt(3, getId());
      statement.setInt(4, period);
      statement.execute();
      statement.close();
    }
    catch(Exception e)
    {
      _log.info("Error adding seed production data for castle " + getName() + ": " + e.getMessage());
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE castle 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 castle SET flags = ? WHERE id = ?");
      statement.setString(1, flags);
      statement.setInt(2, getId());
      statement.execute();
    }
    catch(Exception e)
    {
      System.out.println("Exception: saveFlags(): " + e.getMessage());
      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.