Package games.stendhal.server.core.engine.db

Examples of games.stendhal.server.core.engine.db.CharacterIterator


  public void initRPClasses() {
    StendhalRPWorld.get();
  }
   
  private void loadAndUpdatePlayers(DBTransaction transaction) throws SQLException, IOException {
      final Iterator<RPObject> i = new CharacterIterator(transaction, true);
      while (i.hasNext()) {
        final RPObject next = i.next();
        System.out.println(next);
        final Player p = createPlayerFromRPO(next);
        savePlayer(transaction, p);
      }
    }
View Full Code Here


  private void dump(DBTransaction transaction) throws Exception {
    final String query = "insert into age(datewhen, charname, age, version) values(?, ?, ?, ?)";
    date = new java.sql.Date(new java.util.Date().getTime());
    PreparedStatement ps = transaction.prepareStatement(query, null);

    for (final RPObject object : new CharacterIterator(transaction, false)) {
      final String name = object.get("name");
      // System.out.println(id + " " + name);
      logPlayer(ps, name, object);
    }
View Full Code Here

   */
  private void dump(DBTransaction transaction) throws Exception {
    final String query = "insert into items(datewhen, charname, slotname, itemid, itemname, amount) values(?, ?, ?, ?, ?, ?)";
    date = new java.sql.Date(new java.util.Date().getTime());

    for (final RPObject object : new CharacterIterator(transaction, false)) {
      if (object == null) {
        continue;
      }

      DBTransaction writeTransaction = TransactionPool.get().beginWork();
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.db.CharacterIterator

Copyright © 2018 www.massapicom. 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.