@Test public void testMakeSubDocQuery() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")); DBObject parentQuery = underTest.subDoc("studentSectionAssociation").toSubDocQuery(originalQuery, true); DBObject childQuery = underTest.subDoc("studentSectionAssociation").toSubDocQuery(originalQuery, false); assertEquals("someValue", parentQuery.get("studentSectionAssociation.someProperty")); assertEquals("parent_id", parentQuery.get("_id")); assertEquals("parent_idchild", parentQuery.get("studentSectionAssociation._id")); assertEquals("someValue", childQuery.get("studentSectionAssociation.someProperty")); assertEquals("parent_idchild", childQuery.get("studentSectionAssociation._id")); assertNotNull(childQuery.get("_id")); }
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String parentColl, Map<String, String> lookup, String subField); boolean isSubDoc(String docType); Location subDoc(String docType); static void main(String[] args); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String parentColl, Map<String, String> lookup, String subField); boolean isSubDoc(String docType); Location subDoc(String docType); static void main(String[] args);  }