@Test public void testPrepareMutationWithValidRelationship(){ TartanImplTestUtil util = new TartanImplTestUtil(); Entity.ID sourceEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); Entity.ID targetEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_CHILD_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); Name attributeName = TartanImplTestConstants.ATTR_DUMMY_ATTRIBUTE_NAME; String attributeValue = "Dummy Attribute"; Metadata metadata = new MockMetadata(); GraphAttribute graphAttribute = new GraphAttribute(attributeName, attributeValue, metadata); GraphRelationship graphRelationship = util.buildGraphRelationship( TartanImplTestConstants.ATTR_DUMMY_RELATIONSHIP_NAME, sourceEntityID, targetEntityID, graphAttribute); MockGraphPersistence graphPersistence = createGraphPersistence(); Relationship.Mutation mutation = graphPersistence.prepareMutation(graphRelationship); assertNotNull(mutation); }
@Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); @Override ID allocateID(); @Override Queries.LookupQuery lookup(); @Override Queries.GraphQuery queryGraph(); @Override Entity.Mutation prepareMutation(Entity entity); @Override Relationship.Mutation prepareMutation(Relationship relationship); @Override Predicate predicates(); @Override BatchMutation prepareBatchMutation(); }
AbstractGraphPersistence implements Persistence { @Override public Entity.Mutation prepareMutation(Entity entity) { Preconditions.argumentNotNull(entity, "entity::"+Entity.class.getName()); GraphMutation GraphMutation = new GraphMutation(factory); return GraphMutation.withEntity(entity); } protected  AbstractGraphPersistence(GraphVisitor repository,
            MutationExecutorFactory factory); @Override ID allocateID(); @Override Queries.LookupQuery lookup(); @Override Queries.GraphQuery queryGraph(); @Override Entity.Mutation prepareMutation(Entity entity); @Override Relationship.Mutation prepareMutation(Relationship relationship); @Override Predicate predicates(); @Override BatchMutation prepareBatchMutation();  }