Package marauroa.server.db

Examples of marauroa.server.db.DBTransaction


   * @param max maximum number of returned characters
   * @param ascending sort ascending or descending
   * @return list of character names
   */
  public List<String> getCharactersByFametype(String fametype, int max, boolean ascending) {
    DBTransaction transaction = TransactionPool.get().beginWork();
    try {
      List<String> res = getCharactersByFametype(transaction, fametype, max, ascending);
      TransactionPool.get().commit(transaction);
      return res;
    } catch (SQLException e) {
View Full Code Here


   * @param charname
   * return details as param and count
   * @throws SQLException
   */
  public Map<String, Map<String, Integer>> getPendingAchievementDetails(String charname) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    Map<String, Map<String, Integer>> map = getPendingAchievementDetails(transaction, charname);
    TransactionPool.get().commit(transaction);
    return map;
  }
View Full Code Here

   *
   * @param charname
   * @throws SQLException
   */
  public void deletePendingAchievementDetails(String charname) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    deletePendingAchievementDetails(transaction, charname);
    TransactionPool.get().commit(transaction);
  }
View Full Code Here

   * @param achievementId
   * @param playerName
   * @throws SQLException
   */
  public void saveReachedAchievement(Integer achievementId, String playerName) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    saveReachedAchievement(transaction, achievementId, playerName);
    TransactionPool.get().commit(transaction);
  }
View Full Code Here

   * @param achievement Achievement to save
   * @return the id of the stored achievement
   * @throws SQLException
   */
  public int saveAchievement(Achievement achievement) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    int achievementId = saveAchievement(transaction, achievement);
    TransactionPool.get().commit(transaction);
    return achievementId;
  }
View Full Code Here

   * @param id
   * @param achievement
   * @throws SQLException
   */
  public void updateAchievement(Integer id, Achievement achievement) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    updateAchievement(transaction, id, achievement);
    TransactionPool.get().commit(transaction);
  }
View Full Code Here

   *
   * @return map with key identifier string and value database id
   * @throws SQLException
   */
  public Map<String, Integer> loadIdentifierIdPairs() throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    Map<String, Integer> map = loadIdentifierIdPairs(transaction);
    TransactionPool.get().commit(transaction);
    return map;
  }
View Full Code Here

   * @param playerName
   * @return set identifiers of achievements reached by playerName
   * @throws SQLException
   */
  public Set<String> loadAllReachedAchievementsOfPlayer(String playerName) throws SQLException {
    DBTransaction transaction = TransactionPool.get().beginWork();
    Set<String> set = loadAllReachedAchievementsOfPlayer(transaction, playerName);
    TransactionPool.get().commit(transaction);
    return set;
  }
View Full Code Here

   *
   * @param killed killed entity
   * @param killer killer
   */
  public void logKill(final Entity killed, final Entity killer) {
    DBTransaction transaction = TransactionPool.get().beginWork();
    try {
      logKill(transaction, killed, killer);
      TransactionPool.get().commit(transaction);
    } catch (SQLException e) {
      logger.error(e, e);
View Full Code Here

   * @param charname  name of character
   * @param address   ip-address
   * @param cid       cid
   */
  public void log(String charname, String address, String cid) {
    DBTransaction transaction = TransactionPool.get().beginWork();
    try {
      log(transaction, charname, address, cid);
      TransactionPool.get().commit(transaction);
    } catch (SQLException e) {
      TransactionPool.get().rollback(transaction);
View Full Code Here

TOP

Related Classes of marauroa.server.db.DBTransaction

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.