org.gcube.portlets.user.tdw.server.datasource
Interface DataSource

All Known Implementing Classes:
JDBCDataSource

public interface DataSource

A TDW datasource.

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Method Summary
 String getDataAsJSon(int start, int limit, String sortingColumn, Direction direction)
          Retrieves the table data as JSON object.
 String getDataSourceFactoryId()
          Returns the id of the DataSourceFactory that have generated it.
 TableDefinition getTableDefinition()
          Returns the table definition.
 

Method Detail

getDataSourceFactoryId

String getDataSourceFactoryId()
Returns the id of the DataSourceFactory that have generated it.

Returns:
the DataSourceFactory id.

getTableDefinition

TableDefinition getTableDefinition()
                                   throws DataSourceException
Returns the table definition.

Returns:
a table definition.
Throws:
DataSourceException - if an error occurred retrieving the table definition.

getDataAsJSon

String getDataAsJSon(int start,
                     int limit,
                     String sortingColumn,
                     Direction direction)
                     throws DataSourceException
Retrieves the table data as JSON object.

Parameters:
start - the starting row index.
limit - the number of rows after the starting index to retrieve.
sortingColumn - the column used for sorting.
direction - the sorting direction.
Returns:
the JSON object as String.
Throws:
DataSourceException - if an error occurred retrieving the table data.


Copyright © 2013. All Rights Reserved.