Updates a PLAYER's class identifier @param ApplicationRoot The current running context of the application @param classId New class to be assigned to @param playerId Player to be assigned to new class @return The userName that was updated
(String ApplicationRoot, String classId, String playerId)
| 689 | * @return The userName that was updated |
| 690 | */ |
| 691 | public static String updatePlayerClass (String ApplicationRoot, String classId, String playerId) |
| 692 | { |
| 693 | log.debug("*** Setter.updatePlayerClass ***"); |
| 694 | |
| 695 | String result = null; |
| 696 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 697 | try |
| 698 | { |
| 699 | log.debug("Preparing playerUpdateClass call"); |
| 700 | CallableStatement callstmnt = conn.prepareCall("call playerUpdateClass(?, ?)"); |
| 701 | callstmnt.setString(1, playerId); |
| 702 | callstmnt.setString(2, classId); |
| 703 | log.debug("Executing playerUpdateClass"); |
| 704 | ResultSet resultSet = callstmnt.executeQuery(); |
| 705 | resultSet.next(); |
| 706 | result = resultSet.getString(1); |
| 707 | } |
| 708 | catch(SQLException e) |
| 709 | { |
| 710 | log.error("playerUpdateClass Failure: " + e.toString()); |
| 711 | result = null; |
| 712 | } |
| 713 | Database.closeConnection(conn); |
| 714 | log.debug("*** END updatePlayerClass ***"); |
| 715 | return result; |
| 716 | } |
| 717 | |
| 718 | /** |
| 719 | * Updates a PLAYER's class identifier to null |