Constructor and Description |
---|
PersistentEntityProjector(ProjectionDefinitions projectionDefinitions,
ProjectionFactory factory,
String projection,
ResourceMappings mappings)
Creates a new
PersistentEntityProjector using the given ProjectionDefinitions ,
ProjectionFactory and projection name. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasExcerptProjection(Class<?> type)
Returns whether an excerpt projection has been registered for the given type.
|
Object |
project(Object source)
Returns the projection object for the given source.
|
Object |
projectExcerpt(Object source)
Creates a excerpt projection for the given source.
|
public PersistentEntityProjector(ProjectionDefinitions projectionDefinitions, ProjectionFactory factory, String projection, ResourceMappings mappings)
PersistentEntityProjector
using the given ProjectionDefinitions
,
ProjectionFactory
and projection name.projectionDefinitions
- must not be null.factory
- must not be null.projection
- can be empty.public Object project(Object source)
Projector
public Object projectExcerpt(Object source)
Projector
Projector.project(Object)
. If you completely wish to skip handling the object, check for the
presence of an excerpt projection using Projector.hasExcerptProjection(Class)
.projectExcerpt
in interface Projector
source
- must not be null.public boolean hasExcerptProjection(Class<?> type)
Projector
hasExcerptProjection
in interface Projector
type
- must not be null.Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.