Class DefaultExcerptProjector
java.lang.Object
org.springframework.data.rest.webmvc.support.DefaultExcerptProjector
- All Implemented Interfaces:
ExcerptProjector
- Direct Known Subclasses:
PersistentEntityProjector
DefaultedPageable
implementation of ExcerptProjector
that uses the given ProjectionFactory
and considers the given ResourceMappings
.- Since:
- 2.5
- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionDefaultExcerptProjector
(ProjectionFactory factory, ResourceMappings mappings) -
Method Summary
Modifier and TypeMethodDescriptionboolean
hasExcerptProjection
(Class<?> type) Returns whether an excerpt projection has been registered for the given type.projectExcerpt
(Object source) Creates a excerpt projection for the given source.
-
Constructor Details
-
DefaultExcerptProjector
-
-
Method Details
-
projectExcerpt
Description copied from interface:ExcerptProjector
Creates a excerpt projection for the given source. If no excerpt projection is available, the object will be returned as is. If you completely wish to skip handling the object, check for the presence of an excerpt projection usingExcerptProjector.hasExcerptProjection(Class)
.- Specified by:
projectExcerpt
in interfaceExcerptProjector
- Parameters:
source
- must not be null.- Returns:
-
hasExcerptProjection
Description copied from interface:ExcerptProjector
Returns whether an excerpt projection has been registered for the given type.- Specified by:
hasExcerptProjection
in interfaceExcerptProjector
- Parameters:
type
- must not be null.- Returns:
-