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.
-
vDebug
- The option that turns on debug message output.
-
vError
- The option that turns on error message output.
-
vOff
- The option that turns off message output.
-
JRCatalog()
- Construct the JRCatalog bean.
-
addConnection(ConnectionDesc)
- Add the specified connection to the catalog.
-
addFileQuery(String, File)
- Add the file query specified by the name and file to catalog.
-
addWherePortion(String, String, String)
- Adds the specified where portion to catalog.
-
addWherePortion(String, String, Vector)
- Adds the specified where portion to catalog and save catalog.
-
closeCatalog()
- Close the catalog and release all resources.
-
deleteConnection()
- Delete the connection from the catalog.
-
deleteFileQuery(String)
- Deletes the specified file query in the catalog..
-
deleteWherePortion(String)
- Removes the where portion by the specified name.
-
getCatName()
- Get the name of the catalog.
-
getConnectionDesc()
- Get the connection description.
-
getFileQuerySQL(String)
- Get the file query SQL string.
-
getReportHome()
- Get the report home path where the report.ini and other JReport system files exist.
-
getWherePortionsSQL(String)
- Gets the where portion by the specified name.
-
loadCatalog()
- Load the catalog by the specified catalog name.
-
modifyConnection(ConnectionDesc)
- Modify the connection according to the specified connection description.
-
modifyWherePortion(String, String, String)
- Modifys the specified where portion.
-
modifyWherePortion(String, String, Vector)
- Modifys the specified where portion.
-
newCatalog()
- Create a new catalog with the catalog name and save the catalog to file.
-
saveCatalog()
- Save the catalog to file.
-
saveCatalogAs(String)
- Save the catalog to specified file.
-
setCatName(String)
- Set the name of the catalog.
-
setLogFile(String)
- Set the log file.
-
setReportHome(String)
- Set the report home path where the report.ini and other JReport system files exist.
-
setShowInfoLevel(int)
- Set the show debug infomation level.
vOff
public static final int vOff
- The option that turns off message output.
vDebug
public static final int vDebug
- The option that turns on debug message output.
vError
public static final int vError
- The option that turns on error message output.
JRCatalog
public JRCatalog()
- Construct the JRCatalog bean.
getReportHome
public String getReportHome()
- Get the report home path where the report.ini and other JReport system files exist.
- Returns:
- the report home path.
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.
setCatName
public void setCatName(String catName)
- Set the name of the catalog.
- Parameters:
- catName - the name of the catalog.
getCatName
public String getCatName()
- Get the name of the catalog.
- Returns:
- the name of the catalog.
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
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
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
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
closeCatalog
public void closeCatalog()
- Close the catalog and release all resources.
When the catalog closed, the operation on catalog will be rejected.
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
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
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
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
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
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
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
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
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
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
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
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
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
setShowInfoLevel
public void setShowInfoLevel(int level)
- Set the show debug infomation level.
- Parameters:
- level - the debug level
- See Also:
- vOff, vDebug, vError
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