private static class RepositionCache.Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.io.Serializable,RepositionCache.Node> |
children
Map of child nodes, indexed by their primary key IDs
|
private java.io.Serializable |
id
Primary key ID
|
private RepositionCache.Node |
parent
Parent node.
|
private int |
row
Zero-based index of virtual result set row
|
Constructor and Description |
---|
Node(RepositionCache.Node parent,
java.io.Serializable id,
int row)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) RepositionCache.Node |
findChild(java.io.Serializable id)
Find the child node associated with the given primary key ID.
|
(package private) int |
getChildCount()
Get the number of children.
|
(package private) RepositionCache.Node |
getParent()
Get parent node.
|
(package private) int |
getRow()
Get the row index associated with this node.
|
(package private) void |
putChild(RepositionCache.Node child)
Add a child node representing a record associated with this node's
record by a database (right) join.
|
(package private) void |
removeChild(RepositionCache.Node child)
Remove the specified child node,
|
void |
setRow(int row)
Set the row index associated with this node.
|
java.lang.String |
toString()
Produce a string representation of the node, which includes the
primary key and associated row number.
|
private final java.io.Serializable id
private int row
private final java.util.Map<java.io.Serializable,RepositionCache.Node> children
private final RepositionCache.Node parent
Node(RepositionCache.Node parent, java.io.Serializable id, int row)
parent
- Parent node or null
if it is the root node.id
- Primary key ID.row
- Zero-based index of virtual result set row.public java.lang.String toString()
toString
in class java.lang.Object
int getRow()
public void setRow(int row)
row
- Row index associated with this node.void putChild(RepositionCache.Node child)
child
- Node to add to this node's children.RepositionCache.Node findChild(java.io.Serializable id)
id
- Primary key of child node's record.null
if none exists.void removeChild(RepositionCache.Node child)
child
- Child node to remove,int getChildCount()
RepositionCache.Node getParent()