{"action":"created","comment":{"url":"https://api.github.com/repos/apache/openmeetings/pulls/comments/74956001","id":74956001,"diff_hunk":"@@ -0,0 +1,121 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\") +  you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package org.apache.openmeetings.db.dao.calendar;\n+\n+import org.apache.openmeetings.db.entity.calendar.Appointment;\n+import org.apache.openmeetings.db.entity.calendar.OmCalendar;\n+import org.red5.logging.Red5LoggerFactory;\n+import org.slf4j.Logger;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.transaction.annotation.Transactional;\n+\n+import javax.persistence.EntityManager;\n+import javax.persistence.NoResultException;\n+import javax.persistence.PersistenceContext;\n+import javax.persistence.TypedQuery;\n+import java.util.List;\n+\n+import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;\n+\n+@Transactional\n+public class OmCalendarDao {\n+\tprivate static final Logger log = Red5LoggerFactory.getLogger(OmCalendarDao.class, webAppRootKey);\n+\n+\t@PersistenceContext\n+\tprivate EntityManager em;\n+\t@Autowired\n+\tprivate AppointmentDao appointmentDao;\n+\n+\tpublic List<OmCalendar> get() {\n+\t\treturn em.createNamedQuery(\"getCalendars\", OmCalendar.class).getResultList();\n+\t}\n+\n+\t/**\n+\t * Return all the Calendars that belong to the User.\n+\t *\n+\t * @param userId User ID to whom the calendars belong.\n+\t * @return List of Calendars\n+\t */\n+\tpublic List<OmCalendar> get(Long userId) {\n+\t\treturn em.createNamedQuery(\"getCalendarbyUser\", OmCalendar.class)\n+\t\t\t\t.setParameter(\"userId\", userId)\n+\t\t\t\t.getResultList();\n+\t}\n+\n+\t/**\n+\t * Returns all the Google Calendars associated with the user.\n+\t *\n+\t * @param userId User ID of the owner of the Calendar\n+\t * @return List of Google Calendars.\n+\t */\n+\tpublic List<OmCalendar> getGoogleCalendars(Long userId) {\n+\t\treturn em.createNamedQuery(\"getGoogleCalendars\", OmCalendar.class)\n+\t\t\t\t.setParameter(\"userId\", userId)\n+\t\t\t\t.getResultList();\n+\t}\n+\n+\t/**\n+\t * Creates or Updates the given calendar.\n+\t *\n+\t * @param c Calendar to Update\n+\t * @return Updated Calendar\n+\t */\n+\tpublic OmCalendar update(OmCalendar c) {\n+\t\tif (c.getId() == null) {\n+\t\t\tem.persist(c);\n+\t\t} else","path":"openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/calendar/OmCalendarDao.java","position":82,"original_position":82,"commit_id":"1dbd0405aeef8a0e98a5796b9f9aae7214eee263","original_commit_id":"1dbd0405aeef8a0e98a5796b9f9aae7214eee263","user":{"login":"solomax","id":3870591,"avatar_url":"https://avatars.githubusercontent.com/u/3870591?v=3","gravatar_id":"","url":"https://api.github.com/users/solomax","html_url":"https://github.com/solomax","followers_url":"https://api.github.com/users/solomax/followers","following_url":"https://api.github.com/users/solomax/following{/other_user}","gists_url":"https://api.github.com/users/solomax/gists{/gist_id}","starred_url":"https://api.github.com/users/solomax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solomax/subscriptions","organizations_url":"https://api.github.com/users/solomax/orgs","repos_url":"https://api.github.com/users/solomax/repos","events_url":"https://api.github.com/users/solomax/events{/privacy}","received_events_url":"https://api.github.com/users/solomax/received_events","type":"User","site_admin":false},"body":"Please fix all such blocks, it should be\r\nif () {\r\n} else {\r\n}\r\ncurly brackets , both blocks","created_at":"2016-08-16T15:17:11Z","updated_at":"2016-08-16T15:17:11Z","html_url":"https://github.com/apache/openmeetings/pull/1#discussion_r74956001","pull_request_url":"https://api.github.com/repos/apache/openmeetings/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/comments/74956001"},"html":{"href":"https://github.com/apache/openmeetings/pull/1#discussion_r74956001"},"pull_request":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/apache/openmeetings/pulls/1","id":80980449,"html_url":"https://github.com/apache/openmeetings/pull/1","diff_url":"https://github.com/apache/openmeetings/pull/1.diff","patch_url":"https://github.com/apache/openmeetings/pull/1.patch","issue_url":"https://api.github.com/repos/apache/openmeetings/issues/1","number":1,"state":"open","locked":false,"title":"Merge CalDAV branch 3.2.x into master","user":{"login":"TheAntimist","id":14803910,"avatar_url":"https://avatars.githubusercontent.com/u/14803910?v=3","gravatar_id":"","url":"https://api.github.com/users/TheAntimist","html_url":"https://github.com/TheAntimist","followers_url":"https://api.github.com/users/TheAntimist/followers","following_url":"https://api.github.com/users/TheAntimist/following{/other_user}","gists_url":"https://api.github.com/users/TheAntimist/gists{/gist_id}","starred_url":"https://api.github.com/users/TheAntimist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheAntimist/subscriptions","organizations_url":"https://api.github.com/users/TheAntimist/orgs","repos_url":"https://api.github.com/users/TheAntimist/repos","events_url":"https://api.github.com/users/TheAntimist/events{/privacy}","received_events_url":"https://api.github.com/users/TheAntimist/received_events","type":"User","site_admin":false},"body":"This is a pull request for merging all the CalDAV code into the master Openmeetings repository.","created_at":"2016-08-11T15:40:04Z","updated_at":"2016-08-16T15:17:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16817151b19df630bec2b877f4d338ec4862d94b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/openmeetings/pulls/1/commits","review_comments_url":"https://api.github.com/repos/apache/openmeetings/pulls/1/comments","review_comment_url":"https://api.github.com/repos/apache/openmeetings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/openmeetings/issues/1/comments","statuses_url":"https://api.github.com/repos/apache/openmeetings/statuses/1dbd0405aeef8a0e98a5796b9f9aae7214eee263","head":{"label":"TheAntimist:3.2.x","ref":"3.2.x","sha":"1dbd0405aeef8a0e98a5796b9f9aae7214eee263","user":{"login":"TheAntimist","id":14803910,"avatar_url":"https://avatars.githubusercontent.com/u/14803910?v=3","gravatar_id":"","url":"https://api.github.com/users/TheAntimist","html_url":"https://github.com/TheAntimist","followers_url":"https://api.github.com/users/TheAntimist/followers","following_url":"https://api.github.com/users/TheAntimist/following{/other_user}","gists_url":"https://api.github.com/users/TheAntimist/gists{/gist_id}","starred_url":"https://api.github.com/users/TheAntimist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheAntimist/subscriptions","organizations_url":"https://api.github.com/users/TheAntimist/orgs","repos_url":"https://api.github.com/users/TheAntimist/repos","events_url":"https://api.github.com/users/TheAntimist/events{/privacy}","received_events_url":"https://api.github.com/users/TheAntimist/received_events","type":"User","site_admin":false},"repo":{"id":57096813,"name":"openmeetings","full_name":"TheAntimist/openmeetings","owner":{"login":"TheAntimist","id":14803910,"avatar_url":"https://avatars.githubusercontent.com/u/14803910?v=3","gravatar_id":"","url":"https://api.github.com/users/TheAntimist","html_url":"https://github.com/TheAntimist","followers_url":"https://api.github.com/users/TheAntimist/followers","following_url":"https://api.github.com/users/TheAntimist/following{/other_user}","gists_url":"https://api.github.com/users/TheAntimist/gists{/gist_id}","starred_url":"https://api.github.com/users/TheAntimist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheAntimist/subscriptions","organizations_url":"https://api.github.com/users/TheAntimist/orgs","repos_url":"https://api.github.com/users/TheAntimist/repos","events_url":"https://api.github.com/users/TheAntimist/events{/privacy}","received_events_url":"https://api.github.com/users/TheAntimist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TheAntimist/openmeetings","description":"Mirror of Apache Openmeetings","fork":true,"url":"https://api.github.com/repos/TheAntimist/openmeetings","forks_url":"https://api.github.com/repos/TheAntimist/openmeetings/forks","keys_url":"https://api.github.com/repos/TheAntimist/openmeetings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheAntimist/openmeetings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheAntimist/openmeetings/teams","hooks_url":"https://api.github.com/repos/TheAntimist/openmeetings/hooks","issue_events_url":"https://api.github.com/repos/TheAntimist/openmeetings/issues/events{/number}","events_url":"https://api.github.com/repos/TheAntimist/openmeetings/events","assignees_url":"https://api.github.com/repos/TheAntimist/openmeetings/assignees{/user}","branches_url":"https://api.github.com/repos/TheAntimist/openmeetings/branches{/branch}","tags_url":"https://api.github.com/repos/TheAntimist/openmeetings/tags","blobs_url":"https://api.github.com/repos/TheAntimist/openmeetings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheAntimist/openmeetings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheAntimist/openmeetings/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheAntimist/openmeetings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheAntimist/openmeetings/statuses/{sha}","languages_url":"https://api.github.com/repos/TheAntimist/openmeetings/languages","stargazers_url":"https://api.github.com/repos/TheAntimist/openmeetings/stargazers","contributors_url":"https://api.github.com/repos/TheAntimist/openmeetings/contributors","subscribers_url":"https://api.github.com/repos/TheAntimist/openmeetings/subscribers","subscription_url":"https://api.github.com/repos/TheAntimist/openmeetings/subscription","commits_url":"https://api.github.com/repos/TheAntimist/openmeetings/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheAntimist/openmeetings/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheAntimist/openmeetings/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheAntimist/openmeetings/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheAntimist/openmeetings/contents/{+path}","compare_url":"https://api.github.com/repos/TheAntimist/openmeetings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheAntimist/openmeetings/merges","archive_url":"https://api.github.com/repos/TheAntimist/openmeetings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheAntimist/openmeetings/downloads","issues_url":"https://api.github.com/repos/TheAntimist/openmeetings/issues{/number}","pulls_url":"https://api.github.com/repos/TheAntimist/openmeetings/pulls{/number}","milestones_url":"https://api.github.com/repos/TheAntimist/openmeetings/milestones{/number}","notifications_url":"https://api.github.com/repos/TheAntimist/openmeetings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheAntimist/openmeetings/labels{/name}","releases_url":"https://api.github.com/repos/TheAntimist/openmeetings/releases{/id}","deployments_url":"https://api.github.com/repos/TheAntimist/openmeetings/deployments","created_at":"2016-04-26T04:04:59Z","updated_at":"2016-04-26T04:05:07Z","pushed_at":"2016-08-15T05:42:40Z","git_url":"git://github.com/TheAntimist/openmeetings.git","ssh_url":"git@github.com:TheAntimist/openmeetings.git","clone_url":"https://github.com/TheAntimist/openmeetings.git","svn_url":"https://github.com/TheAntimist/openmeetings","homepage":null,"size":349351,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.0"}},"base":{"label":"apache:3.2.x","ref":"3.2.x","sha":"54c8ff0fa63ae2388ce61c913513244a0c299cdd","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":32137005,"name":"openmeetings","full_name":"apache/openmeetings","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/openmeetings","description":"Mirror of Apache Openmeetings","fork":false,"url":"https://api.github.com/repos/apache/openmeetings","forks_url":"https://api.github.com/repos/apache/openmeetings/forks","keys_url":"https://api.github.com/repos/apache/openmeetings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/openmeetings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/openmeetings/teams","hooks_url":"https://api.github.com/repos/apache/openmeetings/hooks","issue_events_url":"https://api.github.com/repos/apache/openmeetings/issues/events{/number}","events_url":"https://api.github.com/repos/apache/openmeetings/events","assignees_url":"https://api.github.com/repos/apache/openmeetings/assignees{/user}","branches_url":"https://api.github.com/repos/apache/openmeetings/branches{/branch}","tags_url":"https://api.github.com/repos/apache/openmeetings/tags","blobs_url":"https://api.github.com/repos/apache/openmeetings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/openmeetings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/openmeetings/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/openmeetings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/openmeetings/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/openmeetings/languages","stargazers_url":"https://api.github.com/repos/apache/openmeetings/stargazers","contributors_url":"https://api.github.com/repos/apache/openmeetings/contributors","subscribers_url":"https://api.github.com/repos/apache/openmeetings/subscribers","subscription_url":"https://api.github.com/repos/apache/openmeetings/subscription","commits_url":"https://api.github.com/repos/apache/openmeetings/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/openmeetings/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/openmeetings/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/openmeetings/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/openmeetings/contents/{+path}","compare_url":"https://api.github.com/repos/apache/openmeetings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/openmeetings/merges","archive_url":"https://api.github.com/repos/apache/openmeetings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/openmeetings/downloads","issues_url":"https://api.github.com/repos/apache/openmeetings/issues{/number}","pulls_url":"https://api.github.com/repos/apache/openmeetings/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/openmeetings/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/openmeetings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/openmeetings/labels{/name}","releases_url":"https://api.github.com/repos/apache/openmeetings/releases{/id}","deployments_url":"https://api.github.com/repos/apache/openmeetings/deployments","created_at":"2015-03-13T07:00:05Z","updated_at":"2016-08-15T15:03:58Z","pushed_at":"2016-08-16T06:12:17Z","git_url":"git://github.com/apache/openmeetings.git","ssh_url":"git@github.com:apache/openmeetings.git","clone_url":"https://github.com/apache/openmeetings.git","svn_url":"https://github.com/apache/openmeetings","homepage":null,"size":692489,"stargazers_count":22,"watchers_count":22,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":"git://git.apache.org/openmeetings.git","open_issues_count":1,"forks":20,"open_issues":1,"watchers":22,"default_branch":"2.0"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/1"},"html":{"href":"https://github.com/apache/openmeetings/pull/1"},"issue":{"href":"https://api.github.com/repos/apache/openmeetings/issues/1"},"comments":{"href":"https://api.github.com/repos/apache/openmeetings/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/openmeetings/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/apache/openmeetings/statuses/1dbd0405aeef8a0e98a5796b9f9aae7214eee263"}}}}
{"actor":{"display_login":"solomax"}}