Package org.springframework.data.mapping
Class FactoryMethod<T,P extends PersistentProperty<P>>
java.lang.Object
org.springframework.data.mapping.FactoryMethod<T,P>
- All Implemented Interfaces:
InstanceCreatorMetadata<P>
Value object to encapsulate the factory method to be used when mapping persistent data to objects.
- Since:
- 3.0
- Author:
- Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the underlyingConstructor
.Returns theParameter
s of the executable.boolean
isCreatorParameter
(PersistentProperty<?> property) Returns whether the givenPersistentProperty
is referenced in a creator argument of thePersistentEntity
backing thisInstanceCreatorMetadataSupport
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.data.mapping.InstanceCreatorMetadata
getParameterCount, hasParameters, isParentParameter
-
Constructor Details
-
FactoryMethod
- Parameters:
factoryMethod
- must not be null.parameters
- must not be null.
-
-
Method Details
-
getFactoryMethod
Returns the underlyingConstructor
.- Returns:
-
getParameters
Returns theParameter
s of the executable.- Specified by:
getParameters
in interfaceInstanceCreatorMetadata<T>
- Returns:
-
isCreatorParameter
Returns whether the givenPersistentProperty
is referenced in a creator argument of thePersistentEntity
backing thisInstanceCreatorMetadataSupport
.Results of this call are cached and reused on the next invocation. Calling this method for a
PersistentProperty
that was not yet added to its owningPersistentEntity
will capture that state and return the same result after addingPersistentProperty
to its entity.- Specified by:
isCreatorParameter
in interfaceInstanceCreatorMetadata<T>
- Parameters:
property
- must not be null.- Returns:
- true if the
PersistentProperty
is used in the creator.
-
toString
-