|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.util.overview.loader.AutoChildNodeLoader<I>
public class AutoChildNodeLoader<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.
Field Summary | |
---|---|
private NodeLoader<I> |
parent
|
Constructor Summary | |
---|---|
AutoChildNodeLoader(NodeLoader<I> parent)
|
Method Summary | |
---|---|
Node |
createForwardNode(DbControl dc,
OverviewContext context,
Node parentNode)
Call the same method on the 'parent' node loader. |
Node |
createPropertyNode(DbControl dc,
OverviewContext context,
Node parentNode)
Call the same method on the 'parent' node loader. |
Node |
createReverseNode(DbControl dc,
OverviewContext context,
Node childNode)
Call the same method on the 'parent' node loader. |
Node |
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final NodeLoader<I> parent
Constructor Detail |
---|
public AutoChildNodeLoader(NodeLoader<I> parent)
Method Detail |
---|
public Node createForwardNode(DbControl dc, OverviewContext context, Node parentNode)
loadChildNodes(DbControl, OverviewContext, Node)
is called
on the new node.
createForwardNode
in interface NodeLoader<I>
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node
public Node createPropertyNode(DbControl dc, OverviewContext context, Node parentNode)
loadChildNodes(DbControl, OverviewContext, Node)
is called
on the new node.
createPropertyNode
in interface NodeLoader<I>
dc
- The DbControl to use for database accesscontext
- The overview contextparentNode
- The parent node
public Node createReverseNode(DbControl dc, OverviewContext context, Node childNode)
loadChildNodes(DbControl, OverviewContext, Node)
is called
on the new node.
createReverseNode
in interface NodeLoader<I>
dc
- The DbControl to use for database accesscontext
- The overview contextchildNode
- The child node
public Node createRootNode(DbControl dc, OverviewContext context, I item)
loadChildNodes(DbControl, OverviewContext, Node)
is called
on the new node.
createRootNode
in interface NodeLoader<I>
dc
- The DbControl to use for database accesscontext
- The overview contextitem
- The root item
public boolean loadChildNodes(DbControl dc, OverviewContext context, Node node)
loadChildNodes
in interface NodeLoader<I>
dc
- The DbControl to use for database accesscontext
- The overview contextnode
- The node
public String toString()
toString
in class Object
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |