Download Stylus Studio - The World's Best XML Development Environment!


com.ddtek.jxtr
Class JXTRQueryBase

java.lang.Object
  |
  +--com.ddtek.jxtr.JXTRBase
        |
        +--com.ddtek.jxtr.JXTRQueryBase
Direct Known Subclasses:
JXTRQuery, JXTRResultSetWrapper

public abstract class JXTRQueryBase
extends JXTRBase

JXTRQueryBase is an abstract base class implementing methods shared by all jXTransformer query classes (JXTRQuery, JXTRResultSetWrapper).


Field Summary
static int JDBC_PREPARED_STAT
          Value that sets preference to use a java.sql.PreparedStatement during jXTransformer query processing.
static int JDBC_STAT
          Value that sets preference to use a java.sql.Statement during jXTransformer query processing.
static int JDBC_STATTYPE_NOTSET
          Value that makes information about the statement type used unavailable.
 
Fields inherited from class com.ddtek.jxtr.JXTRBase
BINARY_AS_BASE64, BINARY_AS_HEX, TIMESTAMP_AS_ISO8601, TIMESTAMP_AS_ODBC
 
Method Summary
 void addDocumentComment(java.lang.String comment)
          Adds a document-level comment.
 void addDocumentPI(java.lang.String target, java.lang.String data)
          Adds a document-level processing instruction.
 void addRootAttribute(java.lang.String attribName, java.lang.String attribValue)
          Adds an attribute to the root element.
 void addRootNameSpace(java.lang.String URI)
          Sets the default namespace for the root element.
 void addRootNameSpace(java.lang.String prefix, java.lang.String URI)
          Adds a namespace to the root element.
abstract  void dump(java.io.Writer dumpTo)
          Dumps the JXTRQuery internal structure.
abstract  org.w3c.dom.Document executeDOM()
          Executes the jXTransformer query and returns the XML result as a DOM level 2 document object.
abstract  void executeDOM(org.w3c.dom.Node domNode)
          Executes the jXTransformer query and creates the XML result under the specified DOM level 2 node.
abstract  org.jdom.Document executeJDOM()
          Executes the jXTransformer query and returns a JDOM document.
abstract  void executeJDOM(org.jdom.Element domElement)
          Executes the jXTransformer query and creates the XML result under the specified JDOM element node.
abstract  void executeSAX(org.xml.sax.XMLReader xmlReader)
          Executes the jXTransformer query and invokes SAX2 callbacks registered with the specified XMLReader.
abstract  void executeWriter(java.io.Writer xmlWriter, boolean outputDocHeader)
          Executes the jXTransformer query and writes the XML as a character stream to the specified writer, which should use UTF-8 encoding.
abstract  void executeWriter(java.io.Writer xmlWriter, boolean outputDocHeader, int indentLevel)
          Executes the jXTransformer query and writes the XML result as a character stream to the specified writer, which should use UTF-8 encoding.
abstract  void executeWriter(java.io.Writer xmlWriter, boolean outputDocHeader, java.lang.String encoding)
          Executes the jXTransformer query and writes the XML result as a character stream to the specified writer, which should use the specified encoding.
abstract  void executeWriter(java.io.Writer xmlWriter, boolean outputDocHeader, java.lang.String encoding, int indentLevel)
          Executes the jXTransformer query and writes the XML as a character stream to the specified writer, which should use the specified encoding.
abstract  void generateDTD(java.io.Writer dtdWriter)
          Generates a DTD describing the structure of the jXTransformer query result and writes the DTD to the specified Writer.
abstract  void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap)
          Generates multiple XML Schemas describing the structure of the jXTransformer query result.
abstract  void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap, int indentLevel)
          Generates multiple XML Schemas describing the structure of the jXTransformer query result.
abstract  void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap, java.lang.String encoding)
          Generates multiple XML Schemas describing the structure of the jXTransformer query result.
abstract  void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap, java.lang.String encoding, int indentLevel)
          Generates multiple XML Schemas describing the structure of the jXTransformer query result.
abstract  void generateXMLSchema(java.io.Writer schemaWriter)
          Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer.
abstract  void generateXMLSchema(java.io.Writer schemaWriter, java.lang.String targetNamespace)
          Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use UTF-8 encoding.
abstract  void generateXMLSchema(java.io.Writer schemaWriter, java.lang.String targetNamespace, int indentLevel)
          Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use UTF-8 encoding.
abstract  void generateXMLSchema(java.io.Writer schemaWriter, java.lang.String targetNamespace, java.lang.String encoding)
          Generates an XML Schema describing the structure of the jXTransformer query result and writes the result to the specified Writer, which should use the specified encoding.
abstract  void generateXMLSchema(java.io.Writer schemaWriter, java.lang.String targetNamespace, java.lang.String encoding, int indentLevel)
          Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use the specified encoding.
 int getBinaryEncoding()
          Returns the type of binary encoding.
 JXTRDatabaseExtension getDatabaseExtension()
          Gets the specific JXTRDatabaseExtension.
 int getJDBCStatType()
          Returns the type of JDBC statement that was used to process the jXTransformer query.
 int getPreferredJDBCStatType()
          Returns the preference setting for the type of JDBC statement.
 int getTimestampEncoding()
          Returns the type of timestamp encoding.
 void setBigDecimal(int paramIx, java.math.BigDecimal paramValue)
          Sets the specified parameter index to the specified BigDecimal value.
 void setBinaryEncoding(int encoding)
          Sets the type of encoding for binary values (either BINARY_AS_BASE64 or BINARY_AS_HEX).
 void setBoolean(int paramIx, boolean paramValue)
          Sets the specified parameter index to the specified boolean value.
 void setByte(int paramIx, byte paramValue)
          Sets the specified parameter index to the specified byte value.
 void setBytes(int paramIx, byte[] paramValue)
          Sets the specified parameter index to the specified byte array value.
 void setDatabaseExtension(JXTRDatabaseExtension databaseExtension)
          Sets the jXTransformer database extension.
 void setDate(int paramIx, java.sql.Date paramValue)
          Sets the specified parameter index to the specified date value.
 void setDouble(int paramIx, double paramValue)
          Sets the specified parameter index to the specified double value.
 void setExternalDTD(java.lang.String systemURI)
          Sets an external DTD reference.
 void setExternalDTD(java.lang.String publicId, java.lang.String systemURI)
          Sets the public external DTD reference.
 void setFloat(int paramIx, float paramValue)
          Sets the specified parameter index to the specified float value.
 void setInt(int paramIx, int paramValue)
          Sets the specified parameter index to the specified int value.
 void setLong(int paramIx, long paramValue)
          Sets the specified parameter index to the specified long value.
 void setNull(int paramIx, int jdbcType)
          Sets the specified parameter index to a NULL value.
 void setNullReplacementValue(java.lang.String defNullValue)
          Sets the replacement value to use when a NULL value is retrieved.
 void setObject(int paramIx, java.lang.Object paramValue)
          Sets the specified parameter index to the specified object.
 void setObject(int paramIx, java.lang.Object paramValue, int targetJdbcType)
          Sets the specified parameter index to the specified object.
 void setObject(int paramIx, java.lang.Object paramValue, int targetJdbcType, int scale)
          Sets the specified parameter index to the specified object.
 void setPreferredJDBCStatType(int statType)
          Sets the preference for the type of JDBC statement to use (either JDBC_PREPARED_STAT or JDBC_STAT).
 void setRootTag(java.lang.String rootTag)
          Sets the root element name for the XML result of the jXTransformer query.
 void setShort(int paramIx, short paramValue)
          Sets the specified parameter index to the specified short value.
 void setString(int paramIx, java.lang.String paramValue)
          Sets the specified parameter index to the specified string value.
 void setTime(int paramIx, java.sql.Time paramValue)
          Sets the specified parameter index to the specified time value.
 void setTimestamp(int paramIx, java.sql.Timestamp paramValue)
          Sets the specified parameter index to the specified timestamp value.
 void setTimestampEncoding(int encoding)
          Sets the type of encoding for timestamp values (either TIMESTAMP_AS_ISO8601 or TIMESTAMP_AS_ODBC).
 
