All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jet.bean.JRCatalog

java.lang.Object
   |
   +----jet.bean.JRCatalog

public class JRCatalog
extends Object
This catalog bean provides method to manipulate and access to the catalog object.


Variable Index

 o vDebug
The option that turns on debug message output.
 o vError
The option that turns on error message output.
 o vOff
The option that turns off message output.

Constructor Index

 o JRCatalog()
Construct the JRCatalog bean.

Method Index

 o addConnection(ConnectionDesc)
Add the specified connection to the catalog.
 o addFileQuery(String, File)
Add the file query specified by the name and file to catalog.
 o addWherePortion(String, String, String)
Adds the specified where portion to catalog.
 o addWherePortion(String, String, Vector)
Adds the specified where portion to catalog and save catalog.
 o closeCatalog()
Close the catalog and release all resources.
 o deleteConnection()
Delete the connection from the catalog.
 o deleteFileQuery(String)
Deletes the specified file query in the catalog..
 o deleteWherePortion(String)
Removes the where portion by the specified name.
 o getCatName()
Get the name of the catalog.
 o getConnectionDesc()
Get the connection description.
 o getFileQuerySQL(String)
Get the file query SQL string.
 o getReportHome()
Get the report home path where the report.ini and other JReport system files exist.
 o getWherePortionsSQL(String)
Gets the where portion by the specified name.
 o loadCatalog()
Load the catalog by the specified catalog name.
 o modifyConnection(ConnectionDesc)
Modify the connection according to the specified connection description.
 o modifyWherePortion(String, String, String)
Modifys the specified where portion.
 o modifyWherePortion(String, String, Vector)
Modifys the specified where portion.
 o newCatalog()
Create a new catalog with the catalog name and save the catalog to file.
 o saveCatalog()
Save the catalog to file.
 o saveCatalogAs(String)
Save the catalog to specified file.
 o setCatName(String)
Set the name of the catalog.
 o setLogFile(String)
Set the log file.
 o setReportHome(String)
Set the report home path where the report.ini and other JReport system files exist.
 o setShowInfoLevel(int)
Set the show debug infomation level.

Variables

 o vOff
 public static final int vOff
The option that turns off message output.

 o vDebug
 public static final int vDebug
The option that turns on debug message output.

 o vError
 public static final int vError
The option that turns on error message output.

Constructors

 o JRCatalog
 public JRCatalog()
Construct the JRCatalog bean.

Methods

 o getReportHome
 public String getReportHome()
Get the report home path where the report.ini and other JReport system files exist.

Returns:
the report home path.
 o setReportHome
 public void setReportHome(String reportHome)
Set the report home path where the report.ini and other JReport system files exist.

Parameters:
reportHome - the home path.
 o setCatName
 public void setCatName(String catName)
Set the name of the catalog.

Parameters:
catName - the name of the catalog.
 o getCatName
 public String getCatName()
Get the name of the catalog.

Returns:
the name of the catalog.
 o newCatalog
 public void newCatalog() throws JRCatalogException
Create a new catalog with the catalog name and save the catalog to file.

Throws: JRCatalogException
if a error occurs
See Also:
SYSTEM_INITIALIZE_ERROR, CAT_NAME_ERROR, CREATE_CAT_ERROR, SAVE_CAT_ERROR
 o loadCatalog
 public void loadCatalog() throws JRCatalogException
Load the catalog by the specified catalog name.

Throws: JRCatalogException
if a error occurs
See Also:
SYSTEM_INITIALIZE_ERROR, CAT_NAME_ERROR, LOAD_CAT_ERROR
 o saveCatalog
 public void saveCatalog() throws JRCatalogException
Save the catalog to file. When the catalog save successfully, all changes on the catalog have been saved.

Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, SAVE_CAT_ERROR
 o saveCatalogAs
 public void saveCatalogAs(String strCatName) throws JRCatalogException
Save the catalog to specified file.

Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, SAVE_CAT_ERROR
 o closeCatalog
 public void closeCatalog()
Close the catalog and release all resources. When the catalog closed, the operation on catalog will be rejected.

 o addWherePortion
 public void addWherePortion(String strName,
                             String strQueryName,
                             String strSQL) throws JRCatalogException
Adds the specified where portion to catalog.

