Class com.ibm.etools.sqltoxml.BaseProperties

java.lang.Object
        com.ibm.etools.sqltoxml.BaseProperties

Direct Known Subclasses:

QueryProperties, SQLProperties

public abstract class BaseProperties

extends java.lang.Object

This class provides database connection information for SQL and XML. The database connection information can be either set manually or loaded from an external file (which usually has the extension .xst). The database connection information can also be stored in an external file with the extension .xst.

See Also

QueryProperties, SQLProperties

Table 1. Constructor Index
Constructor Description
BaseProperties() The default constructor.

Table 2. Method Index
Method Description
String getEncoding() Returns the Java style encoding value for the properties file.
String getEncodingTag() Returns the encoding value for the properties file to be written if store() is called.
String getJdbcDriver() Returns a JDBC driver name.
String getJdbcServer() Returns a JDBC server path.
String getLoginId() Returns a database user ID that has the appropriate privilege to perform the query.
String getPassword() Returns a password for the user ID that has the appropriate privilege to perform the query.
void load(InputStream) Loads database operation values from an InputStream.
void load(String) Loads database operation values from an external file.
void setEncoding(String) Sets the Java style encoding value for the properties file to be written if store() is called.
void setEncodingTag(String) Sets the encoding value for the properties file to be written if store() is called.
void setJdbcDriver(String) Sets a JDBC driver name.
void setJdbcServer(String) Sets a JDBC server path.
void setLoginId(String) Sets a database user ID that has a privilege to perform the query.
void setPassword(String) Sets a password for the user ID that has a privilege to perform the query.
void store(String) Stores database operation information to an external file.

 

Constructors

BaseProperties

public BaseProperties()

The default constructor.

 

Methods

getEncoding

public String getEncoding()

Returns the Java style encoding value for the properties file.

getEncodingTag

public java.lang.String getEncodingTag()

Returns the encoding value for the properties file to be written if store() is called.

getJdbcDriver

public java.lang.String getJdbcDriver()

Returns a JDBC driver name. An example form of the driver argument is:

  COM.ibm.db2.jdbc.app.DB2Driver

getJdbcServer

public java.lang.String getJdbcServer()

Returns a JDBC server path. An example form of the server argument is

jdbc:db2:hospital
where hospital is a database name for the query.

getLoginId

public java.lang.String getLoginId()

Returns a database user ID that has a privilege to perform the query.

getPassword

public java.lang.String getPassword()

Returns a password for the user ID that has the appropriate privilege to perform the query.

load

public void load(InputStream stream) throws Exception

Loads database operation values from an InputStream. The content of the InputStream is in the XML format equivalent to that of a query file.

load

public void load(String xstFilename) throws Exception

Loads necessary query values from an external file. The external file name uses an extension .xst.

setEncoding

public void setEncoding(String enc)

Sets the Java style encoding value for the properties file to be written if store() is called.

setEncodingTag

public void setEncodingTag(String encTag)

Sets the encoding value for the properties file to be written if store() is called.

setJdbcDriver

public void setJdbcDriver(String newJdbcDriver)

Sets a JDBC driver name. An example form of the driver argument is:

   COM.ibm.db2.jdbc.app.DB2Driver

setJdbcServer

public void setJdbcServer(String newJdbcServer)

Sets a JDBC server path. An example form of the server argument is:

   jdbc:db2:hospital
where hospital is a database name for the query.

setLoginId

public void setLoginId(String newLoginId)

Sets a database user ID that has a privilege to perform the query.

setPassword

public void setPassword(String newPassword)

Sets a password for the user ID that has a privilege to perform the query.

store

public void store(String xstFilename) throws Exception

Stores necessary query values to an external file. The external file name uses an extension .xst.

Related reference
Class com.ibm.etools.sqltoxml.QueryProperties
Class com.ibm.etools.xmltosql.SQLProperties