ElegantJCharts Java API Specification v2.0

com.elegantj.data.dataprovider
Interface DataProvider

All Known Implementing Classes:
AbstractDataProvider

public interface DataProvider

The DataProvider interface for objects which provides the data and the transaction.


Method Summary
 void filterData(java.lang.String filterCriteria)
          Fiters the data with specified criteria
 int find(java.lang.String condition, int startIndex, int endIndex)
          Finds the record which satisfied the condition between startIndex and end Index, and return the index of the searched record
 int findNext()
          Returns the index of the record which satisfied the condition after invoking the find()
 java.util.Vector firstRecord()
          Moves to the first record and returns it
 int getColumnCount()
          Returns the total number of columns
 int getColumnIndex(java.lang.String colName)
          Returns the index of the column colName
 java.util.Vector getColumnNames()
          Returns the column names
 java.lang.String[] getColumnsArray()
          Returns the column names
 int getColumnType(int colIndex)
          Returns the type of the column at the specified index
 Computable getComputable()
          Gets the Computable object which is used for filtering, searching and other computation operation
 int getCurrentIndex()
          Returns the current index
 java.util.Vector getCurrentRecord()
          Returns the current record
 java.util.Vector getData()
          Fetches the data
 java.util.Vector getDataAt(int position)
          Returns the record at the specified position
 java.lang.Object getDataAt(int rowPosition, int columnPosition)
          Returns the data value at the specified rowPosition and sepecified columnPosition
 int getDataCount()
          Returns the total number of records
 int getFetchSize()
          Gets the total number of records that can be fetched by getData() method call
 java.lang.String getFilterCriteria()
          Gets the criteria for filtering the data
 int getSkippedRows()
          Gets the total number of rows to be skipped while retrieving
 java.util.Vector getSortColumns()
          Returns the two dimensional vector containing the sort column name and its sorting order as each element
 java.lang.String getSortCriteria()
          Gets the criteria for sorting the data
 boolean isAppendDataOnFetchNext()
          Returns whether the next fetched data is appended or replaced to the existing data
 boolean isFetchNext()
          Determines whether fetching the next rows or not
 boolean isFilterState()
          Gets the filtering enability
 java.util.Vector lastRecord()
          Moves to the last record and returns it
 boolean nextData()
          If more data can be fetched, it fetches and return true, otherwise return false
 java.util.Vector nextRecord()
          Moves to the next record and returns it
 java.util.Vector previousRecord()
          Moves to the previous record and returns it
 void rankData(int groupIndex, java.util.Vector groupBands)
          Generate rank data based on given group information
 void refreshData()
          Refreshes the fetched data.
 void retrieve()
          Retrives the data
 java.util.Vector scrollToRow(int index)
          Moves to the record at the specified index and returns it
 void setAppendDataOnFetchNext(boolean b)
          Sets whether the next fetched data is appended or replaced to the existing data
 void setFetchSize(int size)
          Sets the total number of records that can be fetched by getData() method call
 void setFilterCriteria(java.lang.String filter)
          Sets the criteria for filtering the data, the criteria is any expression (arithmetical/database related),
 void setFilterState(boolean filterState)
          Sets the filtering enability
 void setSkippedRows(int n)
          Sets the total number of rows to be skipped while retrieving
 void setSortCriteria(java.lang.String sortCriteria)
          Sets the criteria for sorting the data, the criteria includes the column names and the its sorting order, for example col1:true,col2:false,col3:true
 void sortData(int[] colIndex)
           
 void sortData(int[] colIndex, boolean[] ordering)
           
 void sortData(int[] colIndex, boolean[] ordering, int startIndex, int endIndex)
          Sorts the data for specified columns at column indices with specified sorting order and range of the records
 void sortData(int[] colIndex, int startIndex, int endIndex)
           
 void sortData(java.lang.String[] colName)
           
 void sortData(java.lang.String[] colName, boolean[] ordering)
           
 void sortData(java.lang.String[] colName, boolean[] ordering, int startIndex, int endIndex)
          Sorts the data for specified columns with specified sorting order and range of the records
 void sortData(java.lang.String[] colName, int startIndex, int endIndex)
           
 

Method Detail

firstRecord

public java.util.Vector firstRecord()
Moves to the first record and returns it

Returns:
the vector contains the first record

lastRecord

public java.util.Vector lastRecord()
Moves to the last record and returns it

Returns:
the vector contains the last record

nextRecord

public java.util.Vector nextRecord()
Moves to the next record and returns it

Returns:
the vector contains the next record

previousRecord

public java.util.Vector previousRecord()
Moves to the previous record and returns it

Returns:
the vector contains the previous record

scrollToRow

public java.util.Vector scrollToRow(int index)
Moves to the record at the specified index and returns it

Parameters:
index - the record index to be scrolled
Returns:
the vector contains the record at the specified index

refreshData

public void refreshData()
Refreshes the fetched data.


nextData

public boolean nextData()
                 throws java.sql.SQLException
If more data can be fetched, it fetches and return true, otherwise return false

Returns:
true, if the data has been fetched, otherwise false
java.sql.SQLException

getData

public java.util.Vector getData()
Fetches the data

Returns:
the vector contains the data

getDataAt

public java.util.Vector getDataAt(int position)
Returns the record at the specified position

Returns:
the vector contains the record

getDataAt

public java.lang.Object getDataAt(int rowPosition,
                                  int columnPosition)
Returns the data value at the specified rowPosition and sepecified columnPosition

Parameters:
rowPosition - the position of the row
columnPosition - the position of the column
Returns:
the data value

getDataCount

public int getDataCount()
Returns the total number of records

Returns:
the total number of records

getColumnCount

public int getColumnCount()
Returns the total number of columns

Returns:
the total number of columns

getColumnNames

public java.util.Vector getColumnNames()
Returns the column names

Returns:
the vector contains the column names

getColumnsArray

public java.lang.String[] getColumnsArray()
Returns the column names

Returns:
the array of the the column names

getColumnIndex

public int getColumnIndex(java.lang.String colName)
Returns the index of the column colName

Parameters:
colName - the name of the column
Returns:
the index of the column

getColumnType

public int getColumnType(int colIndex)
Returns the type of the column at the specified index

Parameters:
colIndex - the index of the column
Returns:
the column type

getCurrentIndex

public int getCurrentIndex()
Returns the current index

Returns:
the index of the record ,being proccessed

getCurrentRecord

public java.util.Vector getCurrentRecord()
Returns the current record

Returns:
the record ,being proccessed

retrieve

public void retrieve()
              throws java.sql.SQLException
Retrives the data

Returns:
true if data is retrieved successfully, otherwise false
java.sql.SQLException

getComputable

public Computable getComputable()
Gets the Computable object which is used for filtering, searching and other computation operation

Returns:
the Computable object

setAppendDataOnFetchNext

public void setAppendDataOnFetchNext(boolean b)
Sets whether the next fetched data is appended or replaced to the existing data

Parameters:
b - true to append the next fetched data, false to replace

isAppendDataOnFetchNext

public boolean isAppendDataOnFetchNext()
Returns whether the next fetched data is appended or replaced to the existing data

Returns:
true to append the next fetched data, false to replace

setSkippedRows

public void setSkippedRows(int n)
Sets the total number of rows to be skipped while retrieving

Parameters:
n - the number of rows to be skipped while retrieving

getSkippedRows

public int getSkippedRows()
Gets the total number of rows to be skipped while retrieving

Returns:
the number of rows to be skipped while retrieving

setFetchSize

public void setFetchSize(int size)
Sets the total number of records that can be fetched by getData() method call

Parameters:
size - the total number of records that can be fetched

getFetchSize

public int getFetchSize()
Gets the total number of records that can be fetched by getData() method call

Returns:
the total number of records that can be fetched

isFetchNext

public boolean isFetchNext()
Determines whether fetching the next rows or not

Returns:
true if fetching the next rows

setFilterState

public void setFilterState(boolean filterState)
Sets the filtering enability

Parameters:
filterState - true, if the filtering is enabled

isFilterState

public boolean isFilterState()
Gets the filtering enability

Returns:
true, if the filtering is enabled, otherwise false

setFilterCriteria

public void setFilterCriteria(java.lang.String filter)
Sets the criteria for filtering the data, the criteria is any expression (arithmetical/database related),

Parameters:
filter - the filter criteria

getFilterCriteria

public java.lang.String getFilterCriteria()
Gets the criteria for filtering the data

Returns:
the filter criteria

filterData

public void filterData(java.lang.String filterCriteria)
Fiters the data with specified criteria

Parameters:
filterCriteria - the criteria to be processed to filter the data

rankData

public void rankData(int groupIndex,
                     java.util.Vector groupBands)
Generate rank data based on given group information

Parameters:
groupIndex - the group index
groupBands - the group information

setSortCriteria

public void setSortCriteria(java.lang.String sortCriteria)
Sets the criteria for sorting the data, the criteria includes the column names and the its sorting order, for example col1:true,col2:false,col3:true

Parameters:
sortCriteria - the sort criteria

getSortCriteria

public java.lang.String getSortCriteria()
Gets the criteria for sorting the data

Returns:
the sort criteria

getSortColumns

public java.util.Vector getSortColumns()
Returns the two dimensional vector containing the sort column name and its sorting order as each element

Returns:
the vector containing the sorted columns

sortData

public void sortData(int[] colIndex)

sortData

public void sortData(java.lang.String[] colName)

sortData

public void sortData(int[] colIndex,
                     boolean[] ordering)

sortData

public void sortData(java.lang.String[] colName,
                     boolean[] ordering)

sortData

public void sortData(int[] colIndex,
                     int startIndex,
                     int endIndex)

sortData

public void sortData(java.lang.String[] colName,
                     int startIndex,
                     int endIndex)

sortData

public void sortData(int[] colIndex,
                     boolean[] ordering,
                     int startIndex,
                     int endIndex)
Sorts the data for specified columns at column indices with specified sorting order and range of the records

Parameters:
colIndex - the indices of the columns
ordering - the sorting criteria for related columns, default all true
startIndex - the index of the record from which the sorting is started
endIndex - the index of the record upto which the sorting is done

sortData

public void sortData(java.lang.String[] colName,
                     boolean[] ordering,
                     int startIndex,
                     int endIndex)
Sorts the data for specified columns with specified sorting order and range of the records

Parameters:
colName - the names of the columns
ordering - the sorting criteria for related columns, default all true
startIndex - the index of the record from which the sorting is started
endIndex - the index of the record upto which the sorting is done

find

public int find(java.lang.String condition,
                int startIndex,
                int endIndex)
Finds the record which satisfied the condition between startIndex and end Index, and return the index of the searched record

Parameters:
condition - the seraching criteria
startIndex - the index of the record from which the searching is started
endIndex - the index of the record upto which the searching is done
Returns:
the index of the searched record

findNext

public int findNext()
Returns the index of the record which satisfied the condition after invoking the find()

Returns:
the index of the searched record

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.