Package quadbase.reportdesigner.util
Interface IInputData
public interface IInputData
This interface defines methods to modify the report's input data properties, including file or
database information, and accessing individual records.
A handle to an object that implements this interface can be obtained by calling the
gethInputData method defined in QbReport.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new row to the report input data.voiddeleteRow(int rowId) Delete a record(row) from the report input data.Gets the name of the input class file used to create the report.getData()Returns the IResultSet object containing the input report data.Gets the database info used for plotting the report.Gets the name of the input data file used to create the report.Gets the name of the input dtd file used to create the report.quadbase.common.util.internal.ExcelFileInfoGets the Excel info used for the report.ColInfo[]Returns the data column mapping information.Gets a query file (*.qry) for plotting the report.getRow(int rowId) Gets the specified row data from the report.intReturns the total number of rows in the input data.Returns the spread sheet model for the report, if one is set.Gets the name of the input xml file used to create the report.Gets the xml file query info used to create the report.intmatchRecord(IRow r) Get the row number containing the record that matches the input row.readQueryFile(String filename) Reads a query file (*.qry) and returns a IQueryFileInfo object.voidreplaceAllDatabaseInfo(String originalUrl, String url, String driver, String usr, String pwd, boolean setNewData) Replaces all database information associated with this report.voidreplaceAllDatabaseInfo(Hashtable<String, Properties> databaseMap, Properties defaultVal, boolean setNewData) Replaces all database information associated with this report.voidreplaceColumns(quadbase.reportdesigner.util.ReplaceColumnInfoList infoList) voidsetAllDatabaseInfo(String url, String driver, String usr, String pwd) Sets all database information associated with this report.voidsetAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData) Sets all database information associated with this report.voidsetAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData, boolean sorteddata) voidsetAllDatabaseInfo(Connection conn) Sets all database connection(s) associated with this report.voidsetAllDatabaseInfo(Connection conn, boolean setNewData) Sets all database connection(s) associated with this report.voidsetAllDatabaseInfo(Connection conn, boolean setNewData, boolean sorteddata) voidsetAllJNDIDatabaseInfo(Hashtable<String, String> env, String jndiName) voidsetClassFile(String className) Sets the input class file, which is used to create a report.voidsetClassFile(String className, boolean sortedData) Sets the input class file, which is used to create a report.voidsetClassFile(String className, boolean sortedData, boolean showPromptDialog) Sets the input class file, which is used to create a report.voidsetData(IResultSet rs) Sets the input data for the report using an IResultSet object.voidsetData(IResultSet rs, boolean sortedData) Sets the input data for the report using an IResultSet object.voidsetData(IResultSet rs, boolean sortedData, boolean optimizeMemory) Sets the input data for the report using an IResultSet object.voidsetData(IResultSet rs, boolean sortedData, boolean optimizeMemory, Object[] distinctValue) Sets the input data for the report using an IResultSet object.voidsetDatabaseInfo(quadbase.common.util.IDatabaseInfo db) Sets the input database information, which is used to create a report.voidsetDatabaseInfo(quadbase.common.util.IDatabaseInfo db, boolean setNewData) voidsetDatabaseInfo(quadbase.common.util.IDatabaseInfo db, boolean setNewData, boolean sorteddata) voidsetDataFile(String fileName) Sets the input data file, which is used to create a report.voidsetDataFile(String fileName, boolean sortedData) Sets the input data file, which is used to create a report.voidsetDataFile(String fileName, boolean sortedData, String encoding) Sets the input data file, which is used to create a report.voidsetExcelFileInfo(quadbase.common.util.internal.ExcelFileInfo excelInfo) Sets the Excel info for the report.voidsetJNDIDatabaseInfo(quadbase.common.util.IDatabaseInfo dbinfo, boolean setNewData, boolean sorteddata) voidsetMapping(ColInfo[] info) Set the report column mapping.voidsetQueryFilename(String filename) Sets a query file (*.qry) for plotting the report.voidSets the report's spread sheet model to the given object.voidsetXMLFile(String xmlName) Sets the input xml file, which is used to create a report.voidsetXMLFile(String xmlName, boolean sortedData) Sets the input xml file, which is used to create a report.voidsetXMLFileQueryInfo(XMLFileQueryInfo xmlInfo) Sets the xml file query info, which is used to create a report.voidsetXMLFileQueryInfo(XMLFileQueryInfo xmlInfo, boolean sortedData) Sets the xml file query info, which is used to create a report.voidUpdate the specified row in the report.
-
Method Details
-
getMapping
ColInfo[] getMapping()Returns the data column mapping information.- Returns:
- the report column mapping information
- See Also:
-
setMapping
Set the report column mapping.- Parameters:
info- An instance of ColInfo containing the column mappings.- See Also:
-
getDatabaseInfo
IDatabaseInfo getDatabaseInfo()Gets the database info used for plotting the report. Only valid if the report was created by performing a database query.- Returns:
- An object containing the database information.
- See Also:
-
setDatabaseInfo
Sets the input database information, which is used to create a report.- Parameters:
db- An IDatabaseInfo implementation object containing the database connect info and search query.- Throws:
Exception- See Also:
-
setDatabaseInfo
- Throws:
Exception
-
setDatabaseInfo
void setDatabaseInfo(quadbase.common.util.IDatabaseInfo db, boolean setNewData, boolean sorteddata) throws Exception - Throws:
Exception
-
setAllDatabaseInfo
Sets all database information associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database information as well.- Parameters:
url- the url that identifies the databasedriver- the name of the jdbc driver classusr- the user name to login to this database, or nullpwd- the password to login to this database, or null- Throws:
Exception
-
setAllDatabaseInfo
void setAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData) throws Exception Sets all database information associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database information as well.- Parameters:
url- the url that identifies the databasedriver- the name of the jdbc driver classusr- the user name to login to this database, or nullpwd- the password to login to this database, or nullsetNewData- whether to hit the database to set new data for the report- Throws:
Exception
-
setAllDatabaseInfo
void setAllDatabaseInfo(String url, String driver, String usr, String pwd, boolean setNewData, boolean sorteddata) throws Exception - Throws:
Exception
-
setAllJNDIDatabaseInfo
- Throws:
Exception
-
setJNDIDatabaseInfo
void setJNDIDatabaseInfo(quadbase.common.util.IDatabaseInfo dbinfo, boolean setNewData, boolean sorteddata) throws Exception - Throws:
Exception
-
replaceAllDatabaseInfo
void replaceAllDatabaseInfo(String originalUrl, String url, String driver, String usr, String pwd, boolean setNewData) throws Exception Replaces all database information associated with this report. Any sub-report, drill-down report, and chart that uses the originalUrl database data source will be changed to use the specified database information. The remaining data sources will remain the same- Parameters:
originalUrl- the original database url to replaceurl- the url that identifies the databasedriver- the name of the jdbc driver classusr- the user name to login to this database, or nullpwd- the password to login to this database, or nullsetNewData- whether to hit the database to set new data for the report- Throws:
Exception
-
replaceAllDatabaseInfo
void replaceAllDatabaseInfo(Hashtable<String, Properties> databaseMap, Properties defaultVal, boolean setNewData) throws ExceptionReplaces all database information associated with this report. The hashtable maps old database url to new database Properties. The Properties must include 4 keys (case sensitive):- URL - the new database URL
- DRIVER - the new database Driver
- USERNAME - the new database username
- PASSWORD - the new database password
- Parameters:
databaseMap- the map containing previous database url as keys mapped to new database PropertiesdefaultVal- if a report/chart is using a database url not found in the databaseMap, it will replace the database information to those contained in defaultVal only if defaultVal is not null.setNewData- whether to hit the database to set new data for the report- Throws:
Exception
-
setAllDatabaseInfo
Sets all database connection(s) associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database connection as well.- Parameters:
conn- the database connection object to use- Throws:
Exception
-
setAllDatabaseInfo
Sets all database connection(s) associated with this report. Any sub-report, drill-down report, and chart that uses a database data source will be changed to use the specified database connection as well.- Parameters:
conn- the database connection object to usesetNewData- whether to hit the database to set new data for the report- Throws:
Exception
-
setAllDatabaseInfo
- Throws:
Exception
-
replaceColumns
- Throws:
Exception
-
getQueryFilename
String getQueryFilename()Gets a query file (*.qry) for plotting the report. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo- Returns:
- A query file name with extension *.qry return null if no query file is used
- See Also:
-
setQueryFilename
Sets a query file (*.qry) for plotting the report. A query file is a hard copy of a IQueryFileInfo object, which contains database driver, url, username, password, input parameters(if applicable) and output parameters(if applicable) IQueryFileInfo is a subclass of IDatabaseInfo- Parameters:
filename- A query file name with extension *.qry- Throws:
Exception- See Also:
-
readQueryFile
Reads a query file (*.qry) and returns a IQueryFileInfo object.- Parameters:
filename- A query file name with extension *.qry- Returns:
- A IQueryFileInfo object
- Throws:
Exception
-
setDataFile
Sets the input data file, which is used to create a report.- Parameters:
fileName- The name of the input data file.- Throws:
IOException
-
setDataFile
Sets the input data file, which is used to create a report.- Parameters:
fileName- The name of the input data file.sortedData- Specify if the result set is sorted.- Throws:
IOException
-
setDataFile
Sets the input data file, which is used to create a report.- Parameters:
fileName- The name of the input data file.sortedData- Specify if the result set is sorted.encoding- The encoding of the file- Throws:
IOException
-
getDataFile
String getDataFile()Gets the name of the input data file used to create the report.- Returns:
- The name of the input data file.
-
setClassFile
Sets the input class file, which is used to create a report.- Parameters:
className- The name of the input class.- Throws:
IOException
-
setClassFile
Sets the input class file, which is used to create a report.- Parameters:
className- The name of the input class.sortedData- Specify if the result set is sorted.- Throws:
IOException
-
setClassFile
void setClassFile(String className, boolean sortedData, boolean showPromptDialog) throws IOException Sets the input class file, which is used to create a report.- Parameters:
className- The name of the input class.sortedData- Specify if the result set is sorted.showPromptDialog- show parameter prompt dialog, false if sub report and the parameter is shared.- Throws:
IOException
-
getClassFile
String getClassFile()Gets the name of the input class file used to create the report.- Returns:
- The name of the input class file.
-
setXMLFileQueryInfo
Sets the xml file query info, which is used to create a report.- Parameters:
xmlInfo- The XMLFileQueryInfo.
-
setXMLFileQueryInfo
Sets the xml file query info, which is used to create a report.- Parameters:
xmlInfo- The XMLFileQueryInfo.sortedData- Specify if the result set is sorted.
-
getXMLFileQueryInfo
XMLFileQueryInfo getXMLFileQueryInfo()Gets the xml file query info used to create the report.- Returns:
- The XMLFileQueryInfo.
-
setXMLFile
Sets the input xml file, which is used to create a report.- Parameters:
xmlName- The name of the input xml file.- Throws:
IOException
-
setXMLFile
Sets the input xml file, which is used to create a report.- Parameters:
xmlName- The name of the input xml file.sortedData- Specify if the result set is sorted.- Throws:
IOException
-
getXMLFile
String getXMLFile()Gets the name of the input xml file used to create the report.- Returns:
- The name of the input xml file.
-
getDTDFile
String getDTDFile()Gets the name of the input dtd file used to create the report.- Returns:
- The name of the input dtd file.
-
addRow
Adds a new row to the report input data.- Parameters:
r- An object of type quadbase.reportdesigner.util.IRow- See Also:
-
deleteRow
void deleteRow(int rowId) Delete a record(row) from the report input data.- Parameters:
rowId- The row number to delete.
-
updateRow
Update the specified row in the report.- Parameters:
rowId- The row number to updater- The new row values.- See Also:
-
getRow
Gets the specified row data from the report.- Parameters:
rowId- The row number.- Returns:
- The IRow object containing the row data.
- See Also:
-
getRowCount
int getRowCount()Returns the total number of rows in the input data.- Returns:
- The total number of rows in the input data set.
-
matchRecord
Get the row number containing the record that matches the input row.- Parameters:
r- The IRow object for which the row number is desired.- Returns:
- The row number in the data set.
- See Also:
-
getData
IResultSet getData()Returns the IResultSet object containing the input report data.- Returns:
- The IResultSet object.
- See Also:
-
setData
Sets the input data for the report using an IResultSet object.- Parameters:
rs- The IResultSet object- Throws:
Exception- See Also:
-
setData
Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.- Parameters:
rs- The IResultSet objectsortedData- Specify if the result set is sorted.- Throws:
Exception- See Also:
-
setData
Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.- Parameters:
rs- The IResultSet objectsortedData- Specify if the result set is sorted.optimizeMemory- Whether data from database would get obtained in chunks to save- Throws:
Exception- See Also:
-
setData
void setData(IResultSet rs, boolean sortedData, boolean optimizeMemory, Object[] distinctValue) throws Exception Sets the input data for the report using an IResultSet object. If the result set is sorted, the report can be built more efficiently.- Parameters:
rs- The IResultSet objectsortedData- Specify if the result set is sorted.optimizeMemory- Whether data from database would get obtained in chunks to savedistinctValue- Distinct value Object array for CrossTab report, used when optimize memory is set to true- Throws:
Exception- See Also:
-
getSpreadSheetModel
ISpreadSheetModel getSpreadSheetModel()Returns the spread sheet model for the report, if one is set.- See Also:
-
setSpreadSheetModel
Sets the report's spread sheet model to the given object.- Parameters:
sheet- the spreadsheet model object- See Also:
-
getExcelFileInfo
quadbase.common.util.internal.ExcelFileInfo getExcelFileInfo()Gets the Excel info used for the report. Only valid if the report was created from Excel data source.- Returns:
- SalesForce data source information
- See Also:
-
setExcelFileInfo
Sets the Excel info for the report.- Parameters:
excelInfo- Excel data source information- Throws:
Exception- if an error occurred- See Also:
-