Package net.bnubot.bot.database

Examples of net.bnubot.bot.database.AccountResultSet


            unanswered = 0;
            String extra = "!";

            try {
              if(d != null) {
                AccountResultSet rsAccount = d.getAccount(answerUser);
                if(rsAccount.next()) {
                  long score = rsAccount.getTriviaCorrect();
                  score++;
                  rsAccount.setTriviaCorrect(score);
                  rsAccount.updateRow();
                  extra += " Your score is " + score + ".";
                }
                d.close(rsAccount);
              }
            } catch(Exception e) {
View Full Code Here


  }

  private void rebuildAccounts() {
    try {
      lm.clear();
      AccountResultSet rsAccounts = d.getAccounts();
      while(rsAccounts.next()) {
        String title = rsAccounts.getName();
        title += " (";
        title += rsAccounts.getAccess();
        title += ")";
        lm.addElement(title);
      }
      d.close(rsAccounts);
    } catch (SQLException e) {
View Full Code Here

      return shortLogonName;
   
    if(shortPrettyName == null) {
      shortPrettyName = shortLogonName;
      try {
        AccountResultSet rsAccount = d.getAccount(this);
        if(rsAccount.next()) {
          String account = rsAccount.getName();
         
          if(account != null)
            shortPrettyName = account;

          long access = rsAccount.getAccess();
          RankResultSet rsRank = d.getRank(access);
          if(rsRank.next()) {
            String prefix = rsRank.getShortPrefix();
            if(prefix == null)
              prefix = rsRank.getPrefix();
View Full Code Here

      return shortLogonName;

    if(prettyName == null) {
      prettyName = shortLogonName;
      try {
        AccountResultSet rsAccount = d.getAccount(this);
        if(rsAccount.next()) {
          String account = rsAccount.getName();
         
          if(account != null)
            prettyName = account + " (" + prettyName + ")";

          long access = rsAccount.getAccess();
          RankResultSet rsRank = d.getRank(access);
          if(rsRank.next()) {
            String prefix = rsRank.getPrefix();
            if(prefix != null)
              prettyName = prefix + " " + prettyName;
View Full Code Here

TOP

Related Classes of net.bnubot.bot.database.AccountResultSet

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.