T - The type of the context object itself.U - The base type of the business object associated with the context.public interface BreadcrumbContextI<T extends BreadcrumbContextI<T,U>,U extends BOI>
This interface defines the fundamental traversal methods and provides default implementations for finding business objects by walking up the context chain.
| Modifier and Type | Method and Description |
|---|---|
default U |
findFirstBO()
Finds the first business object of any parent context in the chain, returning the value directly.
|
default <V extends U> |
findFirstBOOfType(java.lang.Class<V> objectType)
Finds the first business object of a specific type in the parent context chain, returning the value directly.
|
default U |
findFirstBOWhere(java.util.function.Predicate<U> predicate)
Finds the first business object of any parent context that fulfills a given predicate, returning the value directly.
|
default U |
findParentBO()
Finds the business object of the immediate parent context, returning the value directly.
|
U |
getContextBO()
Gets the associated business object for this specific context, returning the value directly.
|
T |
getParentBreadcrumbContext()
Gets the parent context of the current context, returning the value directly.
|
T getParentBreadcrumbContext()
null if there is no parent.U getContextBO()
null if this context has no business object.default U findParentBO()
This is a convenience default method that walks one step up the chain.
null if not found.default U findFirstBO()
This is a convenience default method that finds the first non-null business object in the parent chain.
null if none are found.default <V extends U> V findFirstBOOfType(java.lang.Class<V> objectType)
This is a convenience default method that walks the chain and casts the first matching object.
V - The specific type of the object.objectType - The Class of the business object you are looking for.null if not found.default U findFirstBOWhere(java.util.function.Predicate<U> predicate)
This is the core traversal logic that walks up the breadcrumb chain.
predicate - A Predicate to test the business object.null if not found.Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.