Parameters:
strName, - the name of where portion.
strQueryName, - the query name of where portion.
strSQL, - the where portion string
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHEREPORTION_NAME_ERROR
 o addWherePortion
 public void addWherePortion(String strName,
                             String strQueryName,
                             Vector vecGroups) throws JRCatalogException
Adds the specified where portion to catalog and save catalog.

Parameters:
strName, - the name of where portion.
strQueryName, - the query name of where portion.
vecGroups, - the where portion structure.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHEREPORTION_NAME_ERROR
 o modifyWherePortion
 public void modifyWherePortion(String strName,
                                String strQueryName,
                                String strSQL) throws JRCatalogException
Modifys the specified where portion.

Parameters:
strName, - the name of where portion.
strQueryName, - the query name of where portion.
strSQL, - the where portion string
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHERE_PORTION_NOT_EXISTS
 o modifyWherePortion
 public void modifyWherePortion(String strName,
                                String strQueryName,
                                Vector vecGroups) throws JRCatalogException
Modifys the specified where portion.

Parameters:
strName, - the name of where portion.
strQueryName, - the query name of where portion.
vecGroups, - the where portion structure.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHERE_PORTION_NOT_EXISTS
 o deleteWherePortion
 public void deleteWherePortion(String strName) throws JRCatalogException
Removes the where portion by the specified name.

Parameters:
strName, - the name of where portion.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHERE_PORTION_NOT_EXISTS
 o getWherePortionsSQL
 public String getWherePortionsSQL(String strName) throws JRCatalogException
Gets the where portion by the specified name.

Parameters:
nameOfWherePortion, - the name of where portion.
Returns:
the string of where portion if successfully, else null.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, WHERE_PORTION_NOT_EXISTS
 o addFileQuery
 public void addFileQuery(String strName,
                          File flPath) throws JRCatalogException
Add the file query specified by the name and file to catalog.

Parameters:
strName, - the name of file query.
flPath, - the sql file.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, NO_CONNECTION_ERROR, CREATE_FILEQUERY_FAILED
 o deleteFileQuery
 public void deleteFileQuery(String strName) throws JRCatalogException
Deletes the specified file query in the catalog..

Parameters:
strName, - the name of file query.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, NO_CONNECTION_ERROR, CREATE_FILEQUERY_FAILED
 o getFileQuerySQL
 public String getFileQuerySQL(String strName) throws JRCatalogException
Get the file query SQL string.

Parameters:
strName, - the name of file query.
Returns:
the SQL string.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, NO_CONNECTION_ERROR, FILEQUERY_NAME_ERROR, CREATE_FILEQUERY_FAILED, FILEQUERY_NOT_EXISTS
 o addConnection
 public void addConnection(ConnectionDesc connection) throws JRCatalogException
Add the specified connection to the catalog. The program will try to make connection the the database and fetch connection information.

Parameters:
connection, - the connection description.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, ONE_CONNECTION, CONNECTION_FAILURE_ERROR, FILEQUERY_NOT_EXISTS
 o modifyConnection
 public void modifyConnection(ConnectionDesc connection) throws JRCatalogException
Modify the connection according to the specified connection description. Note: A connection contains the tables, views, stored procedures and file queries. The queries, formulas and summaris also depend on the connection. Please be careful when you call this method. The program will try to make connection the the database and fetch connection information.

Parameters:
connection, - the connection description.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, NO_CONNECTION_ERROR, CONNECTION_FAILURE_ERROR
 o deleteConnection
 public void deleteConnection() throws JRCatalogException
Delete the connection from the catalog. Note: A connection contains the tables, views, stored procedures and file queries. The queries, formulas and summaris also depend on the connection. Please be careful when you call this method.

Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR, NO_CONNECTION_ERROR, CONNECTION_FAILURE_ERROR
 o getConnectionDesc
 public ConnectionDesc getConnectionDesc() throws JRCatalogException
Get the connection description.

Returns:
the ConnectionDesc object if there is a connection, otherwise, null.
Throws: JRCatalogException
if a error occurs
See Also:
NO_CAT_ERROR
 o setShowInfoLevel
 public void setShowInfoLevel(int level)
Set the show debug infomation level.

Parameters:
level - the debug level
See Also:
vOff, vDebug, vError
 o setLogFile
 public boolean setLogFile(String fileName)
Set the log file. When the log file set, all out message will be redirected to the file.

Parameters:
fileName, - the log file name
Returns:
true if successful

All Packages  Class Hierarchy  This Package  Previous  Next  Index