{"action":"created","comment":{"url":"https://api.github.com/repos/srinikandula/mybus/pulls/comments/50625537","id":50625537,"diff_hunk":"@@ -0,0 +1,36 @@\n+package com.mybus.dao.impl;\n+\n+import org.joda.time.DateTime;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.stereotype.Repository;\n+\n+import com.mybus.dao.LayoutDAO;\n+import com.mybus.model.Layout;\n+import com.mybus.service.SessionManager;\n+\n+/**\n+ * Created by schanda on 1/16/16.\n+ */\n+@Repository\n+public class LayoutMongoDAO {\n+    \n+    @Autowired\n+    private LayoutDAO layoutDAO;\n+    \n+    @Autowired\n+    private SessionManager sessionManager;\n+\n+    public Layout save(Layout layout){\n+    \tlayout.setCreatedAt(new DateTime());\n+        layout.setCreatedBy(sessionManager.getCurrentUser().getFirstName());\n+        return layoutDAO.save(layout);\n+    }\n+    public Layout update(Layout layout) throws Exception {\n+        layout.setUpdatedAt(new DateTime());\n+        layout.setUpdatedBy(sessionManager.getCurrentUser().getFirstName());\n+        Layout dbCopy = layoutDAO.findOneByName(layout.getName());\n+        dbCopy.merge(layout);;","path":"src/main/java/com/mybus/dao/impl/LayoutMongoDAO.java","position":32,"original_position":32,"commit_id":"a812dadb8d1d6089eb4d6ea0725a71fb3cfe3287","original_commit_id":"a812dadb8d1d6089eb4d6ea0725a71fb3cfe3287","user":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"body":"This is good.","created_at":"2016-01-23T21:01:48Z","updated_at":"2016-01-23T21:01:48Z","html_url":"https://github.com/srinikandula/mybus/pull/26#discussion_r50625537","pull_request_url":"https://api.github.com/repos/srinikandula/mybus/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/comments/50625537"},"html":{"href":"https://github.com/srinikandula/mybus/pull/26#discussion_r50625537"},"pull_request":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/srinikandula/mybus/pulls/26","id":56411846,"html_url":"https://github.com/srinikandula/mybus/pull/26","diff_url":"https://github.com/srinikandula/mybus/pull/26.diff","patch_url":"https://github.com/srinikandula/mybus/pull/26.patch","issue_url":"https://api.github.com/repos/srinikandula/mybus/issues/26","number":26,"state":"open","locked":false,"title":"Adding code for Layout module","user":{"login":"srinivasatgithub","id":10283051,"avatar_url":"https://avatars.githubusercontent.com/u/10283051?v=3","gravatar_id":"","url":"https://api.github.com/users/srinivasatgithub","html_url":"https://github.com/srinivasatgithub","followers_url":"https://api.github.com/users/srinivasatgithub/followers","following_url":"https://api.github.com/users/srinivasatgithub/following{/other_user}","gists_url":"https://api.github.com/users/srinivasatgithub/gists{/gist_id}","starred_url":"https://api.github.com/users/srinivasatgithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinivasatgithub/subscriptions","organizations_url":"https://api.github.com/users/srinivasatgithub/orgs","repos_url":"https://api.github.com/users/srinivasatgithub/repos","events_url":"https://api.github.com/users/srinivasatgithub/events{/privacy}","received_events_url":"https://api.github.com/users/srinivasatgithub/received_events","type":"User","site_admin":false},"body":"@srinikandula ","created_at":"2016-01-19T01:41:45Z","updated_at":"2016-01-23T21:01:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"692f1741ecc4e9244ccfa67cf10146af276de376","assignee":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/srinikandula/mybus/pulls/26/commits","review_comments_url":"https://api.github.com/repos/srinikandula/mybus/pulls/26/comments","review_comment_url":"https://api.github.com/repos/srinikandula/mybus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/srinikandula/mybus/issues/26/comments","statuses_url":"https://api.github.com/repos/srinikandula/mybus/statuses/a812dadb8d1d6089eb4d6ea0725a71fb3cfe3287","head":{"label":"srinikandula:layout_chanda","ref":"layout_chanda","sha":"a812dadb8d1d6089eb4d6ea0725a71fb3cfe3287","user":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"repo":{"id":28071611,"name":"mybus","full_name":"srinikandula/mybus","owner":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srinikandula/mybus","description":"a maven project for travel site","fork":false,"url":"https://api.github.com/repos/srinikandula/mybus","forks_url":"https://api.github.com/repos/srinikandula/mybus/forks","keys_url":"https://api.github.com/repos/srinikandula/mybus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srinikandula/mybus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srinikandula/mybus/teams","hooks_url":"https://api.github.com/repos/srinikandula/mybus/hooks","issue_events_url":"https://api.github.com/repos/srinikandula/mybus/issues/events{/number}","events_url":"https://api.github.com/repos/srinikandula/mybus/events","assignees_url":"https://api.github.com/repos/srinikandula/mybus/assignees{/user}","branches_url":"https://api.github.com/repos/srinikandula/mybus/branches{/branch}","tags_url":"https://api.github.com/repos/srinikandula/mybus/tags","blobs_url":"https://api.github.com/repos/srinikandula/mybus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srinikandula/mybus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srinikandula/mybus/git/refs{/sha}","trees_url":"https://api.github.com/repos/srinikandula/mybus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srinikandula/mybus/statuses/{sha}","languages_url":"https://api.github.com/repos/srinikandula/mybus/languages","stargazers_url":"https://api.github.com/repos/srinikandula/mybus/stargazers","contributors_url":"https://api.github.com/repos/srinikandula/mybus/contributors","subscribers_url":"https://api.github.com/repos/srinikandula/mybus/subscribers","subscription_url":"https://api.github.com/repos/srinikandula/mybus/subscription","commits_url":"https://api.github.com/repos/srinikandula/mybus/commits{/sha}","git_commits_url":"https://api.github.com/repos/srinikandula/mybus/git/commits{/sha}","comments_url":"https://api.github.com/repos/srinikandula/mybus/comments{/number}","issue_comment_url":"https://api.github.com/repos/srinikandula/mybus/issues/comments{/number}","contents_url":"https://api.github.com/repos/srinikandula/mybus/contents/{+path}","compare_url":"https://api.github.com/repos/srinikandula/mybus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srinikandula/mybus/merges","archive_url":"https://api.github.com/repos/srinikandula/mybus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srinikandula/mybus/downloads","issues_url":"https://api.github.com/repos/srinikandula/mybus/issues{/number}","pulls_url":"https://api.github.com/repos/srinikandula/mybus/pulls{/number}","milestones_url":"https://api.github.com/repos/srinikandula/mybus/milestones{/number}","notifications_url":"https://api.github.com/repos/srinikandula/mybus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srinikandula/mybus/labels{/name}","releases_url":"https://api.github.com/repos/srinikandula/mybus/releases{/id}","deployments_url":"https://api.github.com/repos/srinikandula/mybus/deployments","created_at":"2014-12-16T05:15:00Z","updated_at":"2016-01-15T17:43:11Z","pushed_at":"2016-01-23T20:27:14Z","git_url":"git://github.com/srinikandula/mybus.git","ssh_url":"git@github.com:srinikandula/mybus.git","clone_url":"https://github.com/srinikandula/mybus.git","svn_url":"https://github.com/srinikandula/mybus","homepage":null,"size":1908,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"srinikandula:master","ref":"master","sha":"4c55e37ad67e247c407dc299ebf8406f6ca21acc","user":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"repo":{"id":28071611,"name":"mybus","full_name":"srinikandula/mybus","owner":{"login":"srinikandula","id":221038,"avatar_url":"https://avatars.githubusercontent.com/u/221038?v=3","gravatar_id":"","url":"https://api.github.com/users/srinikandula","html_url":"https://github.com/srinikandula","followers_url":"https://api.github.com/users/srinikandula/followers","following_url":"https://api.github.com/users/srinikandula/following{/other_user}","gists_url":"https://api.github.com/users/srinikandula/gists{/gist_id}","starred_url":"https://api.github.com/users/srinikandula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinikandula/subscriptions","organizations_url":"https://api.github.com/users/srinikandula/orgs","repos_url":"https://api.github.com/users/srinikandula/repos","events_url":"https://api.github.com/users/srinikandula/events{/privacy}","received_events_url":"https://api.github.com/users/srinikandula/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srinikandula/mybus","description":"a maven project for travel site","fork":false,"url":"https://api.github.com/repos/srinikandula/mybus","forks_url":"https://api.github.com/repos/srinikandula/mybus/forks","keys_url":"https://api.github.com/repos/srinikandula/mybus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srinikandula/mybus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srinikandula/mybus/teams","hooks_url":"https://api.github.com/repos/srinikandula/mybus/hooks","issue_events_url":"https://api.github.com/repos/srinikandula/mybus/issues/events{/number}","events_url":"https://api.github.com/repos/srinikandula/mybus/events","assignees_url":"https://api.github.com/repos/srinikandula/mybus/assignees{/user}","branches_url":"https://api.github.com/repos/srinikandula/mybus/branches{/branch}","tags_url":"https://api.github.com/repos/srinikandula/mybus/tags","blobs_url":"https://api.github.com/repos/srinikandula/mybus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srinikandula/mybus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srinikandula/mybus/git/refs{/sha}","trees_url":"https://api.github.com/repos/srinikandula/mybus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srinikandula/mybus/statuses/{sha}","languages_url":"https://api.github.com/repos/srinikandula/mybus/languages","stargazers_url":"https://api.github.com/repos/srinikandula/mybus/stargazers","contributors_url":"https://api.github.com/repos/srinikandula/mybus/contributors","subscribers_url":"https://api.github.com/repos/srinikandula/mybus/subscribers","subscription_url":"https://api.github.com/repos/srinikandula/mybus/subscription","commits_url":"https://api.github.com/repos/srinikandula/mybus/commits{/sha}","git_commits_url":"https://api.github.com/repos/srinikandula/mybus/git/commits{/sha}","comments_url":"https://api.github.com/repos/srinikandula/mybus/comments{/number}","issue_comment_url":"https://api.github.com/repos/srinikandula/mybus/issues/comments{/number}","contents_url":"https://api.github.com/repos/srinikandula/mybus/contents/{+path}","compare_url":"https://api.github.com/repos/srinikandula/mybus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srinikandula/mybus/merges","archive_url":"https://api.github.com/repos/srinikandula/mybus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srinikandula/mybus/downloads","issues_url":"https://api.github.com/repos/srinikandula/mybus/issues{/number}","pulls_url":"https://api.github.com/repos/srinikandula/mybus/pulls{/number}","milestones_url":"https://api.github.com/repos/srinikandula/mybus/milestones{/number}","notifications_url":"https://api.github.com/repos/srinikandula/mybus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srinikandula/mybus/labels{/name}","releases_url":"https://api.github.com/repos/srinikandula/mybus/releases{/id}","deployments_url":"https://api.github.com/repos/srinikandula/mybus/deployments","created_at":"2014-12-16T05:15:00Z","updated_at":"2016-01-15T17:43:11Z","pushed_at":"2016-01-23T20:27:14Z","git_url":"git://github.com/srinikandula/mybus.git","ssh_url":"git@github.com:srinikandula/mybus.git","clone_url":"https://github.com/srinikandula/mybus.git","svn_url":"https://github.com/srinikandula/mybus","homepage":null,"size":1908,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/26"},"html":{"href":"https://github.com/srinikandula/mybus/pull/26"},"issue":{"href":"https://api.github.com/repos/srinikandula/mybus/issues/26"},"comments":{"href":"https://api.github.com/repos/srinikandula/mybus/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/srinikandula/mybus/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/srinikandula/mybus/statuses/a812dadb8d1d6089eb4d6ea0725a71fb3cfe3287"}}}}