stdmql.dbmanager
Class DataRetreiver
java.lang.Object
stdmql.dbmanager.DataRetreiver
public class DataRetreiver
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataRetreiver
public DataRetreiver()
addSource
public void addSource(Query q)
- Parameters:
q
- the query representing the new data source
Add a data source to the data retriever
sourcesSize
public int sourcesSize()
- Returns:
- the number of data sources of the retriever
closeSource
public void closeSource(int queryIndex)
- Parameters:
queryIndex
- the index of the data source to close
It closes the data source in a particular position
closeSource
public void closeSource()
- It closes all the data sources
next
public boolean next(int queryIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data source
- Returns:
- true if the resultset is not at the end
Move the resultset of a particular source to the next position (see next method in resultset)
- Throws:
java.sql.SQLException
getString
public java.lang.String getString(int queryIndex,
int columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the index of the column to use
- Returns:
- It gets the String value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getString
public java.lang.String getString(int queryIndex,
java.lang.String columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the name of the column to use
- Returns:
- It gets the String value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getDouble
public java.lang.Double getDouble(int queryIndex,
int columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the index of the column to use
- Returns:
- It gets the Double value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getDouble
public java.lang.Double getDouble(int queryIndex,
java.lang.String columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the name of the column to use
- Returns:
- It gets the Double value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getInteger
public java.lang.Integer getInteger(int queryIndex,
int columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the index of the column to use
- Returns:
- It gets the Integer value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getInteger
public java.lang.Integer getInteger(int queryIndex,
java.lang.String columnIndex)
throws java.sql.SQLException
- Parameters:
queryIndex
- the index of the data sourcecolumnIndex
- the name of the column to use
- Returns:
- It gets the Integer value in a particular column of a specific data source
- Throws:
java.sql.SQLException
getQuery
public Query getQuery(int queryIndex)
- Parameters:
queryIndex
- the index of the data source
- Returns:
- the Query object representing the data source requested
getInnerQuery
public java.lang.String getInnerQuery(int queryIndex)
- Parameters:
queryIndex
- the index of the data source
- Returns:
- the original query of a specific data source
getResultSet
public java.sql.ResultSet getResultSet(int queryIndex)
- Parameters:
queryIndex
- the index of the data source
- Returns:
- the resultset of a specific data source