Esempio n. 1
0
 // Get username
 public String getUsername(int userId) {
   logManager.logInfo("Entering 'getUsername(int userId)' method");
   String username = "";
   try {
     sqlString = queryBuilder.sqlSelectUsername(userId);
     resultset = executeQuery.executeSelect(sqlString);
     if (resultset.next()) {
       username = resultset.getString("usr");
     }
   } catch (Exception exception) {
     logManager.logError("Exception was thrown and caught in 'getUsername(int userId)' method");
   }
   logManager.logInfo("Exiting 'getUsername(int userId)' method");
   return username;
 }