org.openxava.web.editors
Class TreeViewReaderImpl

java.lang.Object
  extended by org.openxava.web.editors.TreeViewReaderImpl
All Implemented Interfaces:
ITreeViewReader

public class TreeViewReaderImpl
extends java.lang.Object
implements ITreeViewReader

Implements the Tree view reader

Author:
Federico Alcantara

Constructor Summary
TreeViewReaderImpl()
           
 
Method Summary
 void close()
          Ends the process of reading
 java.lang.Object getObjectAt(int rowIndex)
          Returns the object representing the column
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Retrieves the object value found at row / column
 void initialize(java.lang.String parentModelName, java.util.Map parentKey, java.lang.String collectionModelName, java.util.Map[] allKeys, java.lang.String[] columnNames)
          Initializes the reader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeViewReaderImpl

public TreeViewReaderImpl()
Method Detail

initialize

public void initialize(java.lang.String parentModelName,
                       java.util.Map parentKey,
                       java.lang.String collectionModelName,
                       java.util.Map[] allKeys,
                       java.lang.String[] columnNames)
Description copied from interface: ITreeViewReader
Initializes the reader

Specified by:
initialize in interface ITreeViewReader
Parameters:
parentModelName - name of the parent model of the collection
parentKey - key for the parent object
collectionModelName - name of the collection model
allKeys - all the keys to be read from the collection
columnNames - name of the columns in their column order.
See Also:
org.openxava.web.editors.ITreeViewReader#initialize(java.lang.String, java.lang.String[], java.util.Map, java.util.Map[])

close

public void close()
           throws java.lang.Exception
Description copied from interface: ITreeViewReader
Ends the process of reading

Specified by:
close in interface ITreeViewReader
Throws:
java.lang.Exception
See Also:
ITreeViewReader.close()

getObjectAt

public java.lang.Object getObjectAt(int rowIndex)
                             throws java.lang.Exception
Description copied from interface: ITreeViewReader
Returns the object representing the column

Specified by:
getObjectAt in interface ITreeViewReader
Parameters:
rowIndex - index of the row to read
Returns:
Throws:
java.lang.Exception
See Also:
org.openxava.web.editors.ITreeViewReader#getRowObject()

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
                            throws java.lang.Exception
Description copied from interface: ITreeViewReader
Retrieves the object value found at row / column

Specified by:
getValueAt in interface ITreeViewReader
Returns:
the object
Throws:
java.lang.Exception
See Also:
ITreeViewReader.getValueAt(int, int)