|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erif.util.DbTree
Field Summary | |
protected long |
depth
|
protected long |
forestid
|
protected long |
id
|
protected long |
left
|
protected long |
right
|
protected long |
treeid
|
Constructor Summary | |
DbTree()
|
Method Summary | |
DbTree |
addNode(long id,
java.sql.Connection conn)
|
static DbTree |
create(long id,
java.sql.Connection conn)
|
static DbTree |
create(long forestid,
long id,
java.sql.Connection conn)
|
boolean |
equals(java.lang.Object o)
|
DbTree[] |
getChildren(java.sql.Connection conn)
returns all nodes "below" the given node |
long |
getChildrenCount()
|
long |
getDepth()
|
DbTree[] |
getDirectChildren(java.sql.Connection conn)
returns all nodes "below" the given node |
long |
getForestId()
|
long |
getId()
|
long |
getLeft()
|
DbTree[] |
getParents(java.sql.Connection conn)
returns all nodes "above" the given node |
static long[] |
getRefIds(DbTree[] treenodes)
|
static java.util.Hashtable |
getReverseHash(DbTree[] treenodes)
returns a hash from refid to the actual DbTree node |
long |
getRight()
|
static DbTree[] |
getThread(long treeid,
java.sql.Connection conn)
returns the thread of treeid in the default forest |
static DbTree[] |
getThread(long forestid,
long treeid,
java.sql.Connection conn)
returns the thread of treeid in the given forest |
static DbTree[] |
getTopLevel(java.sql.Connection conn)
|
static DbTree[] |
getTopLevel(long forestid,
java.sql.Connection conn)
|
static DbTree |
getTopOfThread(long id,
java.sql.Connection conn)
returns the "top" treenode for the given refid for the default forest |
static DbTree |
getTopOfThread(long forestid,
long id,
java.sql.Connection conn)
returns the "top" treenode for the given refid and forest |
static DbTree |
getTree(long id,
java.sql.Connection conn)
returns treenode for the given refid for the default forest |
static DbTree |
getTree(long forestid,
long id,
java.sql.Connection conn)
returns treenode for the given refid and forest |
long |
getTreeId()
|
void |
init(java.sql.ResultSet rs)
|
void |
remove(java.sql.Connection conn)
removes the given node (nodes need to be unique to their tree, else ALL references will be removed when one is, and things won't update properly). |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected long forestid
protected long treeid
protected long id
protected long left
protected long right
protected long depth
Constructor Detail |
public DbTree()
Method Detail |
public long getForestId()
public long getTreeId()
public long getDepth()
public long getLeft()
public long getRight()
public long getId()
public long getChildrenCount()
public DbTree[] getParents(java.sql.Connection conn) throws java.sql.SQLException
public DbTree[] getDirectChildren(java.sql.Connection conn) throws java.sql.SQLException
public DbTree[] getChildren(java.sql.Connection conn) throws java.sql.SQLException
public void remove(java.sql.Connection conn) throws java.sql.SQLException
public static DbTree create(long id, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree create(long forestid, long id, java.sql.Connection conn) throws java.sql.SQLException
public DbTree addNode(long id, java.sql.Connection conn) throws java.sql.SQLException
public void init(java.sql.ResultSet rs) throws java.sql.SQLException
public static DbTree getTree(long id, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree getTree(long forestid, long id, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree getTopOfThread(long id, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree getTopOfThread(long forestid, long id, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree[] getThread(long treeid, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree[] getThread(long forestid, long treeid, java.sql.Connection conn) throws java.sql.SQLException
public static DbTree[] getTopLevel(java.sql.Connection conn) throws java.sql.SQLException
public static DbTree[] getTopLevel(long forestid, java.sql.Connection conn) throws java.sql.SQLException
public static long[] getRefIds(DbTree[] treenodes)
public static java.util.Hashtable getReverseHash(DbTree[] treenodes)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |