@Test public void testBuildId() { Map<String, Object> map = new HashMap<>(); map.put("id", 12); map.put("type", "artist"); DocumentId buildId = builder.buildId(map); Assert.assertEquals("id: 12", buildId.toCypherFilter()); }
@Override public DocumentId buildId(Map<String,Object> obj) { Object idObj = obj.get(DocumentIdId.ID); Validate.notNull(idObj, "every object must have "+DocumentIdTypeId.ID+": "+obj); return new DocumentIdId(idObj); }
DocumentIdBuilderId implements DocumentIdBuilder { @Override public DocumentId buildId(Map<String,Object> obj) { Object idObj = obj.get(DocumentIdId.ID); Validate.notNull(idObj, "every object must have "+DocumentIdTypeId.ID+": "+obj); return new DocumentIdId(idObj); } }
DocumentIdBuilderId implements DocumentIdBuilder { @Override public DocumentId buildId(Map<String,Object> obj) { Object idObj = obj.get(DocumentIdId.ID); Validate.notNull(idObj, "every object must have "+DocumentIdTypeId.ID+": "+obj); return new DocumentIdId(idObj); }  }
DocumentIdBuilderId implements DocumentIdBuilder { @Override public DocumentId buildId(Map<String,Object> obj) { Object idObj = obj.get(DocumentIdId.ID); Validate.notNull(idObj, "every object must have "+DocumentIdTypeId.ID+": "+obj); return new DocumentIdId(idObj); }  @Override DocumentId buildId(Map<String,Object> obj); @Override void init(Map<String, String> configuration); }
DocumentIdBuilderId implements DocumentIdBuilder { @Override public DocumentId buildId(Map<String,Object> obj) { Object idObj = obj.get(DocumentIdId.ID); Validate.notNull(idObj, "every object must have "+DocumentIdTypeId.ID+": "+obj); return new DocumentIdId(idObj); }  @Override DocumentId buildId(Map<String,Object> obj); @Override void init(Map<String, String> configuration);  }