Class AutoChildNodeLoader<I>
java.lang.Object
net.sf.basedb.util.overview.loader.AutoChildNodeLoader<I>
- All Implemented Interfaces:
NodeLoader<I>
Node loader implementation that automatically loads child nodes.
When any of the
create...
methods are called the actual
node loading is delegated to a parent node loader. If this loader returns
a non-null node, loadChildNodes(DbControl, OverviewContext, Node)
is automatically invoked on it.
The automatic loading can of course only be done one step down, since
the new children probably needs a different parent node loader. It is
possible to make the loading fully recursive by if the NodeLoaderFactory
returned from OverviewContext.getNodeLoaderFactory()
wrap all node loaders it create by an instance of this class.
- Version:
- 2.10
- Author:
- Nicklas
- Last modified
- $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateForwardNode
(DbControl dc, OverviewContext context, Node parentNode) Call the same method on the 'parent' node loader.createPropertyNode
(DbControl dc, OverviewContext context, Node parentNode) Call the same method on the 'parent' node loader.createReverseNode
(DbControl dc, OverviewContext context, Node childNode) Call the same method on the 'parent' node loader.createRootNode
(DbControl dc, OverviewContext context, I item) Call the same method on the 'parent' node loader.boolean
loadChildNodes
(DbControl dc, OverviewContext context, Node node) Call the same method on the 'parent' node loader.toString()
-
Field Details
-
parent
-
-
Constructor Details
-
AutoChildNodeLoader
-
-
Method Details
-
createForwardNode
Call the same method on the 'parent' node loader. If one or more child nodes are added to the parent node, theloadChildNodes(DbControl, OverviewContext, Node)
is called for each of the new nodes.- Specified by:
createForwardNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The node that the parent node loader creates (may be null)
-
createPropertyNode
Call the same method on the 'parent' node loader. If one or more child nodes are added to the parent node, theloadChildNodes(DbControl, OverviewContext, Node)
is called for each of the new nodes.- Specified by:
createPropertyNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node- Returns:
- The node that the parent node loader creates (may be null)
-
createReverseNode
Call the same method on the 'parent' node loader. If one or more child nodes are added to the parent node, theloadChildNodes(DbControl, OverviewContext, Node)
is called for each of the new nodes.- Specified by:
createReverseNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextchildNode
- The child node- Returns:
- The node that the parent node loader creates (may be null)
-
createRootNode
Call the same method on the 'parent' node loader. If a node is createdloadChildNodes(DbControl, OverviewContext, Node)
is called on the new node.- Specified by:
createRootNode
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextitem
- The root item- Returns:
- The node that the parent node loader creates (may be null)
-
loadChildNodes
Call the same method on the 'parent' node loader.- Specified by:
loadChildNodes
in interfaceNodeLoader<I>
- Parameters:
dc
- The DbControl to use for database accesscontext
- The overview contextnode
- The node- Returns:
- The result of the parent call
-
toString
-