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


com.ddtek.jxtr
Class JXTRBase

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

public abstract class JXTRBase
extends java.lang.Object

JXTRBase is an abstract base class that defines and implements methods shared by all Connect for SQL/XML statement classes.

See Also:
JXTRResultSetWrapper, JXTRQuery, JXTRSingleTableUpdate, JXTRUpdate

Field Summary
static int BINARY_AS_BASE64
          Sets base64 encoding for binary values.
static int BINARY_AS_HEX
          Sets hexadecimal encoding for binary values.
static int TIMESTAMP_AS_ISO8601
          Sets ISO8601 encoding (YYYY-MM-DDTHH:MI:SS.F) for timestamp values.
static int TIMESTAMP_AS_ODBC
          Sets ODBC encoding (YYYY-MM-DD HH:MI:SS.F) for timestamp values.
 
Constructor Summary
JXTRBase()
          Constructs a new JXTRBase.
 
Method Summary
 void clearWarnings()
          Clears all the warnings reported on this object.
abstract  void close()
          Closes database prepared statement(s).
abstract  int getBinaryEncoding()
          Returns the type of binary decoding.
 boolean getPreparedStatementCloseBehaviour()
          Indicates whether database prepared statements are closed after executing this object.
abstract  int getTimestampEncoding()
          Returns the type of timestamp decoding.
 JXTRWarning getWarnings()
          Retrieves the first warning reported by calls on this object.
abstract  void setBigDecimal(int paramIx, java.math.BigDecimal paramValue)
          Sets the specified parameter index to the specified BigDecimal value.
abstract  void setBinaryEncoding(int binaryCoding)
          Sets the type of encoding/decoding for binary values.
abstract  void setBoolean(int paramIx, boolean paramValue)
          Sets the specified parameter index to the specified boolean value.
abstract  void setByte(int paramIx, byte paramValue)
          Sets the specified parameter index to the specified byte value.
abstract  void setBytes(int paramIx, byte[] paramValue)
          Sets the specified parameter index to the specified byte array value.
abstract  void setDate(int paramIx, java.sql.Date paramValue)
          Sets the specified parameter index to the specified date value.
abstract  void setDouble(int paramIx, double paramValue)
          Sets the specified parameter index to the specified double value.
abstract  void setFloat(int paramIx, float paramValue)
          Sets the specified parameter index to the specified float value.
abstract  void setInt(int paramIx, int paramValue)
          Sets the specified parameter index to the specified int value.
abstract  void setLong(int paramIx, long paramValue)
          Sets the specified parameter index to the specified long value.
abstract  void setNull(int paramIx, int jdbcType)
          Sets the specified parameter index to a NULL value.
abstract  void setNullReplacementValue(java.lang.String defNullValue)
          Sets the replacement value to use if a NULL value is encountered when selecting data from a database or if no value is found in the XML document being used as input to a jXTransformer write statement.
abstract  void setObject(int paramIx, java.lang.Object paramValue)
          Sets the specified parameter index to the specified object.
abstract  void setObject(int paramIx, java.lang.Object paramValue, int targetJdbcType)
          Sets the specified parameter index to the specified object.
abstract  void setObject(int paramIx, java.lang.Object paramValue, int targetJdbcType, int scale)
          Sets the specified parameter index to the specified object.
 void setPreparedStatementCloseBehaviour(boolean autoClose)
          Specifies how to handle the closing of JDBC PreparedStatement objects that are created to execute this Connect for SQL/XML statement.
abstract  void setShort(int paramIx, short paramValue)
          Sets the specified parameter index to the specified short value.
abstract  void setString(int paramIx, java.lang.String paramValue)
          Sets the specified parameter index to the specified string value.
abstract  void setTime(int paramIx, java.sql.Time paramValue)
          Sets the specified parameter index to the specified time value.
abstract  void setTimestamp(int paramIx, java.sql.Timestamp paramValue)
          Sets the specified parameter index to the specified timestamp value.
abstract  void setTimestampEncoding(int timestampCoding)
          Sets the type of encoding for timestamp values.
 boolean unlock(java.lang.String password)
          Unlocks an OEM locked Connect for SQL/XML installation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIMESTAMP_AS_ODBC

public static final int TIMESTAMP_AS_ODBC
Sets ODBC encoding (YYYY-MM-DD HH:MI:SS.F) for timestamp values. This is the default encoding for timestamp values.

See Also:
setTimestampEncoding(int), Constant Field Values

TIMESTAMP_AS_ISO8601

public static final int TIMESTAMP_AS_ISO8601
Sets ISO8601 encoding (YYYY-MM-DDTHH:MI:SS.F) for timestamp values.

See Also:
setTimestampEncoding(int), Constant Field Values

BINARY_AS_BASE64

public static final int BINARY_AS_BASE64
Sets base64 encoding for binary values. This is the default encoding for binary values.

See Also:
setBinaryEncoding(int), Constant Field Values

BINARY_AS_HEX

public static final int BINARY_AS_HEX
Sets hexadecimal encoding for binary values.

See Also:
setBinaryEncoding(int), Constant Field Values
Constructor Detail

JXTRBase

public JXTRBase()
Constructs a new JXTRBase.

Method Detail

setBigDecimal

public abstract void setBigDecimal(int paramIx,
                                   java.math.BigDecimal paramValue)
Sets the specified parameter index to the specified BigDecimal value.

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

setBoolean

public abstract void setBoolean(int paramIx,
                                boolean paramValue)
Sets the specified parameter index to the specified boolean value.

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

setByte

public abstract void setByte(int paramIx,
                             byte paramValue)
Sets the specified parameter index to the specified byte value.

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

setBytes

public abstract void setBytes(int paramIx,
                              byte[] paramValue)
Sets the specified parameter index to the specified byte array value.

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

setInt

public abstract void setInt(int paramIx,
                            int paramValue)
Sets the specified parameter index to the specified int value.

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

setObject

public abstract void setObject(int paramIx,
                               java.lang.Object paramValue)
Sets the specified parameter index to the specified object.

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

setObject

public abstract void setObject(int paramIx,
                               java.lang.Object paramValue,
                               int targetJdbcType)
Sets the specified parameter index to the specified object.

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 abstract void setObject(int paramIx,
                               java.lang.Object paramValue,
                               int targetJdbcType,
                               int scale)
Sets the specified parameter index to the specified object.

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 abstract void setString(int paramIx,
                               java.lang.String paramValue)
Sets the specified parameter index to the specified string value.

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

setShort

public abstract void setShort(int paramIx,
                              short paramValue)
Sets the specified parameter index to the specified short value.

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

setLong

public abstract void setLong(int paramIx,
                             long paramValue)
Sets the specified parameter index to the specified long value.

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

setFloat

public abstract void setFloat(int paramIx,
                              float paramValue)
Sets the specified parameter index to the specified float value.

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

setDouble

public abstract void setDouble(int paramIx,
                               double paramValue)
Sets the specified parameter index to the specified double value.

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

setDate

public abstract void setDate(int paramIx,
                             java.sql.Date paramValue)
Sets the specified parameter index to the specified date value.

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

setTime

public abstract void setTime(int paramIx,
                             java.sql.Time paramValue)
Sets the specified parameter index to the specified time value.

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

setTimestamp

public abstract void setTimestamp(int paramIx,
                                  java.sql.Timestamp paramValue)
Sets the specified parameter index to the specified timestamp value.

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

setNull

public abstract void setNull(int paramIx,
                             int jdbcType)
Sets the specified parameter index to a NULL value.

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

setTimestampEncoding

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


getTimestampEncoding

public abstract int getTimestampEncoding()
Returns the type of timestamp decoding.

Returns:
TIMESTAMP_AS_ISO8601 or TIMESTAMP_AS_ODBC

setBinaryEncoding

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


getBinaryEncoding

public abstract int getBinaryEncoding()
Returns the type of binary decoding.

Returns:
BINARY_AS_BASE64 or BINARY_AS_HEX

setNullReplacementValue

public abstract void setNullReplacementValue(java.lang.String defNullValue)
Sets the replacement value to use if a NULL value is encountered when selecting data from a database or if no value is found in the XML document being used as input to a jXTransformer write statement.

Parameters:
defNullValue - Value used to replace a NULL value if a NULL value is encountered

setPreparedStatementCloseBehaviour

public void setPreparedStatementCloseBehaviour(boolean autoClose)
Specifies how to handle the closing of JDBC PreparedStatement objects that are created to execute this Connect for SQL/XML statement.

When autoClose is set to true (the default), All JDBC PreparedStatement objects that were opened to execute this Connect for SQL/XML statement are automatically closed after the statement is executed.

This does not apply to JXTRQuery or JXTRResultSetWrapper objects for which the preferred JDBC statement type is set to JDBC_STAT (see JXTRQueryBase.setPreferredJDBCStatType(int).

If set to false, the JDBC PreparedStatement objects remain open after execution and are reused when this Connect for SQL/XML statement is re-executed. In this case, an explicit call to close() must be made to close all JDBC preparedStatement objects and release the associated resources.

Parameters:
autoClose - Automatically closes database prepared statements
See Also:
getPreparedStatementCloseBehaviour(), close()

getPreparedStatementCloseBehaviour

public boolean getPreparedStatementCloseBehaviour()
Indicates whether database prepared statements are closed after executing this object.

Returns:
whether database prepared statements are closed after executing this object.
See Also:
setPreparedStatementCloseBehaviour(boolean), close()

close

public abstract void close()
                    throws JXTRException
Closes database prepared statement(s).

Throws:
JXTRException - if an error occured during closing of resources or database statement(s).

getWarnings

public JXTRWarning getWarnings()
                        throws JXTRException
Retrieves the first warning reported by calls on this object. Subsequent warnings will be chained to this JXTRWarning object.

The warning chain is automatically cleared each time this object is (re)executed. This method cannot be called on a closed JXTRBase object; doing so will cause an JXTRException to be thrown.

Note: If you are processing a JXTRResultSet object, any warnings associated with reads on that JXTRResultSet object will be chained on it rather than on the JXTRQuery object that produced it.

Throws:
JXTRException - if this method is called on a closed object.

clearWarnings

public void clearWarnings()
                   throws JXTRException
Clears all the warnings reported on this object. After a call to this method, the method getWarnings will return null until a new warning is reported for this object.

Throws:
JXTRException - if an error occurs when clearing the warnings.

unlock

public boolean unlock(java.lang.String password)
Unlocks an OEM locked Connect for SQL/XML installation. The unlock method returns true when either the Connect for SQL/XML installation has a valid or unexpired demo license installed, or when the Connect for SQL/XML installation is password locked and the provided password is valid. It returns false in all other situations.

Parameters:
password - The password protecting this Connect for SQL/XML installation.


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