javax.rad.model
Class TreePathFinder

java.lang.Object
  extended by javax.rad.model.TreePathFinder

public class TreePathFinder
extends Object

A TreePathFinder stores the primary key columns recursively for all master detail dependencies.


Constructor Summary
TreePathFinder(IChangeableDataRow pDataRow)
          Constructs a new TreePathFinder.
TreePathFinder(TreePathFinder pParentTreePathFinder, IChangeableDataRow pDataRow)
          Constructs a new TreePathFinder.
 
Method Summary
 TreePathFinder getChild(IChangeableDataRow pDataRow)
          Gets the child TreePathFinder to the given data row.
 IDataBook getDataBook()
          Gets the current DataBook the current DataBook.
 int getIndexOfPrimaryKey()
          Gets the index of the primary key in this node.
 TreePathFinder getParent()
          Gets the parent TreePathFinder.
 TreePathFinder getParentWithDataBook(IDataBook pDataBook)
          Gets the parent TreePathFinder which has the given IDataBook.
 Object[] getPrimaryKeyValues()
          Gets the primary key.
 TreePathFinder getRoot()
          Gets the root TreePathFinder.
 boolean selectTreePath()
          Selects this tree path in all IDataBook's specified by this TreePathFinder.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreePathFinder

public TreePathFinder(IChangeableDataRow pDataRow)
               throws ModelException
Constructs a new TreePathFinder.

Parameters:
pDataRow - the IChangeableDataRow
Throws:
ModelException - if an exception occurs.

TreePathFinder

public TreePathFinder(TreePathFinder pParentTreePathFinder,
                      IChangeableDataRow pDataRow)
               throws ModelException
Constructs a new TreePathFinder.

Parameters:
pParentTreePathFinder - the parent TreePathFinder.
pDataRow - the IChangeableDataRow
Throws:
ModelException - if an exception occurs.
Method Detail

getRoot

public TreePathFinder getRoot()
Gets the root TreePathFinder.

Returns:
the root TreePathFinder.

getParentWithDataBook

public TreePathFinder getParentWithDataBook(IDataBook pDataBook)
Gets the parent TreePathFinder which has the given IDataBook.

Parameters:
pDataBook - the databook to search
Returns:
the root TreePathFinder.

getParent

public TreePathFinder getParent()
Gets the parent TreePathFinder.

Returns:
the parent TreePathFinder.

getDataBook

public IDataBook getDataBook()
Gets the current DataBook the current DataBook.

Returns:
the row index.

getPrimaryKeyValues

public Object[] getPrimaryKeyValues()
Gets the primary key.

Returns:
the primary key.

getChild

public TreePathFinder getChild(IChangeableDataRow pDataRow)
                        throws ModelException
Gets the child TreePathFinder to the given data row.

Parameters:
pDataRow - the DataRow.
Returns:
the child TreePathFinder to the given data row.
Throws:
ModelException - if an exception occurs.

selectTreePath

public boolean selectTreePath()
                       throws ModelException
Selects this tree path in all IDataBook's specified by this TreePathFinder.

Returns:
true if the selection succeeded.
Throws:
ModelException - if an exception occurs.

getIndexOfPrimaryKey

public int getIndexOfPrimaryKey()
                         throws ModelException
Gets the index of the primary key in this node.

Returns:
the index of this primary key in this IDataBook.
Throws:
ModelException - if an exception occurs.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.