@Test public void testGenerateFindByView() { DesignDocument.View v = gen.generateFindByView("name", ""); assertEquals(expectedFindByNameMapFunction, v.getMap()); }
public DesignDocument.View generateFindByView(String propertyName, String typeDiscriminator) { String selector = typeDiscriminator.length() > 0 ? typeDiscriminator + " && doc." + propertyName : "doc." + propertyName; return new DesignDocument.View(String.format( LOOKUP_BY_PROPERTY_TEMPLATE, selector, propertyName)); }
SimpleViewGenerator { public DesignDocument.View generateFindByView(String propertyName, String typeDiscriminator) { String selector = typeDiscriminator.length() > 0 ? typeDiscriminator + " && doc." + propertyName : "doc." + propertyName; return new DesignDocument.View(String.format( LOOKUP_BY_PROPERTY_TEMPLATE, selector, propertyName)); } }
SimpleViewGenerator { public DesignDocument.View generateFindByView(String propertyName, String typeDiscriminator) { String selector = typeDiscriminator.length() > 0 ? typeDiscriminator + " && doc." + propertyName : "doc." + propertyName; return new DesignDocument.View(String.format( LOOKUP_BY_PROPERTY_TEMPLATE, selector, propertyName)); }  }
SimpleViewGenerator { public DesignDocument.View generateFindByView(String propertyName, String typeDiscriminator) { String selector = typeDiscriminator.length() > 0 ? typeDiscriminator + " && doc." + propertyName : "doc." + propertyName; return new DesignDocument.View(String.format( LOOKUP_BY_PROPERTY_TEMPLATE, selector, propertyName)); }  DesignDocument.View generateFindByView(String propertyName,
			String typeDiscriminator); DesignDocument.View generateFindByIterableView(String propertyName,
			String typeDiscriminator); DesignDocument.View generateDocRefsAsSetWithOrderByView(
			String backRef, String fieldName, String orderBy,
			String typeDiscriminator); DesignDocument.View generateDocRefsAsSetView(String backRef,
			String fieldName, String typeDiscriminator); Map<String, DesignDocument.View> generateViews(
			final Object repository); Map<String, DesignDocument.View> generateViewsFromPersistentType(
			final Class<?> persistentType); boolean shouldLoadFunctionFromClassPath(String function); static DesignDocument.View loadViewFromString(ObjectMapper objectMapper, String json); }
SimpleViewGenerator { public DesignDocument.View generateFindByView(String propertyName, String typeDiscriminator) { String selector = typeDiscriminator.length() > 0 ? typeDiscriminator + " && doc." + propertyName : "doc." + propertyName; return new DesignDocument.View(String.format( LOOKUP_BY_PROPERTY_TEMPLATE, selector, propertyName)); }  DesignDocument.View generateFindByView(String propertyName,
			String typeDiscriminator); DesignDocument.View generateFindByIterableView(String propertyName,
			String typeDiscriminator); DesignDocument.View generateDocRefsAsSetWithOrderByView(
			String backRef, String fieldName, String orderBy,
			String typeDiscriminator); DesignDocument.View generateDocRefsAsSetView(String backRef,
			String fieldName, String typeDiscriminator); Map<String, DesignDocument.View> generateViews(
			final Object repository); Map<String, DesignDocument.View> generateViewsFromPersistentType(
			final Class<?> persistentType); boolean shouldLoadFunctionFromClassPath(String function); static DesignDocument.View loadViewFromString(ObjectMapper objectMapper, String json);  }