java.lang.Object com.ibm.etools.sqltoxml.BaseProperties
直接已知子类:
QueryProperties 和 SQLProperties
公用抽象类 BaseProperties
扩展 java.lang.Object
此类为 SQL 和 XML 提供了数据库连接信息。可以手工设置数据库连接信息,也可以从外部文件(其扩展名通常为 .xst)装入该信息。数据库连接信息还可存储在扩展名为 .xst 的外部文件中。
构造函数 | 描述 |
---|---|
BaseProperties() | 缺省构造函数。 |
方法 | 描述 |
---|---|
String getEncoding() | 返回属性文件的 Java™ 样式编码值。 |
String getEncodingTag() | 返回要编写的属性文件的编码值(如果调用了 store() 的话)。 |
String getJdbcDriver() | 返回 JDBC 驱动程序名称。 |
String getJdbcServer() | 返回 JDBC 服务器路径。 |
String getLoginId() | 返回具有执行查询的适当特权的数据库用户标识。 |
String getPassword() | 返回具有执行查询的适当特权的用户标识的密码。 |
void load(InputStream) | 从 InputStream 装入数据库操作值。 |
void load(String) | 从外部文件装入数据库操作值。 |
void setEncoding(String) | 设置要编写的属性文件的 Java 样式编码值(如果调用了 store() 的话)。 |
void setEncodingTag(String) | 设置要编写的属性文件的编码值(如果调用了 store() 的话)。 |
void setJdbcDriver(String) | 设置 JDBC 驱动程序名称。 |
void setJdbcServer(String) | 设置 JDBC 服务器路径。 |
void setLoginId(String) | 设置具有执行查询的特权的数据库用户标识。 |
void setPassword(String) | 设置具有执行查询的特权的用户标识的密码。 |
void store(String) | 将数据库操作信息存储到外部文件中。 |
public BaseProperties()
缺省构造函数。
public String getEncoding()
返回属性文件的 Java 样式编码值。
public java.lang.String getEncodingTag()
返回要编写的属性文件的编码值(如果调用了 store() 的话)。
public java.lang.String getJdbcDriver()
返回 JDBC 驱动程序名称。驱动程序自变量的示例格式为:
COM.ibm.db2.jdbc.app.DB2Driver
public java.lang.String getJdbcServer()
返回 JDBC 服务器路径。服务器自变量的一个示例格式是
jdbc:db2:hospital其中,hospital 是查询的数据库名称。
public java.lang.String getLoginId()
返回具有执行查询的特权的数据库用户标识。
public java.lang.String getPassword()
返回具有执行查询的适当特权的用户标识的密码。
public void load(InputStream stream) throws Exception
从 InputStream 装入数据库操作值。InputStream 的内容具有与查询文件相同的 XML 格式。
public void load(String xstFilename) throws Exception
从外部文件装入必需的查询值。外部文件名使用扩展名 .xst。
public void setEncoding(String enc)
设置要编写的属性文件的 Java 样式编码值(如果调用了 store() 的话)。
public void setEncodingTag(String encTag)
设置要编写的属性文件的编码值(如果调用了 store() 的话)。
public void setJdbcDriver(String newJdbcDriver)
设置 JDBC 驱动程序名称。驱动程序自变量的示例格式为:
COM.ibm.db2.jdbc.app.DB2Driver
public void setJdbcServer(String newJdbcServer)
设置 JDBC 服务器路径。服务器自变量的示例格式为:
jdbc:db2:hospital其中,hospital 是查询的数据库名称。
public void setLoginId(String newLoginId)
设置具有执行查询的特权的数据库用户标识。
public void setPassword(String newPassword)
设置具有执行查询的特权的用户标识的密码。
public void store(String xstFilename) throws Exception
将必需的查询值存储到外部文件中。外部文件名使用扩展名 .xst。