{"action":"created","comment":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/167750071","pull_request_review_id":96013228,"id":167750071,"diff_hunk":"@@ -0,0 +1,22 @@\n+package games.strategy.engine.lobby.server.db;\n+\n+import java.sql.SQLException;\n+import java.time.Instant;\n+\n+import games.strategy.engine.lobby.server.User;\n+\n+/**\n+ * Data access object for the access log table.\n+ */\n+public interface AccessLogDao {\n+  /**\n+   * Inserts a new record in the access log table.\n+   *\n+   * @param instant The instant of the access.\n+   * @param user The user who accessed the lobby.\n+   * @param authenticated {@code true} if the access was authenticated; otherwise {@code false}.\n+   *\n+   * @throws SQLException If an error occurs while logging the access.\n+   */\n+  void insert(Instant instant, User user, boolean authenticated) throws SQLException;","path":"src/main/java/games/strategy/engine/lobby/server/db/AccessLogDao.java","position":21,"original_position":21,"commit_id":"4880f0ed85587732ebbbf93160bb1d26b4670e68","original_commit_id":"7f61494a229019256d3fe72d35155b2288c4a3aa","user":{"login":"DanVanAtta","id":12397753,"avatar_url":"https://avatars2.githubusercontent.com/u/12397753?v=4","gravatar_id":"","url":"https://api.github.com/users/DanVanAtta","html_url":"https://github.com/DanVanAtta","followers_url":"https://api.github.com/users/DanVanAtta/followers","following_url":"https://api.github.com/users/DanVanAtta/following{/other_user}","gists_url":"https://api.github.com/users/DanVanAtta/gists{/gist_id}","starred_url":"https://api.github.com/users/DanVanAtta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanVanAtta/subscriptions","organizations_url":"https://api.github.com/users/DanVanAtta/orgs","repos_url":"https://api.github.com/users/DanVanAtta/repos","events_url":"https://api.github.com/users/DanVanAtta/events{/privacy}","received_events_url":"https://api.github.com/users/DanVanAtta/received_events","type":"User","site_admin":false},"body":"I'd sugggest passing enum value instead of `boolean`, I see the caller does the comparison, we could have DAO take care of that for us and accept the enum value directly. Specifically, suggestion is to replace the type of the 3rd parameter to enum instead of boolean","created_at":"2018-02-13T03:02:19Z","updated_at":"2018-02-13T03:08:56Z","html_url":"https://github.com/triplea-game/triplea/pull/2977#discussion_r167750071","pull_request_url":"https://api.github.com/repos/triplea-game/triplea/pulls/2977","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments/167750071"},"html":{"href":"https://github.com/triplea-game/triplea/pull/2977#discussion_r167750071"},"pull_request":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2977"}}},"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/2977","id":168417752,"html_url":"https://github.com/triplea-game/triplea/pull/2977","diff_url":"https://github.com/triplea-game/triplea/pull/2977.diff","patch_url":"https://github.com/triplea-game/triplea/pull/2977.patch","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/2977","number":2977,"state":"open","locked":false,"title":"Record lobby login metrics","user":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"body":"Addresses the lobby feature request discussed [here](https://forums.triplea-game.org/topic/554/recording-lobby-statistics/6).\r\n\r\n#### Functional changes\r\n\r\nAdds a new table to the lobby database, `login_metrics`, which stores a count of anonymous and registered logins per day.  The counts are incremented upon a successful lobby login.\r\n\r\n#### Refactoring changes\r\n\r\n* Changed `AccessLog` to an interface to enable unit testing.\r\n* Added `@Nullable` annotations where appropriate in the files I touched.\r\n* Some minor cleanups (e.g. variable and method renames) in `LobbyLoginValidator`.\r\n\r\n#### Testing\r\n\r\nIn addition to the new unit and integration tests, I did a manual system test with a local lobby to verify the `login_metrics` table was updated as expected.  Particularly in the case where the date in the local timezone != the date in UTC (the date in the table should _always_ be UTC).\r\n\r\n#### Notes\r\n\r\n`LobbyLoginValidatorTest` had almost all of its lines re-indented, so reviewing with whitespace changes ignored is highly recommended.","created_at":"2018-02-10T19:49:58Z","updated_at":"2018-02-13T03:08:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f8b695487233b700b561a39ef4d7f2041f805c5","assignee":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"assignees":[{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":834327218,"url":"https://api.github.com/repos/triplea-game/triplea/labels/PR:%20%3CWIP%3E","name":"PR: <WIP>","color":"a3ffe8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/triplea-game/triplea/pulls/2977/commits","review_comments_url":"https://api.github.com/repos/triplea-game/triplea/pulls/2977/comments","review_comment_url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/2977/comments","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/4880f0ed85587732ebbbf93160bb1d26b4670e68","head":{"label":"ssoloff:record-lobby-login-metrics","ref":"record-lobby-login-metrics","sha":"4880f0ed85587732ebbbf93160bb1d26b4670e68","user":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"repo":{"id":76764435,"name":"triplea-game-triplea","full_name":"ssoloff/triplea-game-triplea","owner":{"login":"ssoloff","id":4826349,"avatar_url":"https://avatars2.githubusercontent.com/u/4826349?v=4","gravatar_id":"","url":"https://api.github.com/users/ssoloff","html_url":"https://github.com/ssoloff","followers_url":"https://api.github.com/users/ssoloff/followers","following_url":"https://api.github.com/users/ssoloff/following{/other_user}","gists_url":"https://api.github.com/users/ssoloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ssoloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssoloff/subscriptions","organizations_url":"https://api.github.com/users/ssoloff/orgs","repos_url":"https://api.github.com/users/ssoloff/repos","events_url":"https://api.github.com/users/ssoloff/events{/privacy}","received_events_url":"https://api.github.com/users/ssoloff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ssoloff/triplea-game-triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":true,"url":"https://api.github.com/repos/ssoloff/triplea-game-triplea","forks_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/forks","keys_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/teams","hooks_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/hooks","issue_events_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues/events{/number}","events_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/events","assignees_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/assignees{/user}","branches_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/branches{/branch}","tags_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/tags","blobs_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/languages","stargazers_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/stargazers","contributors_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/contributors","subscribers_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/subscribers","subscription_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/subscription","commits_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/contents/{+path}","compare_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/merges","archive_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/downloads","issues_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/issues{/number}","pulls_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/labels{/name}","releases_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/releases{/id}","deployments_url":"https://api.github.com/repos/ssoloff/triplea-game-triplea/deployments","created_at":"2016-12-18T05:24:33Z","updated_at":"2017-06-02T01:15:48Z","pushed_at":"2018-02-13T01:56:14Z","git_url":"git://github.com/ssoloff/triplea-game-triplea.git","ssh_url":"git@github.com:ssoloff/triplea-game-triplea.git","clone_url":"https://github.com/ssoloff/triplea-game-triplea.git","svn_url":"https://github.com/ssoloff/triplea-game-triplea","homepage":null,"size":735567,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"triplea-game:master","ref":"master","sha":"1ffc766fd15bb9b74caad977e0aab917e3487876","user":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"repo":{"id":39766308,"name":"triplea","full_name":"triplea-game/triplea","owner":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/triplea-game/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":false,"url":"https://api.github.com/repos/triplea-game/triplea","forks_url":"https://api.github.com/repos/triplea-game/triplea/forks","keys_url":"https://api.github.com/repos/triplea-game/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplea-game/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplea-game/triplea/teams","hooks_url":"https://api.github.com/repos/triplea-game/triplea/hooks","issue_events_url":"https://api.github.com/repos/triplea-game/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/triplea-game/triplea/events","assignees_url":"https://api.github.com/repos/triplea-game/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/triplea-game/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/triplea-game/triplea/tags","blobs_url":"https://api.github.com/repos/triplea-game/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplea-game/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplea-game/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplea-game/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/triplea-game/triplea/languages","stargazers_url":"https://api.github.com/repos/triplea-game/triplea/stargazers","contributors_url":"https://api.github.com/repos/triplea-game/triplea/contributors","subscribers_url":"https://api.github.com/repos/triplea-game/triplea/subscribers","subscription_url":"https://api.github.com/repos/triplea-game/triplea/subscription","commits_url":"https://api.github.com/repos/triplea-game/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplea-game/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplea-game/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplea-game/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplea-game/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/triplea-game/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplea-game/triplea/merges","archive_url":"https://api.github.com/repos/triplea-game/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplea-game/triplea/downloads","issues_url":"https://api.github.com/repos/triplea-game/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/triplea-game/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/triplea-game/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/triplea-game/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplea-game/triplea/labels{/name}","releases_url":"https://api.github.com/repos/triplea-game/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/triplea-game/triplea/deployments","created_at":"2015-07-27T09:32:58Z","updated_at":"2018-02-11T18:51:07Z","pushed_at":"2018-02-13T03:01:25Z","git_url":"git://github.com/triplea-game/triplea.git","ssh_url":"git@github.com:triplea-game/triplea.git","clone_url":"https://github.com/triplea-game/triplea.git","svn_url":"https://github.com/triplea-game/triplea","homepage":null,"size":743871,"stargazers_count":86,"watchers_count":86,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":48,"open_issues":105,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2977"},"html":{"href":"https://github.com/triplea-game/triplea/pull/2977"},"issue":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/2977"},"comments":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/2977/comments"},"review_comments":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2977/comments"},"review_comment":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/2977/commits"},"statuses":{"href":"https://api.github.com/repos/triplea-game/triplea/statuses/4880f0ed85587732ebbbf93160bb1d26b4670e68"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"DanVanAtta"}}