Methods inherited from class com.ddtek.jxtr.JXTRBase
clearWarnings, close, getPreparedStatementCloseBehaviour, getWarnings, setPreparedStatementCloseBehaviour, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDBC_STATTYPE_NOTSET

public static final int JDBC_STATTYPE_NOTSET
Value that makes information about the statement type used unavailable. See getJDBCStatType().

See Also:
Constant Field Values

JDBC_PREPARED_STAT

public static final int JDBC_PREPARED_STAT
Value that sets preference to use a java.sql.PreparedStatement during jXTransformer query processing. See setPreferredJDBCStatType(int).

See Also:
Constant Field Values

JDBC_STAT

public static final int JDBC_STAT
Value that sets preference to use a java.sql.Statement during jXTransformer query processing. See setPreferredJDBCStatType(int).

See Also:
Constant Field Values
Method Detail

executeDOM

public abstract org.w3c.dom.Document executeDOM()
                                         throws JXTRException
Executes the jXTransformer query and returns the XML result as a DOM level 2 document object.

To create the DOM level 2 object, Connect for SQL/XML uses JAXP 1.1. Any DOM level 2 implementation that supports JAXP 1.1 can be used.

Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeDOM

public abstract void executeDOM(org.w3c.dom.Node domNode)
                         throws JXTRException
Executes the jXTransformer query and creates the XML result under the specified DOM level 2 node.

Parameters:
domNode - DOM level 2 node under which the XML result will be created.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeWriter

public abstract void executeWriter(java.io.Writer xmlWriter,
                                   boolean outputDocHeader)
                            throws JXTRException
Executes the jXTransformer query and writes the XML as a character stream to the specified writer, which should use UTF-8 encoding.

Parameters:
xmlWriter - Writer to which the XML result will be streamed.
outputDocHeader - When set to false, no XML document header or root element will be created. When set to true, a complete XML document will be created with a document header and root element. If a root element is not specified, a default root element of jxtr-result will be used (see setRootTag(String)).
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeWriter

public abstract void executeWriter(java.io.Writer xmlWriter,
                                   boolean outputDocHeader,
                                   int indentLevel)
                            throws JXTRException
Executes the jXTransformer query and writes the XML result as a character stream to the specified writer, which should use UTF-8 encoding. Each element level in the XML result is indented by the specified number of spaces.

Parameters:
xmlWriter - Writer to which the XML document will be streamed.
outputDocHeader - When set to false, no XML document header or root element will be created. When set to true, a complete XML document will be created with a document header and root element. If a root element is not specified, a default root element of jxtr-result will be used (see setRootTag(String)).
indentLevel - Number of spaces each element level will be indented.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeWriter

public abstract void executeWriter(java.io.Writer xmlWriter,
                                   boolean outputDocHeader,
                                   java.lang.String encoding)
                            throws JXTRException
Executes the jXTransformer query and writes the XML result as a character stream to the specified writer, which should use the specified encoding.

Parameters:
xmlWriter - Writer to which the XML result will be streamed.
outputDocHeader - When set to false, no XML document header or root element will be created. When set to true, a complete XML document will be created with a document header and root element. If a root element is not specified, a default root element of jxtr-result will be used (see setRootTag(String)).
encoding - Encoding the specified writer will use.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeWriter

public abstract void executeWriter(java.io.Writer xmlWriter,
                                   boolean outputDocHeader,
                                   java.lang.String encoding,
                                   int indentLevel)
                            throws JXTRException
