Docmosis API 4.5.0

com.docmosis.template.population
Class DataProviderSQLGrouping

java.lang.Object
  extended bycom.docmosis.template.population.DataProviderSQLGrouping
All Implemented Interfaces:
DataProviderGrouping

public class DataProviderSQLGrouping
extends Object
implements DataProviderGrouping

This class provides "grouping" information that is used to assist transforming a two-dimensional grid of data (eg a ResultSet) into a hierarchy of data.


Constructor Summary
DataProviderSQLGrouping(String name, Discriminator discriminator, String[] otherFields)
          Create a new grouping.
DataProviderSQLGrouping(String name, String[] fields)
          Create a new grouping.
 
Method Summary
 Discriminator getDiscriminator()
          Get the discriminator used to form data provider groups.
 String[] getFields()
          Get the names of all field that will be part of the data that the resulting data provider will provide.
 String getName()
          Get the name for the grouping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataProviderSQLGrouping

public DataProviderSQLGrouping(String name,
                               String[] fields)
Create a new grouping. This grouping will have rows uniquely identified by the values of the fields given as parameters.

Parameters:
name - the name of this data provider grouping.
fields - the fields to include into the grouping.

DataProviderSQLGrouping

public DataProviderSQLGrouping(String name,
                               Discriminator discriminator,
                               String[] otherFields)
Create a new grouping. This grouping will have rows uniquely identified by the values of the fields in the discriminator. The values of the otherFields array will also be shown.

Parameters:
name - the name of this data provider grouping.
discriminator - the discriminator to use.
otherFields - an array of names of other fields to include.
Method Detail

getName

public String getName()
Get the name for the grouping. This is the name that will be translated to the name used by data providers calling their children.

Specified by:
getName in interface DataProviderGrouping
Returns:
the name of this data provider grouping.

getDiscriminator

public Discriminator getDiscriminator()
Get the discriminator used to form data provider groups.

Specified by:
getDiscriminator in interface DataProviderGrouping
Returns:
the discriminator.

getFields

public String[] getFields()
Get the names of all field that will be part of the data that the resulting data provider will provide. The implementation should ensure that columns that are part of the discriminator are included in the return value.

Specified by:
getFields in interface DataProviderGrouping
Returns:
all field names included for this grouping.

Docmosis API 4.5.0

Copyright © 2014 Docmosis Pty Ltd. All Rights Reserved.