Class com.ibm.etools.sqltoxml.QueryProperties

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

public final class QueryProperties extends BaseProperties

This class provides information necessary for SQLToXML to perform its SQL query and generate an XML file as well as several other artifacts. The information can be either set manually or loaded from a query file (which usually has an .xst extension). Also, the information can be stored to a query file.

See Also

SQLToXML

Table 1. Constructor Index
Constructor Description
QueryProperties() 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 getFormat() Returns a format option.
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.
Boolean getRecurse() Returns a Boolean value indicating whether the queries should also be performed on the target tables when foreign key columns from the current query are found.
String getStatement() Returns current SQL statement to be executed.
Vector getVarTypes() Deprecated. Returns a sequence of substitution parameter types when used.
void load(InputStream) Loads necessary query values from an InputStream.
void load(String) Loads necessary query values from a query 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 setFormat(String) Sets a format option.
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 setRecurse(Boolean) Sets a Boolean value indicating whether the queries should also be performed on the target tables when foreign key columns are found from the current query.
void setStatement(String) Sets current SQL statement.
void setVarTypes(Vector) Deprecated. VarTypes are used when a SQL statement contains substitution parameters, such as '?', and the user wants to indicate the data types for those parameters explicitly.
void store(String) Stores necessary query values to a query file.

 

Constructors

QueryProperties

public QueryProperties()

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.

getFormat

public String getFormat()

Returns a format option. Available output formats are:

   SQLGenerateOptions.GENERATE_AS_ELEMENTS,
   SQLGenerateOptions.GENERATE_AS_ATTRIBUTES,
   SQLGenerateOptions.GENERATE_PRIMARYKEYS_AS_ATTRIBUTES, and
   SQLGenerateOptions.GENERATE_ID_AND_IDREF

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.

getRecurse

public Boolean getRecurse()

Returns a Boolean value indicating whether the queries should also be performed on the target tables when foreign key columns are found from the current query.

getStatement

public String getStatement()

Returns current SQL statement to be executed.

getVarTypes

public java.util.Vector getVarTypes()

Deprecated. Returns a sequence of substitution parameter types when used. VarTypes are used when a SQL statement contains substitution parameters, such as '?', and the user wants to indicate the data types for those parameters explicitly.

load

public void load(InputStream stream) throws Exception

Loads necessary query 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 a query file. The query file name uses an .xst extension.

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.

setFormat

public void setFormat(String newFormat)

Sets a format option. Available output formats are:

   GENERATE_AS_ELEMENTS,
   GENERATE_AS_ATTRIBUTES,
   GENERATE_PRIMARYKEYS_AS_ATTRIBUTES, and
   GENERATE_ID_AND_IDREF

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.

setRecurse

public void setRecurse(Boolean newRecurse)

Sets a Boolean value indicating whether the queries should also be performed on the target tables when foreign key columns are found from the current query.

setStatement

public void setStatement(String newStatement)

Sets current SQL statement.

setVarTypes

public void setVarTypes(Vector types)

Deprecated. VarTypes are used when a SQL statement contains substitution parameters, such as '?', and the user wants to indicate the data types for those parameters explicitly.

store

public void store(String xstFilename) throws Exception

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

Related reference
Class com.ibm.etools.sqltoxml.SQLToXML
Class com.ibm.etools.sqltoxml.BaseProperties