|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.mapping.model.PersistentEntityParameterValueProvider<P>
public class PersistentEntityParameterValueProvider<P extends PersistentProperty<P>>
ParameterValueProvider
based on a PersistentEntity
to use a PropertyValueProvider
to lookup
the value of the property referenced by the given PreferredConstructor.Parameter
. Additionally a
DefaultSpELExpressionEvaluator
can be configured to get property value resolution trumped by a SpEL
expression evaluation.
Constructor Summary | |
---|---|
PersistentEntityParameterValueProvider(PersistentEntity<?,P> entity,
PropertyValueProvider<P> provider,
Object parent)
Creates a new PersistentEntityParameterValueProvider for the given PersistentEntity and
PropertyValueProvider . |
Method Summary | ||
---|---|---|
|
getParameterValue(PreferredConstructor.Parameter<T,P> parameter)
Returns the value to be used for the given PreferredConstructor.Parameter (usually when entity instances are created). |
|
void |
setSpELEvaluator(SpELExpressionEvaluator spELEvaluator)
Configures a DefaultSpELExpressionEvaluator to evaluate the SpEL Expression the PreferredConstructor.Parameter
potentially carries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistentEntityParameterValueProvider(PersistentEntity<?,P> entity, PropertyValueProvider<P> provider, Object parent)
PersistentEntityParameterValueProvider
for the given PersistentEntity
and
PropertyValueProvider
.
entity
- must not be null.provider
- must not be null.parent
- the parent object being created currently, can be null.Method Detail |
---|
public void setSpELEvaluator(SpELExpressionEvaluator spELEvaluator)
DefaultSpELExpressionEvaluator
to evaluate the SpEL Expression the PreferredConstructor.Parameter
potentially carries.
spELEvaluator
- public <T> T getParameterValue(PreferredConstructor.Parameter<T,P> parameter)
ParameterValueProvider
PreferredConstructor.Parameter
(usually when entity instances are created).
getParameterValue
in interface ParameterValueProvider<P extends PersistentProperty<P>>
parameter
- must not be null.
|
Spring Data Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |