{"action":"created","comment":{"url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/comments/68122399","id":68122399,"diff_hunk":"@@ -262,28 +263,42 @@ protected Object convertValue(final OIndex<?> idx, Object iValue) {\n     }\n \n     public Stream<OrientVertex> getIndexedVertices(OIndex<Object> index, Optional<Object> valueOption) {\n+        return getIndexedElements(index, valueOption, OrientVertex::new, OrientVertex::new);\n+    }\n+\n+    public Stream<OrientEdge> getIndexedEdges(OIndex<Object> index, Optional<Object> valueOption) {\n+        return getIndexedElements(index, valueOption, OrientEdge::new, OrientEdge::new);\n+    }\n+\n+    private <ElementType extends OrientElement> Stream<ElementType> getIndexedElements(OIndex<Object> index, Optional<Object> valueOption,\n+            BiFunction<OrientGraph, OIdentifiable, ElementType> newElementById, BiFunction<OrientGraph, ODocument, ElementType> newElementByDoc) {","path":"driver/src/main/java/org/apache/tinkerpop/gremlin/orientdb/OrientGraph.java","position":20,"original_position":20,"commit_id":"91ab9a32b1103521c8883df9dab72fce31d7c3c7","original_commit_id":"91ab9a32b1103521c8883df9dab72fce31d7c3c7","user":{"login":"velo","id":136590,"avatar_url":"https://avatars.githubusercontent.com/u/136590?v=3","gravatar_id":"","url":"https://api.github.com/users/velo","html_url":"https://github.com/velo","followers_url":"https://api.github.com/users/velo/followers","following_url":"https://api.github.com/users/velo/following{/other_user}","gists_url":"https://api.github.com/users/velo/gists{/gist_id}","starred_url":"https://api.github.com/users/velo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/velo/subscriptions","organizations_url":"https://api.github.com/users/velo/orgs","repos_url":"https://api.github.com/users/velo/repos","events_url":"https://api.github.com/users/velo/events{/privacy}","received_events_url":"https://api.github.com/users/velo/received_events","type":"User","site_admin":false},"body":"Since OrientEdge constructor checks if rawElement is instanceof ODocument, you could use only the OIdentifiable constructor, could you not?","created_at":"2016-06-22T19:50:13Z","updated_at":"2016-06-22T19:50:13Z","html_url":"https://github.com/mpollmeier/orientdb-gremlin/pull/78#discussion_r68122399","pull_request_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/comments/68122399"},"html":{"href":"https://github.com/mpollmeier/orientdb-gremlin/pull/78#discussion_r68122399"},"pull_request":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78","id":74816662,"html_url":"https://github.com/mpollmeier/orientdb-gremlin/pull/78","diff_url":"https://github.com/mpollmeier/orientdb-gremlin/pull/78.diff","patch_url":"https://github.com/mpollmeier/orientdb-gremlin/pull/78.patch","issue_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/78","number":78,"state":"open","locked":false,"title":"Support for UNIQUE and NOTUNIQUE indices on edges.","user":{"login":"johnrevill","id":9166352,"avatar_url":"https://avatars.githubusercontent.com/u/9166352?v=3","gravatar_id":"","url":"https://api.github.com/users/johnrevill","html_url":"https://github.com/johnrevill","followers_url":"https://api.github.com/users/johnrevill/followers","following_url":"https://api.github.com/users/johnrevill/following{/other_user}","gists_url":"https://api.github.com/users/johnrevill/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrevill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrevill/subscriptions","organizations_url":"https://api.github.com/users/johnrevill/orgs","repos_url":"https://api.github.com/users/johnrevill/repos","events_url":"https://api.github.com/users/johnrevill/events{/privacy}","received_events_url":"https://api.github.com/users/johnrevill/received_events","type":"User","site_admin":false},"body":"Hi there,\r\n\r\nI just had a go at getting index support for edges. It largely follows the approach taken for vertex indices.\r\n\r\nThere's also a small fix in OrientGraph.java for a potential ClassCastException being thrown during index lookup when using a remote connection. This has the exact same exception message as in the old issue #71 and seems to happen when using a remote connection and a NOTUNIQUE index.\r\n\r\nCheers,\r\nJohn","created_at":"2016-06-22T16:35:44Z","updated_at":"2016-06-22T19:50:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2f82cb6b7ff5e56ccffa8ca778a0d19b0b8c2e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78/commits","review_comments_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78/comments","review_comment_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/78/comments","statuses_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/statuses/91ab9a32b1103521c8883df9dab72fce31d7c3c7","head":{"label":"johnrevill:master","ref":"master","sha":"91ab9a32b1103521c8883df9dab72fce31d7c3c7","user":{"login":"johnrevill","id":9166352,"avatar_url":"https://avatars.githubusercontent.com/u/9166352?v=3","gravatar_id":"","url":"https://api.github.com/users/johnrevill","html_url":"https://github.com/johnrevill","followers_url":"https://api.github.com/users/johnrevill/followers","following_url":"https://api.github.com/users/johnrevill/following{/other_user}","gists_url":"https://api.github.com/users/johnrevill/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrevill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrevill/subscriptions","organizations_url":"https://api.github.com/users/johnrevill/orgs","repos_url":"https://api.github.com/users/johnrevill/repos","events_url":"https://api.github.com/users/johnrevill/events{/privacy}","received_events_url":"https://api.github.com/users/johnrevill/received_events","type":"User","site_admin":false},"repo":{"id":61733428,"name":"orientdb-gremlin","full_name":"johnrevill/orientdb-gremlin","owner":{"login":"johnrevill","id":9166352,"avatar_url":"https://avatars.githubusercontent.com/u/9166352?v=3","gravatar_id":"","url":"https://api.github.com/users/johnrevill","html_url":"https://github.com/johnrevill","followers_url":"https://api.github.com/users/johnrevill/followers","following_url":"https://api.github.com/users/johnrevill/following{/other_user}","gists_url":"https://api.github.com/users/johnrevill/gists{/gist_id}","starred_url":"https://api.github.com/users/johnrevill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnrevill/subscriptions","organizations_url":"https://api.github.com/users/johnrevill/orgs","repos_url":"https://api.github.com/users/johnrevill/repos","events_url":"https://api.github.com/users/johnrevill/events{/privacy}","received_events_url":"https://api.github.com/users/johnrevill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnrevill/orientdb-gremlin","description":"TinkerPop3 Graph Structure Implementation for OrientDB","fork":true,"url":"https://api.github.com/repos/johnrevill/orientdb-gremlin","forks_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/forks","keys_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/teams","hooks_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/hooks","issue_events_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/issues/events{/number}","events_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/events","assignees_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/assignees{/user}","branches_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/branches{/branch}","tags_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/tags","blobs_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/statuses/{sha}","languages_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/languages","stargazers_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/stargazers","contributors_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/contributors","subscribers_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/subscribers","subscription_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/subscription","commits_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/contents/{+path}","compare_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/merges","archive_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/downloads","issues_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/issues{/number}","pulls_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/pulls{/number}","milestones_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/milestones{/number}","notifications_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/labels{/name}","releases_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/releases{/id}","deployments_url":"https://api.github.com/repos/johnrevill/orientdb-gremlin/deployments","created_at":"2016-06-22T16:13:08Z","updated_at":"2016-06-22T16:13:08Z","pushed_at":"2016-06-22T16:26:59Z","git_url":"git://github.com/johnrevill/orientdb-gremlin.git","ssh_url":"git@github.com:johnrevill/orientdb-gremlin.git","clone_url":"https://github.com/johnrevill/orientdb-gremlin.git","svn_url":"https://github.com/johnrevill/orientdb-gremlin","homepage":"","size":409,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mpollmeier:master","ref":"master","sha":"73cbc5ad16015b77d2daa094a79410bbc891a76f","user":{"login":"mpollmeier","id":506752,"avatar_url":"https://avatars.githubusercontent.com/u/506752?v=3","gravatar_id":"","url":"https://api.github.com/users/mpollmeier","html_url":"https://github.com/mpollmeier","followers_url":"https://api.github.com/users/mpollmeier/followers","following_url":"https://api.github.com/users/mpollmeier/following{/other_user}","gists_url":"https://api.github.com/users/mpollmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/mpollmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpollmeier/subscriptions","organizations_url":"https://api.github.com/users/mpollmeier/orgs","repos_url":"https://api.github.com/users/mpollmeier/repos","events_url":"https://api.github.com/users/mpollmeier/events{/privacy}","received_events_url":"https://api.github.com/users/mpollmeier/received_events","type":"User","site_admin":false},"repo":{"id":37631091,"name":"orientdb-gremlin","full_name":"mpollmeier/orientdb-gremlin","owner":{"login":"mpollmeier","id":506752,"avatar_url":"https://avatars.githubusercontent.com/u/506752?v=3","gravatar_id":"","url":"https://api.github.com/users/mpollmeier","html_url":"https://github.com/mpollmeier","followers_url":"https://api.github.com/users/mpollmeier/followers","following_url":"https://api.github.com/users/mpollmeier/following{/other_user}","gists_url":"https://api.github.com/users/mpollmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/mpollmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpollmeier/subscriptions","organizations_url":"https://api.github.com/users/mpollmeier/orgs","repos_url":"https://api.github.com/users/mpollmeier/repos","events_url":"https://api.github.com/users/mpollmeier/events{/privacy}","received_events_url":"https://api.github.com/users/mpollmeier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpollmeier/orientdb-gremlin","description":"TinkerPop3 Graph Structure Implementation for OrientDB","fork":false,"url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin","forks_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/forks","keys_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/teams","hooks_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/hooks","issue_events_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/events{/number}","events_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/events","assignees_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/assignees{/user}","branches_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/branches{/branch}","tags_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/tags","blobs_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/statuses/{sha}","languages_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/languages","stargazers_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/stargazers","contributors_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/contributors","subscribers_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/subscribers","subscription_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/subscription","commits_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/contents/{+path}","compare_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/merges","archive_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/downloads","issues_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues{/number}","pulls_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls{/number}","milestones_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/milestones{/number}","notifications_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/labels{/name}","releases_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/releases{/id}","deployments_url":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/deployments","created_at":"2015-06-18T01:44:23Z","updated_at":"2016-05-29T16:02:50Z","pushed_at":"2016-06-22T16:35:44Z","git_url":"git://github.com/mpollmeier/orientdb-gremlin.git","ssh_url":"git@github.com:mpollmeier/orientdb-gremlin.git","clone_url":"https://github.com/mpollmeier/orientdb-gremlin.git","svn_url":"https://github.com/mpollmeier/orientdb-gremlin","homepage":"","size":418,"stargazers_count":41,"watchers_count":41,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":10,"forks":14,"open_issues":10,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78"},"html":{"href":"https://github.com/mpollmeier/orientdb-gremlin/pull/78"},"issue":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/78"},"comments":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/mpollmeier/orientdb-gremlin/statuses/91ab9a32b1103521c8883df9dab72fce31d7c3c7"}}}}
{"actor":{"display_login":"velo"}}