{"action":"created","comment":{"url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/comments/50088108","id":50088108,"diff_hunk":"@@ -0,0 +1,192 @@\n+package com.lftechnology.batch7crud.controller;\n+\n+import com.lftechnology.batch7crud.model.Employee;\n+import com.lftechnology.batch7crud.services.EmployeeService;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import javax.servlet.RequestDispatcher;\n+import javax.servlet.ServletException;\n+import javax.servlet.annotation.WebServlet;\n+import javax.servlet.http.HttpServlet;\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+\n+/**\n+ * Servlet implementation class EmployeeController\n+ */\n+\n+@WebServlet(\"/employees/*\")\n+public class EmployeeController extends HttpServlet {\n+    EmployeeService employeeService = new EmployeeService();\n+    Employee emp = new Employee();\n+    private static final long serialVersionUID = 1L;\n+\n+    /**\n+     * @see HttpServlet#HttpServlet()\n+     */\n+    public EmployeeController() {\n+        super();\n+        // TODO Auto-generated constructor stub\n+    }\n+\n+    /**\n+     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)\n+     */\n+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n+        // TODO Auto-generated method stub\n+        String path = request.getPathInfo();\n+        System.out.println(path);\n+        if (path != null) {\n+\n+            String[] pathParts = path.split(\"/\");\n+            /*\n+             * for (String s : pathParts) { System.out.println(\"parts: \" + s); }\n+             */\n+            if (pathParts[1].equals(\"create\"))\n+                create(request, response);\n+\n+            else if (pathParts[2].equals(\"edit\")) {\n+                int id = Integer.parseInt(pathParts[1]);\n+                edit(request, response, id);\n+            }\n+\n+        }\n+\n+        else {\n+            fetchData(request, response);\n+        }\n+\n+    }\n+\n+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n+        // TODO Auto-generated method stub\n+        // doGet(request, response);\n+        String path = request.getPathInfo();\n+        if (path != null) {\n+            String[] pathParts = path.split(\"/\");\n+\n+            if (pathParts[1].equals(\"createProcess\")) {\n+                createProcess(request, response);\n+\n+            }\n+\n+            else if (pathParts[2].equals(\"editProcess\")) {\n+                int id = Integer.parseInt(pathParts[1]);\n+                editProcess(request, response, id);\n+\n+            }\n+\n+            else if (pathParts[2].equals(\"deleteProcess\")) {\n+                int id = Integer.parseInt(pathParts[1]);\n+                deleteProcess(request, response, id);\n+            }\n+\n+        } else {\n+            fetchData(request, response);\n+        }\n+\n+    }\n+\n+    private void deleteProcess(HttpServletRequest request, HttpServletResponse response, int id) {\n+        // TODO Auto-generated method stub\n+        try {\n+            employeeService.deleteById(id);\n+\n+            response.sendRedirect(\"/batch7crud-roll5/employees\");\n+\n+        } catch (Exception e) {","path":"batch7crud-roll5/src/main/java/com/lftechnology/batch7crud/controller/EmployeeController.java","position":100,"original_position":100,"commit_id":"564dd05d7c35d8217da702cb5e7e450606e6046e","original_commit_id":"564dd05d7c35d8217da702cb5e7e450606e6046e","user":{"login":"bhuwang","id":3335673,"avatar_url":"https://avatars.githubusercontent.com/u/3335673?v=3","gravatar_id":"","url":"https://api.github.com/users/bhuwang","html_url":"https://github.com/bhuwang","followers_url":"https://api.github.com/users/bhuwang/followers","following_url":"https://api.github.com/users/bhuwang/following{/other_user}","gists_url":"https://api.github.com/users/bhuwang/gists{/gist_id}","starred_url":"https://api.github.com/users/bhuwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhuwang/subscriptions","organizations_url":"https://api.github.com/users/bhuwang/orgs","repos_url":"https://api.github.com/users/bhuwang/repos","events_url":"https://api.github.com/users/bhuwang/events{/privacy}","received_events_url":"https://api.github.com/users/bhuwang/received_events","type":"User","site_admin":false},"body":"![CRITICAL](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-critical.png) Either log or rethrow this exception. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://nemo.sonarqube.org/coding_rules#rule_key=squid%3AS1166)\n","created_at":"2016-01-19T09:18:01Z","updated_at":"2016-01-19T09:18:01Z","html_url":"https://github.com/lf-kailashraj/batch7crud/pull/10#discussion_r50088108","pull_request_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/comments/50088108"},"html":{"href":"https://github.com/lf-kailashraj/batch7crud/pull/10#discussion_r50088108"},"pull_request":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10","id":56336353,"html_url":"https://github.com/lf-kailashraj/batch7crud/pull/10","diff_url":"https://github.com/lf-kailashraj/batch7crud/pull/10.diff","patch_url":"https://github.com/lf-kailashraj/batch7crud/pull/10.patch","issue_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/10","number":10,"state":"open","locked":false,"title":"Roll5 laxman","user":{"login":"laxmankhanal","id":10397609,"avatar_url":"https://avatars.githubusercontent.com/u/10397609?v=3","gravatar_id":"","url":"https://api.github.com/users/laxmankhanal","html_url":"https://github.com/laxmankhanal","followers_url":"https://api.github.com/users/laxmankhanal/followers","following_url":"https://api.github.com/users/laxmankhanal/following{/other_user}","gists_url":"https://api.github.com/users/laxmankhanal/gists{/gist_id}","starred_url":"https://api.github.com/users/laxmankhanal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laxmankhanal/subscriptions","organizations_url":"https://api.github.com/users/laxmankhanal/orgs","repos_url":"https://api.github.com/users/laxmankhanal/repos","events_url":"https://api.github.com/users/laxmankhanal/events{/privacy}","received_events_url":"https://api.github.com/users/laxmankhanal/received_events","type":"User","site_admin":false},"body":"@udhamala-lftechnology \r\n\r\nCreate and List View implemented","created_at":"2016-01-18T12:25:42Z","updated_at":"2016-01-19T09:18:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4868f0777fe5f1e719f40879893d1ba55185e7c6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10/commits","review_comments_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10/comments","review_comment_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/10/comments","statuses_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/statuses/564dd05d7c35d8217da702cb5e7e450606e6046e","head":{"label":"lf-kailashraj:ROLL5-laxman","ref":"ROLL5-laxman","sha":"564dd05d7c35d8217da702cb5e7e450606e6046e","user":{"login":"lf-kailashraj","id":7426244,"avatar_url":"https://avatars.githubusercontent.com/u/7426244?v=3","gravatar_id":"","url":"https://api.github.com/users/lf-kailashraj","html_url":"https://github.com/lf-kailashraj","followers_url":"https://api.github.com/users/lf-kailashraj/followers","following_url":"https://api.github.com/users/lf-kailashraj/following{/other_user}","gists_url":"https://api.github.com/users/lf-kailashraj/gists{/gist_id}","starred_url":"https://api.github.com/users/lf-kailashraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lf-kailashraj/subscriptions","organizations_url":"https://api.github.com/users/lf-kailashraj/orgs","repos_url":"https://api.github.com/users/lf-kailashraj/repos","events_url":"https://api.github.com/users/lf-kailashraj/events{/privacy}","received_events_url":"https://api.github.com/users/lf-kailashraj/received_events","type":"User","site_admin":false},"repo":{"id":49557152,"name":"batch7crud","full_name":"lf-kailashraj/batch7crud","owner":{"login":"lf-kailashraj","id":7426244,"avatar_url":"https://avatars.githubusercontent.com/u/7426244?v=3","gravatar_id":"","url":"https://api.github.com/users/lf-kailashraj","html_url":"https://github.com/lf-kailashraj","followers_url":"https://api.github.com/users/lf-kailashraj/followers","following_url":"https://api.github.com/users/lf-kailashraj/following{/other_user}","gists_url":"https://api.github.com/users/lf-kailashraj/gists{/gist_id}","starred_url":"https://api.github.com/users/lf-kailashraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lf-kailashraj/subscriptions","organizations_url":"https://api.github.com/users/lf-kailashraj/orgs","repos_url":"https://api.github.com/users/lf-kailashraj/repos","events_url":"https://api.github.com/users/lf-kailashraj/events{/privacy}","received_events_url":"https://api.github.com/users/lf-kailashraj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lf-kailashraj/batch7crud","description":"","fork":false,"url":"https://api.github.com/repos/lf-kailashraj/batch7crud","forks_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/forks","keys_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/teams","hooks_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/hooks","issue_events_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/events{/number}","events_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/events","assignees_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/assignees{/user}","branches_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/branches{/branch}","tags_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/tags","blobs_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/refs{/sha}","trees_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/statuses/{sha}","languages_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/languages","stargazers_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/stargazers","contributors_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/contributors","subscribers_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/subscribers","subscription_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/subscription","commits_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/commits{/sha}","git_commits_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/commits{/sha}","comments_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/comments{/number}","issue_comment_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/comments{/number}","contents_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/contents/{+path}","compare_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/merges","archive_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/downloads","issues_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues{/number}","pulls_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls{/number}","milestones_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/milestones{/number}","notifications_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/labels{/name}","releases_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/releases{/id}","created_at":"2016-01-13T07:24:08Z","updated_at":"2016-01-13T07:26:37Z","pushed_at":"2016-01-19T09:12:39Z","git_url":"git://github.com/lf-kailashraj/batch7crud.git","ssh_url":"git@github.com:lf-kailashraj/batch7crud.git","clone_url":"https://github.com/lf-kailashraj/batch7crud.git","svn_url":"https://github.com/lf-kailashraj/batch7crud","homepage":null,"size":200,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"dev"}},"base":{"label":"lf-kailashraj:dev","ref":"dev","sha":"2356e0515bd2aae35d92d74484081a4e53512bb4","user":{"login":"lf-kailashraj","id":7426244,"avatar_url":"https://avatars.githubusercontent.com/u/7426244?v=3","gravatar_id":"","url":"https://api.github.com/users/lf-kailashraj","html_url":"https://github.com/lf-kailashraj","followers_url":"https://api.github.com/users/lf-kailashraj/followers","following_url":"https://api.github.com/users/lf-kailashraj/following{/other_user}","gists_url":"https://api.github.com/users/lf-kailashraj/gists{/gist_id}","starred_url":"https://api.github.com/users/lf-kailashraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lf-kailashraj/subscriptions","organizations_url":"https://api.github.com/users/lf-kailashraj/orgs","repos_url":"https://api.github.com/users/lf-kailashraj/repos","events_url":"https://api.github.com/users/lf-kailashraj/events{/privacy}","received_events_url":"https://api.github.com/users/lf-kailashraj/received_events","type":"User","site_admin":false},"repo":{"id":49557152,"name":"batch7crud","full_name":"lf-kailashraj/batch7crud","owner":{"login":"lf-kailashraj","id":7426244,"avatar_url":"https://avatars.githubusercontent.com/u/7426244?v=3","gravatar_id":"","url":"https://api.github.com/users/lf-kailashraj","html_url":"https://github.com/lf-kailashraj","followers_url":"https://api.github.com/users/lf-kailashraj/followers","following_url":"https://api.github.com/users/lf-kailashraj/following{/other_user}","gists_url":"https://api.github.com/users/lf-kailashraj/gists{/gist_id}","starred_url":"https://api.github.com/users/lf-kailashraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lf-kailashraj/subscriptions","organizations_url":"https://api.github.com/users/lf-kailashraj/orgs","repos_url":"https://api.github.com/users/lf-kailashraj/repos","events_url":"https://api.github.com/users/lf-kailashraj/events{/privacy}","received_events_url":"https://api.github.com/users/lf-kailashraj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lf-kailashraj/batch7crud","description":"","fork":false,"url":"https://api.github.com/repos/lf-kailashraj/batch7crud","forks_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/forks","keys_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/teams","hooks_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/hooks","issue_events_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/events{/number}","events_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/events","assignees_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/assignees{/user}","branches_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/branches{/branch}","tags_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/tags","blobs_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/refs{/sha}","trees_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/statuses/{sha}","languages_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/languages","stargazers_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/stargazers","contributors_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/contributors","subscribers_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/subscribers","subscription_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/subscription","commits_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/commits{/sha}","git_commits_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/git/commits{/sha}","comments_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/comments{/number}","issue_comment_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/comments{/number}","contents_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/contents/{+path}","compare_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/merges","archive_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/downloads","issues_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues{/number}","pulls_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls{/number}","milestones_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/milestones{/number}","notifications_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/labels{/name}","releases_url":"https://api.github.com/repos/lf-kailashraj/batch7crud/releases{/id}","created_at":"2016-01-13T07:24:08Z","updated_at":"2016-01-13T07:26:37Z","pushed_at":"2016-01-19T09:12:39Z","git_url":"git://github.com/lf-kailashraj/batch7crud.git","ssh_url":"git@github.com:lf-kailashraj/batch7crud.git","clone_url":"https://github.com/lf-kailashraj/batch7crud.git","svn_url":"https://github.com/lf-kailashraj/batch7crud","homepage":null,"size":200,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10"},"html":{"href":"https://github.com/lf-kailashraj/batch7crud/pull/10"},"issue":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/10"},"comments":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/lf-kailashraj/batch7crud/statuses/564dd05d7c35d8217da702cb5e7e450606e6046e"}}}}