com.fdsapi.arrays
Class SelectColsParser

java.lang.Object
  |
  +--com.fdsapi.arrays.SelectColsParser

public class SelectColsParser
extends java.lang.Object

Class that parses the select columns passed to ArraySQL and translates the String to calls to the ArrayFilter. For example it could take: col0, col1, col2, *. This class is not thread safe.



View Code


Constructor Summary
SelectColsParser(java.lang.Object[][] data, java.lang.String selectColsStr)
           
SelectColsParser(java.lang.Object[][] data, java.lang.String selectColsStr, ArrayFilter arrayFilter)
           
 
Method Summary
 void addSelectCol(java.lang.String colValue)
          Add a single select column such as col0 or fname to the ArrayFilter
 void addSelectCols()
          Parses the String passed to the constructor and calls the appropriate ArrayFilter function to add the columns to the display list
 ArrayFilter getArrayFilter()
          Get the ArrayFilter that backs this object
static java.lang.String getSelectCols(java.lang.String query)
          Get the select column list from a full query such as: select col1, col2, * from array.
static void main(java.lang.String[] args)
          Method that has testing code for this class.
 java.lang.String[] parse()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectColsParser

public SelectColsParser(java.lang.Object[][] data,
                        java.lang.String selectColsStr,
                        ArrayFilter arrayFilter)

SelectColsParser

public SelectColsParser(java.lang.Object[][] data,
                        java.lang.String selectColsStr)
Method Detail

addSelectCols

public void addSelectCols()
Parses the String passed to the constructor and calls the appropriate ArrayFilter function to add the columns to the display list


addSelectCol

public void addSelectCol(java.lang.String colValue)
Add a single select column such as col0 or fname to the ArrayFilter


parse

public java.lang.String[] parse()

getArrayFilter

public ArrayFilter getArrayFilter()
Get the ArrayFilter that backs this object


getSelectCols

public static java.lang.String getSelectCols(java.lang.String query)
Get the select column list from a full query such as: select col1, col2, * from array. This would return col1, col2, *


main

public static void main(java.lang.String[] args)
Method that has testing code for this class. Click the 'View Code' link above to see the code