Package org.apache.cayenne.access
Interface DeferredValue
- All Superinterfaces:
InternalUnsupportedTypeFactory.Marker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A value that is not known until a preceding row of the same transaction has been executed, e.g. a generated PK
propagated to a dependent PK or to a foreign key. Such a value is captured when a batch is planned and resolved
lazily via
resolve(Object) when the owning row is bound, after the rows it depends on have been executed.- Since:
- 5.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionget()Returns the current value, which may itself be anotherDeferredValue.static ObjectFully resolves a value that may be aDeferredValue, following nested chains all the way down.Methods inherited from interface org.apache.cayenne.access.types.InternalUnsupportedTypeFactory.Marker
errorMessage
-
Field Details
-
MAX_NESTED_LEVEL
static final int MAX_NESTED_LEVEL- See Also:
-
-
Method Details
-
get
Object get()Returns the current value, which may itself be anotherDeferredValue. Useresolve(Object)to collapse a full chain. -
resolve
Fully resolves a value that may be aDeferredValue, following nested chains all the way down. A value that is not aDeferredValueis returned as is. Throws if the chain does not terminate, guarding against a value that (incorrectly) resolves to itself.
-