Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acs.damsel.srvr.db
Class Table  view Table download Table.java

java.lang.Object
  extended byorg.acs.damsel.srvr.db.Table

public class Table
extends java.lang.Object

Title: Abstracts SQL query result tables

Description: This class is used to handle the results of SQL queries made on the database. It can be used to process data in from the results of a table or out into methods using the results data. The entries in the table can also be sorted and accessed by rows, columns, or individual cells.

Version:
1.0

Field Summary
(package private)  java.util.Vector metaData
           
(package private)  java.util.Vector results
           
 
Constructor Summary
Table()
           
 
Method Summary
 java.util.Vector getCol(int index)
          Method returns vector of the specified column number
 java.util.Vector getCol(java.lang.String colName)
          Method returns vector of specified column name.
 int getColCount()
          Method returns the number of column in the table.
 java.util.Vector getMetaData()
           
 java.lang.String getMetaDataElement(int index)
          Returns the specified element from the metaData list (i.e., the list of column names).
 java.util.Vector getResults()
           
 java.lang.String getResultsElement(int row, int column)
          Returns a specific element from the result set given row and column indices.
 java.util.Vector getRow(int index)
          Method returns a vector of the specified row number
 int getRowCount()
          Method returns the number of rows in the table.
 int getSizeMetaData()
          Method returns the size of the vector containing the metadata elements stored in the table.
 boolean isEmpty()
          Method returns true if the table does not contain any elements, false otherwise.
 boolean isInResults(java.lang.String tag, java.lang.String searchItem)
          The method isInResults takes in the name of a tag and an item to search for and returns true if the item is under that tag or false otherwise.
 void orderBy(java.lang.String tagName)
          Orders this table by the specified tagName
private  void selectSort(int colNum)
           
 void setMetaData(java.util.Vector metaData)
           
 void setResults(java.util.Vector results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

java.util.Vector results

metaData

java.util.Vector metaData
Constructor Detail

Table

public Table()
Method Detail

getResultsElement

public java.lang.String getResultsElement(int row,
                                          int column)
Returns a specific element from the result set given row and column indices.


getMetaDataElement

public java.lang.String getMetaDataElement(int index)
Returns the specified element from the metaData list (i.e., the list of column names).


getRowCount

public int getRowCount()
Method returns the number of rows in the table.


getColCount

public int getColCount()
Method returns the number of column in the table.


isInResults

public boolean isInResults(java.lang.String tag,
                           java.lang.String searchItem)
The method isInResults takes in the name of a tag and an item to search for and returns true if the item is under that tag or false otherwise. For example, if you added an asset to the database with the title of "tester", you could call isInResults("Title","tester") and it would return true.


getSizeMetaData

public int getSizeMetaData()
Method returns the size of the vector containing the metadata elements stored in the table.


isEmpty

public boolean isEmpty()
Method returns true if the table does not contain any elements, false otherwise.


getRow

public java.util.Vector getRow(int index)
Method returns a vector of the specified row number


getCol

public java.util.Vector getCol(int index)
Method returns vector of the specified column number


getCol

public java.util.Vector getCol(java.lang.String colName)
Method returns vector of specified column name.


orderBy

public void orderBy(java.lang.String tagName)
             throws TagNameNotFoundException
Orders this table by the specified tagName


getMetaData

public java.util.Vector getMetaData()

getResults

public java.util.Vector getResults()

setMetaData

public void setMetaData(java.util.Vector metaData)

setResults

public void setResults(java.util.Vector results)

selectSort

private void selectSort(int colNum)