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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlyingConstructor.Returns theParameters of the executable.booleanisCreatorParameter(PersistentProperty<?> property) Returns whether the givenPersistentPropertyis referenced in a creator argument of thePersistentEntitybacking thisInstanceCreatorMetadataSupport.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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 theParameters of the executable.- Specified by:
getParametersin interfaceInstanceCreatorMetadata<T>- Returns:
-
isCreatorParameter
Returns whether the givenPersistentPropertyis referenced in a creator argument of thePersistentEntitybacking thisInstanceCreatorMetadataSupport.Results of this call are cached and reused on the next invocation. Calling this method for a
PersistentPropertythat was not yet added to its owningPersistentEntitywill capture that state and return the same result after addingPersistentPropertyto its entity.- Specified by:
isCreatorParameterin interfaceInstanceCreatorMetadata<T>- Parameters:
property- must not be null.- Returns:
- true if the
PersistentPropertyis used in the creator.
-
toString
-