public static class SelfPointingTestEntity {
private String foo;
private SelfPointingTestEntity self;
public SelfPointingTestEntity() {
super();
}
}
final ArangoDB.Builder builder = new ArangoDB.Builder().registerDeserializer(SelfPointingTestEntity.class,
new VPackDeserializer<SelfPointingTestEntity>() {
@Override
public SelfPointingTestEntity deserialize(
final VPackSlice parent,
final VPackSlice vpack,
final VPackDeserializationContext context) throws VPackException {
final SelfPointingTestEntity entity = new SelfPointingTestEntity();
entity.foo = vpack.get("foo").getAsString();
entity.self = entity;
return entity;
}
});