Executes the jXTransformer query and writes the XML as a character stream to the specified writer, which should use the specified encoding. Each element level in the resulting XML is indented the specified number of spaces.

Parameters:
xmlWriter - Writer to which the XML document will be streamed.
outputDocHeader - When set to false, no XML document header or root element is created. When set to true, a complete XML document is created with a document header and root element. If a root element is not specified, a default root element of jxtr-result will be used (see setRootTag(String)).
encoding - Encoding the specified writer will use.
indentLevel - Number of spaces each element level will be indented.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeJDOM

public abstract org.jdom.Document executeJDOM()
                                       throws JXTRException
Executes the jXTransformer query and returns a JDOM document.

Returns:
Generated JDOM document.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, org.jdom.Document

executeJDOM

public abstract void executeJDOM(org.jdom.Element domElement)
                          throws JXTRException
Executes the jXTransformer query and creates the XML result under the specified JDOM element node.

Parameters:
domElement - JDOM element node under which the resulting XML will be created.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

dump

public abstract void dump(java.io.Writer dumpTo)
                   throws JXTRException
Dumps the JXTRQuery internal structure. Only used for troubleshooting purposes.

Parameters:
dumpTo - Writer to which the information will be dumped.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

executeSAX

public abstract void executeSAX(org.xml.sax.XMLReader xmlReader)
                         throws JXTRException
Executes the jXTransformer query and invokes SAX2 callbacks registered with the specified XMLReader.

The xmlReader must be an object of type JXTRSaxReader or the xmlReader features must be set as supported by JXTRSaxReader.

Parameters:
xmlReader - SAX2 XML Reader whose registered handlers will receive the SAX2 events.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

generateDTD

public abstract void generateDTD(java.io.Writer dtdWriter)
                          throws JXTRException
Generates a DTD describing the structure of the jXTransformer query result and writes the DTD to the specified Writer.

Parameters:
dtdWriter - Writer to which the DTD will be written.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

generateXMLSchema

public abstract void generateXMLSchema(java.io.Writer schemaWriter)
                                throws JXTRException
Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer. The generated XML Schema is compliant with the W3C Recommendation, 2 May 2001.

Parameters:
schemaWriter - Writer to which the XML Schema will be written.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.io.Writer schemaWriter,
                                       java.lang.String targetNamespace)
                                throws JXTRException
Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use UTF-8 encoding. An XML Schema is generated for the specified namespace. The generated XML Schema is compliant with the W3C Recommendation, 2 May 2001.

Parameters:
schemaWriter - Writer to which the XML Schema will be written.
targetNamespace - Namespace for which the XML Schema will be generated or null to generate an XML Schema for those elements/attributes that do not have a namespace.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.io.Writer schemaWriter,
                                       java.lang.String targetNamespace,
                                       java.lang.String encoding)
                                throws JXTRException
Generates an XML Schema describing the structure of the jXTransformer query result and writes the result to the specified Writer, which should use the specified encoding. An XML Schema is generated for the specified namespace. The generated XML Schema is compliant with the W3C Recommendation, 2 May 2001.

Parameters:
schemaWriter - Writer to which the XML Schema will be written.
targetNamespace - Namespace for which the XML Schema will be generated or null to generate an XML Schema for those elements/attributes that do not have a namespace.
encoding - Encoding the specified writer will use.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.io.Writer schemaWriter,
                                       java.lang.String targetNamespace,
                                       int indentLevel)
                                throws JXTRException
Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use UTF-8 encoding. The element levels in the generated XML Schema are indented by the specified number of spaces. The generated XML Schema is compliant with the W3C Recommendation, 2 May 2001.

Parameters:
schemaWriter - Writer to which the XML Schema will be written.
targetNamespace - Namespace for which the XML Schema will be generated or null to generate an XML Schema for those elements/attributes that do not have a namespace.
indentLevel - Number of spaces to indent each element level.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.io.Writer schemaWriter,
                                       java.lang.String targetNamespace,
                                       java.lang.String encoding,
                                       int indentLevel)
                                throws JXTRException
