private boolean saveAll(UserScore userScore) throws SQLException {
        PreparedStatement insertUserStmt = null;
        PreparedStatement selectStmt = null;
        PreparedStatement insertScoreStmt = null;

        int result = 0;
        try {
            int playerId = getPlayerById(userScore.getUserName());
            if (playerId == 0) {

                insertUserStmt = getConnection().prepareStatement("insert into player(username) values(?)");
                insertUserStmt.setString(1, userScore.getUserName());
                result = insertUserStmt.executeUpdate();
                if (result == 0) {
                    return false;
                }
                selectStmt = getConnection().prepareStatement("select last_insert_rowid()");
                playerId = selectStmt.executeQuery().getInt(1);
            }
            insertScoreStmt = getConnection().prepareStatement("insert into score(player_id, score, play_date) values(?,?,?)");
            insertScoreStmt.setInt(1, playerId);
            insertScoreStmt.setInt(2, userScore.getScore());
            insertScoreStmt.setLong(3, new Date().getTime());

            result = insertScoreStmt.executeUpdate();

            if (result == 0) {
                return false;
            }

            return true;

        } finally {
            if (selectStmt != null) {
                selectStmt.close();
            }
            if (insertScoreStmt != null) {
                insertScoreStmt.close();
            }
            if (insertUserStmt != null) {
                insertUserStmt.close();
            }

        }
    }