Class PersistentEntityProjector
java.lang.Object
org.springframework.data.rest.webmvc.support.DefaultExcerptProjector
org.springframework.data.rest.webmvc.support.PersistentEntityProjector
- All Implemented Interfaces:
ExcerptProjector
,Projector
Projector
looking up a projection by name for the given source type.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorDescriptionPersistentEntityProjector
(ProjectionDefinitions projectionDefinitions, ProjectionFactory factory, String projection, ResourceMappings mappings) Creates a newPersistentEntityProjector
using the givenProjectionDefinitions
,ProjectionFactory
and projection name. -
Method Summary
Methods inherited from class org.springframework.data.rest.webmvc.support.DefaultExcerptProjector
hasExcerptProjection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.rest.webmvc.support.ExcerptProjector
hasExcerptProjection
-
Constructor Details
-
PersistentEntityProjector
public PersistentEntityProjector(ProjectionDefinitions projectionDefinitions, ProjectionFactory factory, String projection, ResourceMappings mappings) Creates a newPersistentEntityProjector
using the givenProjectionDefinitions
,ProjectionFactory
and projection name.- Parameters:
projectionDefinitions
- must not be null.factory
- must not be null.projection
- can be empty.
-
-
Method Details
-
project
Description copied from interface:Projector
Returns the projection object for the given source. This may result in the same object being returned or a completely different acting as projection for the source. -
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
- Overrides:
projectExcerpt
in classDefaultExcerptProjector
- Parameters:
source
- must not be null.- Returns:
-