Thank you David for the exaustive reply.
I know I am not very good in exposing my doubts.
What I try to figure out is how to get rid of Tinkerpop 2 Frames that is the way we implemented our domain model interfaces, with the new Tinkerpop 3 (or should I wait for version 4? LOL).
Here is a simple example of what we have:
public interface UserEntity extends NameableDomainEntity {
String getUsername();
void setUsername(String username);
Iterable<GroupEntity> getGroups();
}
public class UserEntityImpl extends AbstractNameableFramedDelegate<UserFrame> implements UserEntity {
protected UserEntityImpl(UserFrame f) {
super(f);
}
public String getUsername() {
return (getDelegate() != null) ? getDelegate().getUsername() : null;
}
public Iterable<GroupEntity> getGroups() {
return (getDelegate() != null) ? IdentityMapper.mapToIterableGroupEntity(getDelegate().getGroups()) : null;
}
}
@TypeValue(UserFrame._TYPEVALUE)
public interface UserFrame extends NameableDomainFrame {
final String _TYPEVALUE = "user";
final String USERNAME = "username";
final String IS_MEMBER_OF = "is_member_of";
@Property(USERNAME)
String getUsername;
@Adjacency(label=IS_MEMBER_OF)
public Iterable<GroupFrame> getGroups();
}
Now, I would like to replace the class UserFrame with a Tinkerpop 3 implementation and my doubts are: should I write plain gremlin queries for each method? Should I go with the Remote Server, create DSL o something else? What about mutations and transactions? Will I eventually end up writing code as we used to do back to the ugly JDBC days?