[ https://issues.apache.org/jira/browse/TINKERPOP-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133072#comment-15133072 ]
Marvin Froeder commented on TINKERPOP-1124: ------------------------------------------- This may also help on tinkerpop dsl > Make tinkerpop interfaces expandable > ------------------------------------ > > Key: TINKERPOP-1124 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1124 > Project: TinkerPop > Issue Type: Improvement > Components: structure > Affects Versions: 3.1.1-incubating > Reporter: Marvin Froeder > Fix For: 3.2.0-incubating > > > Make the return methods generic so we can specialize them. > For instance, instead of > {code:java} > public interface Graph { > public Iterator<Vertex> vertices(final Object... vertexIds); > } > {code} > move to > {code:java} > public interface Graph<V extends Vertex> { > public Iterator<V> vertices(final Object... vertexIds); > } > {code} > That way, orientdb-gremlin (or any other drivers) can expose custom > operations on graphs, vertex or edges and even enforce types for things like > Element.id() and many other creative stuff. > That is the way querydsl (http://www.querydsl.com/) found to have a > consistent api that can be extended and used in so many different modules. > This would allow orient-gremlin expose orient specific operations w/o having > to expose the implementation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)