com.ge.grc.acuity.actions.mapping
Class ColumnOrderTableMappingFunction

java.lang.Object
  extended bycom.ge.grc.acuity.actions.mapping.ColumnOrderTableMappingFunction
All Implemented Interfaces:
ListMappingFunction
Direct Known Subclasses:
PropertyTableMappingFunction

public class ColumnOrderTableMappingFunction
extends java.lang.Object
implements ListMappingFunction


Constructor Summary
ColumnOrderTableMappingFunction()
           
 
Method Summary
 boolean hasDataseriesOutput()
          Returns true if the return value from the com.ge.grc.acuity.actions.mapping.ListMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains data suitable for constructing a dataseries.
 boolean hasTableOutput()
          Returns true if the return value from the com.ge.grc.acuity.actions.mapping.ListMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains data suitable for constructing a table.
 java.util.List[] process(sun.jdbc.rowset.CachedRowSet crs, java.util.Map parameters)
           
 java.util.List[] process(java.util.List[] data, java.util.Map parameters)
          Call this method to transform the data from row-records to column-records.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnOrderTableMappingFunction

public ColumnOrderTableMappingFunction()
Method Detail

hasDataseriesOutput

public boolean hasDataseriesOutput()
Description copied from interface: ListMappingFunction
Returns true if the return value from the com.ge.grc.acuity.actions.mapping.ListMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains data suitable for constructing a dataseries. The first element of the array would be a list of names of the dataseries. Each subsequent element of the returned array would represent a dataseries. The List preserves the order of the ResultSet, and each element of the List would contain Map objects. The Map would contain attribute keys such as xMin, xMax, yMin, yMax, xMinLabel, xMaxLabel, yMinLabel, yMaxLabel

Specified by:
hasDataseriesOutput in interface ListMappingFunction
Returns:
true if the return value of the ResultSetMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains dataseries information; false otherwise.

hasTableOutput

public boolean hasTableOutput()
Description copied from interface: ListMappingFunction
Returns true if the return value from the com.ge.grc.acuity.actions.mapping.ListMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains data suitable for constructing a table. The first element of the array would be a list of column headings of the data table. Each subsequent element of the returned array would represent a table row. Within each table row would be a list representing each column of that row. Within each column would be an object array, with the zero-index element being the data for that row-column pair, and the one-index element being the decorator to apply to that row-column pair.

Specified by:
hasTableOutput in interface ListMappingFunction
Returns:
true if the return value of the ResultSetMappingFunction#process(java.sql.ResultSet, java.util.Map) method contains table information; false otherwise.

process

public java.util.List[] process(sun.jdbc.rowset.CachedRowSet crs,
                                java.util.Map parameters)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

process

public java.util.List[] process(java.util.List[] data,
                                java.util.Map parameters)
Call this method to transform the data from row-records to column-records. Example: [{a,b,c},{{1,2,3},{4,5,6}}] -> [{Name, Value 1, Value2},{{a,1,4},{b,2,5},{c,3,6}}]

Specified by:
process in interface ListMappingFunction
Parameters:
parameters - the mapping parameters by which to manipulate the ResultSet data
Returns:
an array of List objects containing the mapped elements of the processed data from the ResultSet. The details of the List contents are described by the ListMappingFunction.hasDataseriesOutput() and ListMappingFunction.hasTableOutput() methods.
Throws:
AcuityException
See Also:
ListMappingFunction.hasDataseriesOutput(), ListMappingFunction.hasTableOutput()