Generates an XML Schema describing the structure of the jXTransformer query result and writes the XML Schema to the specified Writer, which should use the specified encoding. An XML Schema is generated for the specified namespace. The element levels in the generated XML Schema are indented by the specified number of spaces. The generated XML Schema is compliant with the W3C Recommendation, 2 May 2001.

Parameters:
schemaWriter - Writer to which the XML Schema is written.
targetNamespace - Namespace for which the XML Schema will be generated or null to generate an XML Schema for those elements/attributes that do not have a namespace.
encoding - Encoding the specified writer will use.
indentLevel - Number of spaces to indent each element level.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap)
                                throws JXTRException
Generates multiple XML Schemas describing the structure of the jXTransformer query result. The specified HashMap maps namespace URIs to filenames. As a result, one XML Schema is generated for each specified namespace. Each XML Schema is written using UTF-8 encoding in the specified file associated with the namespace. The generated XML Schemas are compliant with the W3C Recommendation, 2 May 2001.

Parameters:
targetNamespaceSchemaFileMap - Map containing the namespaces (keys) and their associated output XML Schema filenames (values). A null key is used to generate XML Schemas for elements/attributes that do not have a namespace.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap,
                                       java.lang.String encoding)
                                throws JXTRException
Generates multiple XML Schemas describing the structure of the jXTransformer query result. The specified HashMap maps namespace URIs to filenames. As a result, one XML Schema is generated for each specified namespace. Each XML Schema is written using the specified encoding in the specified file associated with the namespace. The generated XML Schemas are compliant with the W3C Recommendation, 2 May 2001.

Parameters:
targetNamespaceSchemaFileMap - Map containing the namespaces (keys) and their associated output XML Schema filenames (values). A null key is used to generate XML Schemas for elements/attributes that do not have a namespace.
encoding - Encoding the specified writer will use.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap,
                                       int indentLevel)
                                throws JXTRException
Generates multiple XML Schemas describing the structure of the jXTransformer query result. The specified HashMap maps namespace URIs to filenames. As a result, one XML Schema is generated for each specified namespace. Each XML Schema is written using UTF-8 encoding in the file associated with the specified namespace. Element levels in the generated XML Schemas are indented by the specified number of spaces. The generated XML Schemas are compliant with the W3C Recommendation, 2 May 2001.

Parameters:
targetNamespaceSchemaFileMap - Map containing the namespaces (keys) and their associated output XML Schema filenames (values). A null key is used to generate XML Schemas for elements/attributes that do not have a namespace.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

generateXMLSchema

public abstract void generateXMLSchema(java.util.Map targetNamespaceSchemaFileMap,
                                       java.lang.String encoding,
                                       int indentLevel)
                                throws JXTRException
Generates multiple XML Schemas describing the structure of the jXTransformer query result. The specified HashMap maps namespace URIs to filenames. As a result, one XML Schema is generated for each specified namespace. The XML Schemas are written using the specified encoding in the file associated with the specified namespace. Element levels in the generated XML Schemas are indented by the specified number of spaces. The generated XML Schemas are compliant with the W3C Recommendation, 2 May 2001.

Parameters:
targetNamespaceSchemaFileMap - Map containing the namespaces (keys) and their associated output XML Schema filenames (values). A null key is used to generate XML Schemas for elements/attributes that do not have a namespace.
encoding - Encoding the specified writer will use.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException, XML Schema Part 0: Primer, XML Schema Part 1: Structures, XML Schema Part 2: Datatypes

setBigDecimal

