MCPcopy Index your code
hub / github.com/aws-samples/eb-java-scorekeep / saveMove

Method saveMove

src/main/java/scorekeep/MoveModel.java:21–32  ·  view source on GitHub ↗
(Move move)

Source from the content-addressed store, hash-verified

19 private final GameModel gameModel = new GameModel();
20
21 public void saveMove(Move move) throws SessionNotFoundException, GameNotFoundException {
22 // check session
23 String sessionId = move.getSession();
24 String gameId = move.getGame();
25 if (sessionModel.loadSession(sessionId) == null ) {
26 throw new SessionNotFoundException(sessionId);
27 }
28 if (gameModel.loadGame(gameId) == null ) {
29 throw new GameNotFoundException(gameId);
30 }
31 mapper.save(move);
32 }
33
34 public Move loadMove(String moveId) throws MoveNotFoundException {
35 Move move = mapper.load(Move.class, moveId);

Callers 1

newMoveMethod · 0.80

Calls 4

loadSessionMethod · 0.80
loadGameMethod · 0.80
getSessionMethod · 0.45
getGameMethod · 0.45

Tested by

no test coverage detected