MCPcopy Create free account
hub / github.com/OWASP/SecurityShepherd / updatePlayerClass

Method updatePlayerClass

src/main/java/dbProcs/Setter.java:691–716  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 3

verifyTestUserMethod · 0.95
testUpdatePlayerClassMethod · 0.95
doPostMethod · 0.95

Calls 2

getCoreConnectionMethod · 0.95
closeConnectionMethod · 0.95

Tested by 2

verifyTestUserMethod · 0.76
testUpdatePlayerClassMethod · 0.76