public void setBigDecimal(int paramIx,
                          java.math.BigDecimal paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified BigDecimal value.

Specified by:
setBigDecimal in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setBigDecimal

setBoolean

public void setBoolean(int paramIx,
                       boolean paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified boolean value.

Specified by:
setBoolean in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setBoolean

setByte

public void setByte(int paramIx,
                    byte paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified byte value.

Specified by:
setByte in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setByte

setBytes

public void setBytes(int paramIx,
                     byte[] paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified byte array value.

Specified by:
setBytes in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setBytes

setInt

public void setInt(int paramIx,
                   int paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified int value.

Specified by:
setInt in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setInt

setObject

public void setObject(int paramIx,
                      java.lang.Object paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified object.

Specified by:
setObject in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setObject

setObject

public void setObject(int paramIx,
                      java.lang.Object paramValue,
                      int targetJdbcType)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified object.

Specified by:
setObject in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
targetJdbcType - Target JDBC type for the parameter
See Also:
java.sql.PreparedStatement.setObject

setObject

public void setObject(int paramIx,
                      java.lang.Object paramValue,
                      int targetJdbcType,
                      int scale)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified object.

Specified by:
setObject in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
targetJdbcType - Target JDBC type for the parameter
scale - Scale for numeric and decimal JDBC types
See Also:
java.sql.PreparedStatement.setObject

setString

public void setString(int paramIx,
                      java.lang.String paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified string value.

Specified by:
setString in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setString

setShort

public void setShort(int paramIx,
                     short paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified short value.

Specified by:
setShort in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setShort

setLong

public void setLong(int paramIx,
                    long paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified long value.

Specified by:
setLong in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setLong

setFloat

public void setFloat(int paramIx,
                     float paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified float value.

Specified by:
setFloat in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setFloat

setDouble

public void setDouble(int paramIx,
                      double paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified double value.

Specified by:
setDouble in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setDouble

setDate

public void setDate(int paramIx,
                    java.sql.Date paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified date value.

Specified by:
setDate in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setDate

setTime

public void setTime(int paramIx,
                    java.sql.Time paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified time value.

Specified by:
setTime in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setTime

setTimestamp

public void setTimestamp(int paramIx,
                         java.sql.Timestamp paramValue)
Description copied from class: JXTRBase
Sets the specified parameter index to the specified timestamp value.

Specified by:
setTimestamp in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
paramValue - Value for the parameter
See Also:
java.sql.PreparedStatement.setTimestamp

setNull

public void setNull(int paramIx,
                    int jdbcType)
Description copied from class: JXTRBase
Sets the specified parameter index to a NULL value.

Specified by:
setNull in class JXTRBase
Parameters:
paramIx - Index of parameter to set (1 based)
jdbcType - JDBC type for the parameter
See Also:
java.sql.PreparedStatement.setNull

setRootTag

public void setRootTag(java.lang.String rootTag)
                throws JXTRException
Sets the root element name for the XML result of the jXTransformer query. Use to specify the root element when no root element is specified in the query or use to overide the root element specified in the query.

The following execute methods generate complete XML documents (as opposed to XML document fragments):

Parameters:
rootTag - Root element name.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

addRootNameSpace

public void addRootNameSpace(java.lang.String prefix,
                             java.lang.String URI)
Adds a namespace to the root element.

Parameters:
prefix - Namespace prefix.
URI - Namespace URI.

addRootNameSpace

public void addRootNameSpace(java.lang.String URI)
Sets the default namespace for the root element.

Parameters:
URI - Namespace URI.

addRootAttribute

public void addRootAttribute(java.lang.String attribName,
                             java.lang.String attribValue)
Adds an attribute to the root element.

Parameters:
attribName - Name of attribute.
attribValue - Value for attribute.

setExternalDTD

public void setExternalDTD(java.lang.String systemURI)
                    throws JXTRException
Sets an external DTD reference.

Parameters:
systemURI - System URI for the DTD to reference.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
JXTRException
See Also:
JXTRException

setExternalDTD

public void setExternalDTD(java.lang.String publicId,
                           java.lang.String systemURI)
                    throws JXTRException
Sets the public external DTD reference.

Parameters:
publicId - Public DTD identifier.
systemURI - System URI for DTD reference.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
JXTRException
See Also:
JXTRException

addDocumentPI

public void addDocumentPI(java.lang.String target,
                          java.lang.String data)
Adds a document-level processing instruction.

Parameters:
target - Target of the processing instruction.
data - Valid XML processing instruction.

addDocumentComment

public void addDocumentComment(java.lang.String comment)
Adds a document-level comment.

Parameters:
comment - Comment.

setNullReplacementValue

public void setNullReplacementValue(java.lang.String defNullValue)
Sets the replacement value to use when a NULL value is retrieved. If this value is set to NULL, no XML element or attribute is created for the NULL value.

Specified by:
setNullReplacementValue in class JXTRBase
Parameters:
defNullValue - Value used to replace a NULL value when one is retrieved. The replacement value is output to the XML result instead of the NULL value.

getDatabaseExtension

public JXTRDatabaseExtension getDatabaseExtension()
Gets the specific JXTRDatabaseExtension.

Returns:
the JXTRDatabaseExtension.

setDatabaseExtension

public void setDatabaseExtension(JXTRDatabaseExtension databaseExtension)
Sets the jXTransformer database extension.

Parameters:
databaseExtension - jXTransformer database extension to be used.

setTimestampEncoding

public void setTimestampEncoding(int encoding)
Sets the type of encoding for timestamp values (either TIMESTAMP_AS_ISO8601 or TIMESTAMP_AS_ODBC). Default is TIMESTAMP_AS_ODBC.

Specified by:
setTimestampEncoding in class JXTRBase
Parameters:
encoding - Encoding to use for timestamp values.

getTimestampEncoding

public int getTimestampEncoding()
Returns the type of timestamp encoding.

Specified by:
getTimestampEncoding in class JXTRBase
Returns:
TIMESTAMP_AS_ISO8601 or TIMESTAMP_AS_ODBC

setBinaryEncoding

public void setBinaryEncoding(int encoding)
Sets the type of encoding for binary values (either BINARY_AS_BASE64 or BINARY_AS_HEX). Default is BINARY_AS_BASE64.

Specified by:
setBinaryEncoding in class JXTRBase
Parameters:
encoding - Encoding to use for timestamp values.

getBinaryEncoding

public int getBinaryEncoding()
Returns the type of binary encoding.

Specified by:
getBinaryEncoding in class JXTRBase
Returns:
BINARY_AS_BASE64 or BINARY_AS_HEX.

setPreferredJDBCStatType

public void setPreferredJDBCStatType(int statType)
                              throws JXTRException
Sets the preference for the type of JDBC statement to use (either JDBC_PREPARED_STAT or JDBC_STAT).

Provides a hint to determine whether to use java.sql.PreparedStatement or java.sql.Statement objects when processing the query.

Because all JXTRQueryBase instances cannot be executed using a java.sql.Statement, this setting is only a hint. When the JXTRQueryBase is initialised with a jXTransformer query that contains parameter markers (bind markers) or when the nested loop algorithm is used to process the query, the query processor will always use one or more java.sql.PreparedStatement objects to communicate with the RDBMS.

Parameters:
statType - Either JDBC_PREPARED_STAT or JDBC_STAT.
Throws:
JXTRException - Refer to the JXTRException class for more information about possible error conditions.
See Also:
JXTRException

getPreferredJDBCStatType

public int getPreferredJDBCStatType()
Returns the preference setting for the type of JDBC statement.

Returns:
JDBC_PREPARED_STAT or JDBC_STAT.
See Also:
setPreferredJDBCStatType(int)

getJDBCStatType

public int getJDBCStatType()
Returns the type of JDBC statement that was used to process the jXTransformer query.

Returns:
JDBC_PREPARED_STAT, JDBC_STAT, or JDBC_STATTYPE_NOTSET.


Stylus Studio features SQL/XML tools for building XML views of relational data.