@Test(expected = ViewGenerationException.class) public void viewGenerationException_should_be_thrown_when_field_is_of_unsupported_type() { gen.generateViewsFromPersistentType(ListRefDoc.class); }
public Map<String, DesignDocument.View> generateViewsFromPersistentType( final Class<?> persistentType) { Assert.notNull(persistentType, "persistentType may not be null"); final Map<String, DesignDocument.View> views = new HashMap<String, DesignDocument.View>(); createDeclaredViews(views, persistentType); eachField(persistentType, new Predicate<Field>() { public boolean apply(Field input) { if (hasAnnotation(input, DocumentReferences.class)) { generateView(views, input); } return false; } }); return views; }
SimpleViewGenerator { public Map<String, DesignDocument.View> generateViewsFromPersistentType( final Class<?> persistentType) { Assert.notNull(persistentType, "persistentType may not be null"); final Map<String, DesignDocument.View> views = new HashMap<String, DesignDocument.View>(); createDeclaredViews(views, persistentType); eachField(persistentType, new Predicate<Field>() { public boolean apply(Field input) { if (hasAnnotation(input, DocumentReferences.class)) { generateView(views, input); } return false; } }); return views; } }
SimpleViewGenerator { public Map<String, DesignDocument.View> generateViewsFromPersistentType( final Class<?> persistentType) { Assert.notNull(persistentType, "persistentType may not be null"); final Map<String, DesignDocument.View> views = new HashMap<String, DesignDocument.View>(); createDeclaredViews(views, persistentType); eachField(persistentType, new Predicate<Field>() { public boolean apply(Field input) { if (hasAnnotation(input, DocumentReferences.class)) { generateView(views, input); } return false; } }); return views; }  }
SimpleViewGenerator { public Map<String, DesignDocument.View> generateViewsFromPersistentType( final Class<?> persistentType) { Assert.notNull(persistentType, "persistentType may not be null"); final Map<String, DesignDocument.View> views = new HashMap<String, DesignDocument.View>(); createDeclaredViews(views, persistentType); eachField(persistentType, new Predicate<Field>() { public boolean apply(Field input) { if (hasAnnotation(input, DocumentReferences.class)) { generateView(views, input); } return false; } }); return views; }  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 Map<String, DesignDocument.View> generateViewsFromPersistentType( final Class<?> persistentType) { Assert.notNull(persistentType, "persistentType may not be null"); final Map<String, DesignDocument.View> views = new HashMap<String, DesignDocument.View>(); createDeclaredViews(views, persistentType); eachField(persistentType, new Predicate<Field>() { public boolean apply(Field input) { if (hasAnnotation(input, DocumentReferences.class)) { generateView(views, input); } return false; } }); return views; }  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);  }