com.ibm.as400.access

Class AS400JDBCDataSource

  • java.lang.Object
    • com.ibm.as400.access.AS400JDBCDataSource
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.sql.Wrapper, javax.naming.Referenceable, javax.sql.CommonDataSource, javax.sql.DataSource
    Direct Known Subclasses:
    AS400JDBCConnectionPoolDataSource, AS400JDBCXADataSource


    public class AS400JDBCDataSource
    extends java.lang.Object
    implements javax.sql.DataSource, javax.naming.Referenceable, java.io.Serializable, java.lang.Cloneable
    The AS400JDBCDataSource class represents a factory for IBM i database connections.

    The following is an example that creates an AS400JDBCDataSource object and creates a connection to the database.

      // Create a data source for making the connection.
      AS400JDBCDataSource datasource = new AS400JDBCDataSource("myAS400");
      datasource.setUser("myUser");
      datasource.setPassword("MYPWD");
    
      // Create a database connection to the system.
      Connection connection = datasource.getConnection();
      

    The following example registers an AS400JDBCDataSource object with JNDI and then uses the object returned from JNDI to obtain a database connection.

      // Create a data source to the IBM i database.
      AS400JDBCDataSource dataSource = new AS400JDBCDataSource();
      dataSource.setServerName("myAS400");
    
      // Register the datasource with the Java Naming and Directory Interface (JNDI).
      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
      Context context = new InitialContext(env);
      context.bind("jdbc/customer", dataSource);
    
      // Return an AS400JDBCDataSource object from JNDI and get a connection.
      AS400JDBCDataSource datasource = (AS400JDBCDataSource) context.lookup("jdbc/customer");
      Connection connection = datasource.getConnection("myUser", "MYPWD");
      
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      AS400JDBCDataSource()
      Constructs a default AS400JDBCDataSource object.
      AS400JDBCDataSource(AS400 as400)
      Constructs an AS400JDBCDataSource object with the specified AS400 object
      AS400JDBCDataSource(java.lang.String serverName)
      Constructs an AS400JDBCDataSource object to the specified serverName.
      AS400JDBCDataSource(java.lang.String serverName, java.lang.String user, java.lang.String password)
      Constructs an AS400JDBCDataSource object with the specified signon information.
      AS400JDBCDataSource(java.lang.String serverName, java.lang.String user, java.lang.String password, java.lang.String keyRingNameX, java.lang.String keyRingPasswordX)
      Deprecated. 
      Sslight not supported
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
      Adds a PropertyChangeListener.
      java.lang.Object clone()
      Method to create a clone of AS400JDBCDataSource.
      java.lang.String getAccess()
      Returns the level of database access for the connection.
      int getAffinityFailbackInterval()
      Returns the affinityFailbackInterval setting.
      int getBehaviorOverride()
      Returns what behaviors of the Toolbox JDBC driver have been overridden.
      int getBidiStringType()
      Returns the output string type of bidi data.
      int getBlockCriteria()
      Returns the criteria for retrieving data from the system in blocks of records.
      int getBlockSize()
      Returns the block size in kilobytes to retrieve from the system and cache on the client.
      java.lang.String getCharacterTruncation()
      Returns the behavior to use when character truncation occurs
      java.lang.String getClientRerouteAlternatePortNumber()
      Returns the client reroute alternate server name.
      java.lang.String getClientRerouteAlternateServerName()
      Returns the client reroute alternate server name.
      int getConcurrentAccessResolution()
      This method returns the concurrent access resolution setting.
      java.sql.Connection getConnection()
      Returns the database connection.
      java.sql.Connection getConnection(java.lang.String user, java.lang.String password)
      Returns the database connection using the specified user and password.
      java.lang.String getCursorSensitivity()
      Returns the value of the cursor sensitivity property.
      java.lang.String getDatabaseName()
      Returns the database name property.
      java.lang.String getDataSourceName()
      Returns the data source name property.
      java.lang.String getDateFormat()
      Returns the IBM i date format used in date literals within SQL statements.
      java.lang.String getDateSeparator()
      Returns the IBM i date separator used in date literals within SQL statements.
      java.lang.String getDecfloatRoundingMode()
      Returns the decfloat rounding mode.
      java.lang.String getDecimalDataErrors()
      Returns the decimal data errors property.
      java.lang.String getDecimalSeparator()
      Returns the IBM i decimal separator used in numeric literals within SQL statements.
      java.lang.String getDescribeOption()
      Returns the describe options property.
      java.lang.String getDescription()
      Returns the description of the data source.
      java.lang.String getDriver()
      Returns the JDBC driver implementation.
      int getEnableClientAffinitiesList()
      Returns the enableClientAffinitiesList setting.
      int getEnableSeamlessFailover()
      Returns the enableSeamlessFailover setting.
      java.lang.String getErrors()
      Returns the amount of detail for error messages originating from the IBM i system.
      java.lang.String getIgnoreWarnings()
      Returns the ignore warnings property.
      boolean getKeepAlive()
      Gets the socket keepalive option.
      java.lang.String getLibraries()
      Returns the IBM i system libraries to add to the server job's library list.
      int getLobThreshold()
      Returns the maximum LOB (large object) size in bytes that can be retrieved as part of a result set.
      int getLoginTimeout()
      Returns the timeout value in seconds.
      java.io.PrintWriter getLogWriter()
      Returns the log writer for this data source.
      int getMaximumBlockedInputRows()
      Gets the maximum block input rows.
      int getMaximumPrecision()
      Gets the maximum precision property.
      int getMaximumScale()
      Gets the maximum scale property.
      int getMaxRetriesForClientReroute()
      Returns the maxRetriesForClientReroute setting.
      int getMetadataSource()
      Indicates how to retrieve DatabaseMetaData.
      int getMetaDataSource()
      Indicates how to retrieve DatabaseMetaData.
      int getMinimumDivideScale()
      Gets the minimum divide scale property.
      java.lang.String getNaming()
      Returns the naming convention used when referring to tables.
      java.lang.String getNumericRangeError()
      Returns the behavior to use when an numeric range error occurs
      java.lang.String getPackage()
      Returns the base name of the SQL package.
      int getPackageCcsid()
      Gets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in.
      int getPackageCCSID()
      Gets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in.
      java.lang.String getPackageCriteria()
      Returns the type of SQL statement to be stored in the SQL package.
      java.lang.String getPackageError()
      Returns the action to take when SQL package errors occur.
      java.lang.String getPackageLibrary()
      Returns the library for the SQL package.
      int getPortNumber()
      Returns the port number
      java.lang.String getProxyServer()
      Returns the name of the proxy server.
      java.lang.String getQaqqinilib()
      Returns the QAQQINI library name.
      java.lang.String getQaqqiniLibrary()
      Returns the QAQQINI library name.
      int getQueryOptimizeGoal()
      Returns the goal the IBM i system should use with optimization of queries.
      java.lang.String getQueryReplaceTruncatedParameter()
      Returns the string to be substituted for a truncated parameter on a query.
      int getQueryStorageLimit()
      Returns the storage limit in megabytes, that should be used for statements executing a query in a connection.
      java.lang.String getQueryTimeoutMechanism()
      Returns the mechanism used to implement query timeout.
      int getReceiveBufferSize()
      Gets the socket receive buffer size option.
      javax.naming.Reference getReference()
      Returns the Reference object for the data source object.
      java.lang.String getRemarks()
      Returns the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
      int getRetryIntervalForClientReroute()
      Returns the retryIntervalForClientReroute setting.
      java.lang.String getSecondaryUrl()
      Returns the secondary URL.
      java.lang.String getSecondaryURL()
      Returns the secondary URL.
      int getSendBufferSize()
      Gets the socket send buffer size option.
      java.lang.String getServerName()
      Returns the name of the IBM i system.
      int getServerTrace()
      Returns the level of tracing started on the JDBC server job.
      int getServerTraceCategories()
      Returns the level of tracing started on the JDBC server job.
      int getSocketTimeout()
      Gets the socket timeout option in milliseconds.
      int getSoLinger()
      Gets the socket linger option in seconds.
      java.lang.String getSort()
      Returns how the system sorts records before sending them to the client.
      java.lang.String getSortLanguage()
      Returns the three-character language id to use for selection of a sort sequence.
      java.lang.String getSortTable()
      Returns the library and file name of a sort sequence table stored on the system.
      java.lang.String getSortWeight()
      Returns how the system treats case while sorting records.
      int getSoTimeout()
      Gets the socket timeout option in milliseconds.
      boolean getTcpNoDelay()
      Gets the socket TCP no delay option.
      java.lang.String getTimeFormat()
      Returns the time format used in time literals with SQL statements.
      java.lang.String getTimeSeparator()
      Returns the time separator used in time literals within SQL statements.
      java.lang.String getTimestampFormat()
      Returns the timestamp format used by getString methods.
      java.lang.String getToolboxTrace()
      Returns the toolbox trace category.
      java.lang.String getToolboxTraceCategory()
      Returns the toolbox trace category.
      java.lang.String getTransactionIsolation()
      Returns the system's transaction isolation.
      java.lang.String getTranslateHex()
      Gets the translate hex property, which indicates how the parser will treat hexadecimal literals.
      java.lang.String getUser()
      Returns the database user property.
      protected java.lang.String[] getValidWrappedList() 
      java.lang.String getVariableFieldCompression() 
      int getXALooselyCoupledSupport()
      Indicates whether lock sharing is allowed for loosely coupled transaction branches.
      boolean isAutoCommit()
      Returns whether auto-commit mode is the default connection mode for new connections.
      boolean isAutocommitException()
      Returns whether commit or rollback throws SQLException when autocommit is enabled.
      boolean isBidiImplicitReordering()
      Indicates whether bidi implicit reordering is used.
      boolean isBidiNumericOrdering()
      Indicates whether bidi numeric ordering round trip is used.
      boolean isBigDecimal()
      Indicates whether a big decimal value is returned.
      boolean isCursorHold()
      Indicates whether the cursor is held.
      boolean isDataCompression()
      Indicates whether data compression is used.
      boolean isDataTruncation()
      Indicates whether data truncation is used.
      boolean isExtendedDynamic()
      Indicates whether extended dynamic support is used.
      boolean isExtendedMetadata()
      Indicates whether the driver should request extended metadata from the IBM i system.
      boolean isExtendedMetaData()
      Indicates whether the driver should request extended metadata from the IBM i system.
      boolean isFullOpen()
      Indicates whether the IBM i system fully opens a file when performing a query.
      boolean isHoldInputLocators()
      Indicates whether input locators are of type hold.
      boolean isHoldStatements()
      Indicates whether statements remain open until a transaction boundary when autocommit is off and they are associated with Lob locators.
      boolean isJvm16Synchronize()
      Indicates whether the temporary fix for JVM 1.6 is enabled.
      boolean isKeepAlive()
      Gets the socket keepalive option. -- returns result as boolean
      boolean isLazyClose()
      Indicates whether to delay closing cursors until subsequent requests.
      boolean isPackageAdd()
      Indicates whether to add newly prepared statements to the SQL package specified on the "package" property.
      boolean isPackageCache()
      Indicates whether a subset of the SQL package information is cached in client memory.
      boolean isPackageClear()
      Deprecated.  
      boolean isPrefetch()
      Indicates whether data is prefetched upon executing a SELECT statement.
      boolean isPrompt()
      Indicates whether the user is prompted if a user name or password is needed to connect to the IBM i system.
      boolean isRollbackCursorHold()
      Indicates whether the cursor is held after a rollback.
      boolean isSavePasswordWhenSerialized()
      Indicates whether the password is saved locally with the rest of the properties when this data source object is serialized.
      boolean isSecure()
      Indicates whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system.
      boolean isSecureCurrentUser()
      Returns the secure current user setting.
      boolean isThreadUsed()
      Indicates whether a thread is used.
      boolean isTrace()
      Indicates whether trace messages should be logged.
      boolean isTranslateBinary()
      Indicates whether binary data is translated.
      boolean isTranslateBoolean()
      Indicates how Boolean objects are interpreted when setting the value for a character field/parameter using the PreparedStatement.setObject(), CallableStatement.setObject() or ResultSet.updateObject() methods.
      boolean isTrueAutocommit()
      Indicates whether true auto commit support is used.
      boolean isTrueAutoCommit()
      Indicates whether true auto commit support is used.
      boolean isUseBlockUpdate()
      Indicates whether blocking is used for update and delete operations
      boolean isUseDrdaMetadataVersion()
      Indicates whether DRDA metadata should be returned.
      boolean isVariableFieldCompression()
      Indicates whether variable-length fields are compressed.
      void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
      Removes the PropertyChangeListener.
      void setAccess(java.lang.String access)
      Sets the level of database access for the connection.
      void setAffinityFailbackInterval(int setting)
      Sets the enable client afflinities list
      void setAutoCommit(boolean value)
      Sets whether auto-commit mode is the default connection mode for new connections.
      void setAutocommitException(boolean value)
      Sets whether commit or rollback throws SQLException when autocommit is enabled.
      void setBehaviorOverride(int behaviors)
      Sets the Toolbox JDBC Driver behaviors to override.
      void setBidiImplicitReordering(boolean value)
      Sets whether bidi implicit reordering is used.
      void setBidiNumericOrdering(boolean value)
      Sets whether bidi numeric ordering round trip is used.
      void setBidiStringType(int bidiStringType)
      Sets the output string type of bidi data.
      void setBigDecimal(boolean value)
      Sets whether a big decimal value is returned.
      void setBlockCriteria(int blockCriteria)
      Sets the criteria for retrieving data from the IBM i system in blocks of records.
      void setBlockSize(int blockSize)
      Sets the block size in kilobytes to retrieve from the IBM i system and cache on the client.
      void setCharacterTruncation(java.lang.String setting)
      Sets the character truncation property, which indicates how the driver should handle character truncation errors.
      void setClientRerouteAlternatePortNumber(java.lang.String alternatePortNumber)
      Sets the client reroute alternate server name.
      void setClientRerouteAlternateServerName(java.lang.String alternateServerName)
      Sets the client reroute alternate server name.
      void setConcurrentAccessResolution(int concurrentAccessResolution)
      This method sets concurrent access resolution.
      void setCursorHold(boolean cursorHold)
      Sets whether the cursor is held.
      void setCursorSensitivity(java.lang.String cursorSensitivity)
      Sets the cursor sensitivity to be requested from the database.
      void setDatabaseName(java.lang.String databaseName)
      Sets the database name.
      void setDataCompression(boolean compression)
      Sets whether to use data compression.
      void setDataSourceName(java.lang.String dataSourceName)
      Sets the data source name.
      void setDataTruncation(boolean truncation)
      Sets whether to use data truncation.
      void setDateFormat(java.lang.String dateFormat)
      Sets the date format used in date literals within SQL statements.
      void setDateSeparator(java.lang.String dateSeparator)
      Sets the date separator used in date literals within SQL statements.
      void setDecfloatRoundingMode(java.lang.String decfloatRoundingMode)
      Sets the decfloat rounding mode.
      void setDecimalDataErrors(java.lang.String decimalDataErrors)
      Sets the decimal data errors property.
      void setDecimalSeparator(java.lang.String decimalSeparator)
      Sets the decimal separator used in numeric literals within SQL statements.
      void setDescribeOption(java.lang.String option)
      Sets the describe option property.
      void setDescription(java.lang.String description)
      Sets the data source description.
      void setDriver(java.lang.String driver)
      Sets the JDBC driver implementation.
      void setEnableClientAffinitiesList(int setting)
      Sets the enable client afflinities list
      void setEnableSeamlessFailover(int setting)
      Sets the enable client afflinities list
      void setErrors(java.lang.String errors)
      Sets the amount of detail to be returned in the message for errors occurring on the IBM i system.
      void setExtendedDynamic(boolean extendedDynamic)
      Sets whether to use extended dynamic support.
      void setExtendedMetadata(boolean extendedMetaData)
      Sets whether the driver should request extended metadata from the IBM i system.
      void setExtendedMetaData(boolean extendedMetaData)
      Sets whether the driver should request extended metadata from the IBM i system.
      void setFullOpen(boolean fullOpen)
      Sets whether to fully open a file when performing a query.
      void setHoldInputLocators(boolean value)
      Sets whether input locators are allocated as hold locators.
      void setHoldStatements(boolean value)
      Sets whether statements should remain open until a transaction boundary when autocommit is off and they are associated with Lob locators.
      void setIgnoreWarnings(java.lang.String ignoreWarnings)
      Sets the ignore warnings property.
      void setJvm16Synchronize(boolean value)
      Indicates whether the temporary fix for JVM 1.6 is enabled.
      void setKeepAlive(boolean keepAlive)
      This property allows the turning on of socket keep alive.
      void setLazyClose(boolean lazyClose)
      Sets whether to delay closing cursors until subsequent requests.
      void setLibraries(java.lang.String libraries)
      Sets the libraries to add to the server job's library list.
      void setLobThreshold(int threshold)
      Sets the maximum LOB (large object) size in bytes that can be retrieved as part of a result set.
      void setLoginTimeout(int timeout)
      Sets the maximum time in seconds that this data source can wait while attempting to connect to a database.
      void setLogWriter(java.io.PrintWriter writer)
      Sets the log writer for this data source.
      void setMaximumBlockedInputRows(int maximumBlockedInputRows)
      Sets the maximum blocked input rows.
      void setMaximumPrecision(int precision)
      Sets the maximum precision property.
      void setMaximumScale(int scale)
      Sets the maximum scale property.
      void setMaxRetriesForClientReroute(int setting)
      Sets the enable client afflinities list
      void setMetadataSource(int mds)
      Sets how to retrieve DatabaseMetaData.
      void setMetaDataSource(int mds)
      Sets how to retrieve DatabaseMetaData.
      void setMinimumDivideScale(int scale)
      Sets the minimum divide scale property.
      void setNaming(java.lang.String naming)
      Sets the naming convention used when referring to tables.
      void setNumericRangeError(java.lang.String setting)
      Sets the numeric range error property, which indicates how the driver should handle numberic range errors.
      void setPackage(java.lang.String packageName)
      Sets the base name of the SQL package.
      void setPackageAdd(boolean add)
      Sets whether to add newly prepared statements to the SQL package specified on the "package" property.
      void setPackageCache(boolean cache)
      Sets whether to cache a subset of the SQL package information in client memory.
      void setPackageCcsid(int ccsid)
      Sets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in.
      void setPackageCCSID(int ccsid)
      Sets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in.
      void setPackageClear(boolean clear)
      Deprecated.  
      void setPackageCriteria(java.lang.String packageCriteria)
      Sets the type of SQL statement to be stored in the SQL package.
      void setPackageError(java.lang.String packageError)
      Sets the action to take when SQL package errors occur.
      void setPackageLibrary(java.lang.String packageLibrary)
      Sets the library for the SQL package.
      void setPassword(java.lang.String password)
      Sets the database password.
      void setPortNumber(int portNumber)
      Sets the port number
      void setPrefetch(boolean prefetch)
      Sets whether to prefetch data upon executing a SELECT statement.
      void setPrompt(boolean prompt)
      Sets whether the user should be prompted if a user name or password is needed to connect to the IBM i system.
      void setProperties(java.util.Properties newProperties)
      Sets the properties for this datasource.
      void setProperties(java.lang.String propertiesString)
      Sets the properties based on ";" delimited string of properties, in same fashion as URL properties specified with DriverManager.getConnection(urlProperties).
      void setProxyServer(java.lang.String proxyServer)
      Sets the name of the proxy server.
      void setQaqqinilib(java.lang.String libraryName)
      Sets the QAQQINI library name.
      void setQaqqiniLibrary(java.lang.String libraryName)
      Sets the QAQQINI library name.
      void setQueryOptimizeGoal(int goal)
      Sets the goal the IBM i system should use with optimization of queries.
      void setQueryReplaceTruncatedParameter(java.lang.String queryReplaceTruncatedParameter)
      Sets the query replace truncated parameter property, which will replaced a truncated query parameter with a value.
      void setQueryStorageLimit(int limit)
      Sets the storage limit in megabytes, that should be used for statements executing a query in a connection.
      void setQueryTimeoutMechanism(java.lang.String timeoutMechanism)
      Sets the query timeout mechanism property, which indicates how the toolbox will enforce the query timeout specified on the statement.
      void setReceiveBufferSize(int size)
      This property sets the receive buffer size socket option to the specified value.
      void setRemarks(java.lang.String remarks)
      Sets the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
      void setRetryIntervalForClientReroute(int setting)
      Sets the enable client afflinities list
      void setRollbackCursorHold(boolean cursorHold)
      Sets whether the cursor is held after a rollback.
      void setSavePasswordWhenSerialized(boolean savePassword)
      Sets whether to save the password locally with the rest of the properties when this data source object is serialized.
      void setSecondaryUrl(java.lang.String url)
      Sets the secondary URL to be used for a connection on the middle-tier's DriverManager in a multiple tier environment, if it is different than already specified.
      void setSecondaryURL(java.lang.String url)
      Sets the secondary URL to be used for a connection on the middle-tier's DriverManager in a multiple tier environment, if it is different than already specified.
      void setSecure(boolean secure)
      Sets whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system.
      void setSecureCurrentUser(boolean secureCurrentUser)
      Sets whether to disallow "" and *current as user name and password.
      void setSendBufferSize(int size)
      This property sets the send buffer size socket option to the specified value.
      void setServerName(java.lang.String serverName)
      Sets the IBM i system name.
      void setServerTrace(int traceCategories)
      Enables tracing of the JDBC server job.
      void setServerTraceCategories(int traceCategories)
      Enables tracing of the JDBC server job.
      void setSocketTimeout(int milliseconds)
      This property enables/disables socket timeout with the specified value in milliseconds.
      void setSoLinger(int seconds)
      This property allows the turning on of socket linger with the specified linger time in seconds.
      void setSort(java.lang.String sort)
      Sets how the IBM i system sorts records before sending them to the client.
      void setSortLanguage(java.lang.String language)
      Sets the three-character language id to use for selection of a sort sequence.
      void setSortTable(java.lang.String table)
      Sets the library and file name of a sort sequence table stored on the IBM i system.
      void setSortWeight(java.lang.String sortWeight)
      Sets how the IBM i system treats case while sorting records.
      void setSoTimeout(int milliseconds)
      This property enables/disables socket timeout with the specified value in milliseconds.
      void setTcpNoDelay(boolean noDelay)
      This property allows the turning on of the TCP no delay socket option.
      void setThreadUsed(boolean threadUsed)
      Sets whether a thread is used.
      void setTimeFormat(java.lang.String timeFormat)
      Sets the time format used in time literals with SQL statements.
      void setTimeSeparator(java.lang.String timeSeparator)
      Sets the time separator used in time literals within SQL statements.
      void setTimestampFormat(java.lang.String timestampFormat)
      Sets the timestamp format used by getString methods.
      void setToolboxTrace(java.lang.String traceCategory)
      Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
      void setToolboxTraceCategory(java.lang.String traceCategory)
      Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
      void setTrace(boolean trace)
      Sets whether trace messages should be logged.
      void setTransactionIsolation(java.lang.String transactionIsolation)
      Sets the IBM i system's transaction isolation.
      void setTranslateBinary(boolean translate)
      Sets whether binary data is translated.
      void setTranslateBoolean(boolean translate)
      Sets how Boolean objects are interpreted when setting the value for a character field/parameter using the PreparedStatement.setObject(), CallableStatement.setObject() or ResultSet.updateObject() methods.
      void setTranslateHex(java.lang.String parseOption)
      Sets the translate hex property, which indicates how the parser will treat hexadecimal literals.
      void setTrueAutocommit(boolean value)
      Sets whether true auto commit support is used.
      void setTrueAutoCommit(boolean value)
      Sets whether true auto commit support is used.
      void setUseBlockUpdate(boolean value)
      Indicates whether blocking should be used for updates and delete.
      void setUseDrdaMetadataVersion(boolean value)
      Indicates whether DRDA metadata should be returned.
      void setUser(java.lang.String user)
      Sets the database user.
      void setVariableFieldCompression(boolean compress)
      Specifies whether variable-length fields should be compressed.
      void setVariableFieldCompression(java.lang.String compress)
      Specifies how variable-length fields should be compressed.
      void setXALooselyCoupledSupport(int lcs)
      Sets whether lock sharing is allowed for loosely coupled transaction branches.
      java.lang.String toString()
      Returns the string representation of the object.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Field Detail

      • MAX_STORAGE_LIMIT

        public static final int MAX_STORAGE_LIMIT
        The maximum storage space in megabytes, that can be used to execute a query.
        See Also:
        Constant Field Values
      • SERVER_TRACE_START_DATABASE_MONITOR

        public static final int SERVER_TRACE_START_DATABASE_MONITOR
        Start the database monitor on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 2.
        See Also:
        Constant Field Values
      • SERVER_TRACE_DEBUG_SERVER_JOB

        public static final int SERVER_TRACE_DEBUG_SERVER_JOB
        Start debug on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 4.
        See Also:
        Constant Field Values
      • SERVER_TRACE_SAVE_SERVER_JOBLOG

        public static final int SERVER_TRACE_SAVE_SERVER_JOBLOG
        Save the joblog when the JDBC server job ends. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 8.
        See Also:
        Constant Field Values
      • SERVER_TRACE_TRACE_SERVER_JOB

        public static final int SERVER_TRACE_TRACE_SERVER_JOB
        Start job trace on the JDBC server job. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 16.
        See Also:
        Constant Field Values
      • SERVER_TRACE_SAVE_SQL_INFORMATION

        public static final int SERVER_TRACE_SAVE_SQL_INFORMATION
        Save SQL information. This constant is used when setting the level of tracing for the JDBC server job. The numeric value of this constant is 32.
        See Also:
        Constant Field Values
      • CONCURRENTACCESS_NOT_SET

        public static final int CONCURRENTACCESS_NOT_SET
        CONCURRENTACCESS_NOT_SET - Indicates that currently committed behavior is not requested explicitly by the client.
        See Also:
        Constant Field Values
      • CONCURRENTACCESS_USE_CURRENTLY_COMMITTED

        public static final int CONCURRENTACCESS_USE_CURRENTLY_COMMITTED
        CONCURRENTACCESS_USE_CURRENTLY_COMMITTED - Indicates that the currently committed behavior is requested at the server.
        See Also:
        Constant Field Values
      • CONCURRENTACCESS_WAIT_FOR_OUTCOME

        public static final int CONCURRENTACCESS_WAIT_FOR_OUTCOME
        CONCURRENTACCESS_WAIT_FOR_OUTCOME - Indicates that the readers will wait on the writers during lock contention.
        See Also:
        Constant Field Values
      • CONCURRENTACCESS_SKIP_LOCKS

        public static final int CONCURRENTACCESS_SKIP_LOCKS
        CONCURRENTACCESS_SKIP_LOCKS - Indicates that the readers will skip locks.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AS400JDBCDataSource

        public AS400JDBCDataSource()
        Constructs a default AS400JDBCDataSource object.
      • AS400JDBCDataSource

        public AS400JDBCDataSource(java.lang.String serverName)
        Constructs an AS400JDBCDataSource object to the specified serverName.
        Parameters:
        serverName - The name of the IBM i system.
      • AS400JDBCDataSource

        public AS400JDBCDataSource(java.lang.String serverName,
                           java.lang.String user,
                           java.lang.String password)
        Constructs an AS400JDBCDataSource object with the specified signon information.
        Parameters:
        serverName - The name of the IBM i system.
        user - The user id.
        password - The user password.
      • AS400JDBCDataSource

        public AS400JDBCDataSource(AS400 as400)
        Constructs an AS400JDBCDataSource object with the specified AS400 object
        Parameters:
        as400 - The AS400 object
      • AS400JDBCDataSource

        public AS400JDBCDataSource(java.lang.String serverName,
                           java.lang.String user,
                           java.lang.String password,
                           java.lang.String keyRingNameX,
                           java.lang.String keyRingPasswordX)
        Deprecated. Sslight not supported
        Constructs an AS400JDBCDataSource object with the specified signon information to use for SSL communications with the system.
        Parameters:
        serverName - The name of the IBM i system.
        user - The user id.
        password - The user password.
        keyRingNameX - The key ring class name to be used for SSL communications with the system.
        keyRingPasswordX - The password for the key ring class to be used for SSL communications with the system.
    >
    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method is called each time the value of any bound property is changed.
        Parameters:
        listener - The PropertyChangeListener.
        See Also:
        removePropertyChangeListener(java.beans.PropertyChangeListener)
      • clone

        public java.lang.Object clone()
        Method to create a clone of AS400JDBCDataSource. This does a shallow copy, with the exception of JDProperties, which also gets cloned.
        Overrides:
        clone in class java.lang.Object
      • getAccess

        public java.lang.String getAccess()
        Returns the level of database access for the connection.
        Returns:
        The access level. Valid values include: "all" (all SQL statements allowed), "read call" (SELECT and CALL statements allowed), and "read only" (SELECT statements only). The default value is "all".
      • getBehaviorOverride

        public int getBehaviorOverride()
        Returns what behaviors of the Toolbox JDBC driver have been overridden. Multiple behaviors can be overridden in combination by adding the constants and passing that sum on the setBehaviorOverride() method.
        Returns:
        The behaviors that have been overridden.

        The return value is a combination of the following:

        • 1 - Do not throw an exception if Statement.executeQuery() or PreparedStatement.executeQuery() do not return a result set. Instead, return null for the result set.
      • getBidiStringType

        public int getBidiStringType()
        Returns the output string type of bidi data. See BidiStringType for more information and valid values. -1 will be returned if the value has not been set.
        Returns:
        output string type
      • getBlockCriteria

        public int getBlockCriteria()
        Returns the criteria for retrieving data from the system in blocks of records. Specifying a non-zero value for this property will reduce the frequency of communication to the system, and therefore increase performance.
        Returns:
        The block criteria.

        Valid values include:

        • 0 (no record blocking)
        • 1 (block if FOR FETCH ONLY is specified)
        • 2 (block if FOR UPDATE is specified) - The default value.
      • getBlockSize

        public int getBlockSize()
        Returns the block size in kilobytes to retrieve from the system and cache on the client. This property has no effect unless the block criteria property is non-zero. Larger block sizes reduce the frequency of communication to the system, and therefore may increase performance.
        Returns:
        The block size in kilobytes.

        Valid values include:

        • 0
        • 8
        • 16
        • 32 - The default value.
        • 64
        • 128
        • 256
        • 512
      • getCharacterTruncation

        public java.lang.String getCharacterTruncation()
        Returns the behavior to use when character truncation occurs
        Returns:
        behaviorString

        Value values are:

        • default
        • warning
        • none
      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Returns the database connection.
        Specified by:
        getConnection in interface javax.sql.DataSource
        Returns:
        The connection.
        Throws:
        java.sql.SQLException - If a database error occurs.
      • getConnection

        public java.sql.Connection getConnection(java.lang.String user,
                                        java.lang.String password)
                                          throws java.sql.SQLException
        Returns the database connection using the specified user and password.
        Specified by:
        getConnection in interface javax.sql.DataSource
        Parameters:
        user - The database user.
        password - The database password.
        Returns:
        The connection
        Throws:
        java.sql.SQLException - If a database error occurs.
      • getCursorSensitivity

        public java.lang.String getCursorSensitivity()
        Returns the value of the cursor sensitivity property. If the resultSetType is ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_SENSITIVE, the value of this property will control what cursor sensitivity is requested from the database. If the resultSetType is ResultSet.TYPE_SCROLL_INSENSITIVE, this property will be ignored.
        Returns:
        The cursor sensitivity.

        Valid values include:

        • "asensitive"
        • "insensitive"
        • "sensitive"
        The default is "asensitive". This property is ignored when connecting to systems running OS/400 V5R1 and earlier.
      • getDatabaseName

        public java.lang.String getDatabaseName()
        Returns the database name property. For more information see the documentation for the setDatabaseName() method in this class.
        Returns:
        The database name.
      • getDataSourceName

        public java.lang.String getDataSourceName()
        Returns the data source name property. This property is used to name an underlying data source when connection pooling is used.
        Returns:
        The data source name.
      • getDateFormat

        public java.lang.String getDateFormat()
        Returns the IBM i date format used in date literals within SQL statements.
        Returns:
        The date format.

        Valid values include:

        • "mdy"
        • "dmy"
        • "ymd"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "julian"
        • "" (server job value) - default.
        The default is based on the server job.
      • getDateSeparator

        public java.lang.String getDateSeparator()
        Returns the IBM i date separator used in date literals within SQL statements. This property has no effect unless the "data format" property is set to: "julian", "mdy", "dmy", or "ymd".
        Returns:
        The date separator.

        Valid values include:

        • "/" (slash)
        • "-" (dash)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getDecfloatRoundingMode

        public java.lang.String getDecfloatRoundingMode()
        Returns the decfloat rounding mode.
        Returns:
        The decfloat rounding mode.

        Valid values include:

        • "half even" - default
        • "half up"
        • "down"
        • "ceiling"
        • "floor"
        • "half down"
        • "up"
      • getDecimalSeparator

        public java.lang.String getDecimalSeparator()
        Returns the IBM i decimal separator used in numeric literals within SQL statements.
        Returns:
        The decimal separator.

        Valid values include:

        • "." (period)
        • "," (comma)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getIgnoreWarnings

        public java.lang.String getIgnoreWarnings()
        Returns the ignore warnings property. Specifies a list of SQL states for which the driver should not create warning objects.
        Returns:
        The ignore warnings.
      • getDecimalDataErrors

        public java.lang.String getDecimalDataErrors()
        Returns the decimal data errors property.
        Returns:
        The decimal data errors setting.
      • getDescribeOption

        public java.lang.String getDescribeOption()
        Returns the describe options property.
        Returns:
        The describe options.
      • getDescription

        public java.lang.String getDescription()
        Returns the description of the data source.
        Returns:
        The description.
      • getDriver

        public java.lang.String getDriver()
        Returns the JDBC driver implementation. This property has no effect if the "secondary URL" property is set. This property cannot be set to "native" if the environment is not an IBM i Java Virtual Machine.

        Valid values include:

        • "toolbox" (use the IBM Toolbox for Java JDBC driver)
        • "native" (use the IBM Developer Kit for Java JDBC driver)
        The default value is "toolbox". Note: Not supported in a connection pool.
        Returns:
        JDBC driver implementation
      • getErrors

        public java.lang.String getErrors()
        Returns the amount of detail for error messages originating from the IBM i system.
        Returns:
        The error message level. Valid values include: "basic" and "full". The default value is "basic".
      • getLibraries

        public java.lang.String getLibraries()
        Returns the IBM i system libraries to add to the server job's library list. The libraries are delimited by commas or spaces, and "*LIBL" may be used as a place holder for the server job's current library list. The library list is used for resolving unqualified stored procedure calls and finding schemas in DatabaseMetaData catalog methods. If "*LIBL" is not specified, the specified libraries will replace the server job's current library list.
        Returns:
        The library list.
      • getLobThreshold

        public int getLobThreshold()
        Returns the maximum LOB (large object) size in bytes that can be retrieved as part of a result set. LOBs that are larger than this threshold will be retrieved in pieces using extra communication to the system. Larger LOB thresholds will reduce the frequency of communication to the system, but will download more LOB data, even if it is not used. Smaller LOB thresholds may increase frequency of communication to the system, but will only download LOB data as it is needed.
        Returns:
        The lob threshold. Valid range is 0-16777216. The default value is 32768.
      • getLoginTimeout

        public int getLoginTimeout()
        Returns the timeout value in seconds. Note: This value is not used or supported. The timeout value is determined by the IBM i system.
        Specified by:
        getLoginTimeout in interface javax.sql.CommonDataSource
        Returns:
        the maximum time in seconds that this data source can wait while attempting to connect to a database.
      • getLogWriter

        public java.io.PrintWriter getLogWriter()
                                         throws java.sql.SQLException
        Returns the log writer for this data source.
        Specified by:
        getLogWriter in interface javax.sql.CommonDataSource
        Returns:
        The log writer for this data source.
        Throws:
        java.sql.SQLException - If a database error occurs.
      • getMetaDataSource

        public int getMetaDataSource()
        Indicates how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Returns:
        the metadata setting. The default value is 1.
      • getMetadataSource

        public int getMetadataSource()
        Indicates how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Returns:
        the metadata setting. The default value is 1. Note: this method is the same as getMetaDataSource() so that it corresponds to the connection property name
      • getNaming

        public java.lang.String getNaming()
        Returns the naming convention used when referring to tables.
        Returns:
        The naming convention. Valid values include: "sql" (e.g. schema.table) and "system" (e.g. schema/table). The default value is "sql".
      • getNumericRangeError

        public java.lang.String getNumericRangeError()
        Returns the behavior to use when an numeric range error occurs
        Returns:
        behaviorString

        Value values are:

        • default
        • warning
        • none
      • getPackage

        public java.lang.String getPackage()
        Returns the base name of the SQL package. Note that only the first six characters are used to generate the name of the SQL package on the system. This property has no effect unless the extended dynamic property is set to true. In addition, this property must be set if the extended dynamic property is set to true.
        Returns:
        The base name of the SQL package.
      • getPackageCriteria

        public java.lang.String getPackageCriteria()
        Returns the type of SQL statement to be stored in the SQL package. This can be useful to improve the performance of complex join conditions. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        The type of SQL statement. Valid values include: "default" (only store SQL statements with parameter markers in the package) and "select" (store all SQL SELECT statements in the package). The default value is "default".
      • getPackageError

        public java.lang.String getPackageError()
        Returns the action to take when SQL package errors occur. When an SQL package error occurs, the driver will optionally throw an SQLException or post a warning to the Connection, based on the value of this property. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        The action to take when SQL errors occur. Valid values include: "exception", "warning", and "none". The default value is "warning".
      • getPackageLibrary

        public java.lang.String getPackageLibrary()
        Returns the library for the SQL package. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        The SQL package library. The default package library is "QGPL".
      • getProxyServer

        public java.lang.String getProxyServer()
        Returns the name of the proxy server.
        Returns:
        The proxy server.
      • getReference

        public javax.naming.Reference getReference()
                                            throws javax.naming.NamingException
        Returns the Reference object for the data source object. This is used by JNDI when bound in a JNDI naming service. Contains the information necessary to reconstruct the data source object when it is later retrieved from JNDI via an object factory.
        Specified by:
        getReference in interface javax.naming.Referenceable
        Returns:
        A Reference object of the data source object.
        Throws:
        javax.naming.NamingException - If a naming error occurs in resolving the object.
      • getRemarks

        public java.lang.String getRemarks()
        Returns the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
        Returns:
        The text source. Valid values include: "sql" (SQL object comment) and "system" (IBM i object description). The default value is "system".
      • getSecondaryUrl

        public java.lang.String getSecondaryUrl()
        Returns the secondary URL.
        Returns:
        The secondary URL.
      • getSecondaryURL

        public java.lang.String getSecondaryURL()
        Returns the secondary URL.
        Returns:
        The secondary URL. Note: this method is the same as setSecondaryUrl() so that it corresponds to the connection property name
      • getServerName

        public java.lang.String getServerName()
        Returns the name of the IBM i system.
        Returns:
        The system name.
      • getServerTraceCategories

        public int getServerTraceCategories()
        Returns the level of tracing started on the JDBC server job. If tracing is enabled, tracing is started when the client connects to the system and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables system tracing only at connect time. Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,
          dataSource.setServerTraceCategories(AS400JDBCDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
          
        Returns:
        The tracing level.

        The value is a combination of the following:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service.

      • getServerTrace

        public int getServerTrace()
        Returns the level of tracing started on the JDBC server job. If tracing is enabled, tracing is started when the client connects to the system and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables system tracing only at connect time. Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,
          dataSource.setServerTraceCategories(AS400JDBCDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
          
        Returns:
        The tracing level.

        The value is a combination of the following:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service. Note: this method is the same as getServerTraceCategories() so that it corresponds to the connection property name

      • getSocketTimeout

        public int getSocketTimeout()
        Gets the socket timeout option in milliseconds.
        Returns:
        The value of the socket timeout option.
      • getSort

        public java.lang.String getSort()
        Returns how the system sorts records before sending them to the client.
        Returns:
        The sort value.

        Valid values include:

        • "hex" (base the sort on hexadecimal values)
        • "language" (base the sort on the language set in the sort language property)
        • "table" (base the sort on the sort sequence table set in the sort table property)
        The default value is "hex".
      • getSortLanguage

        public java.lang.String getSortLanguage()
        Returns the three-character language id to use for selection of a sort sequence.
        Returns:
        The three-character language id. The default value is ENU.
      • getSortTable

        public java.lang.String getSortTable()
        Returns the library and file name of a sort sequence table stored on the system.
        Returns:
        The qualified sort table name.
      • getSortWeight

        public java.lang.String getSortWeight()
        Returns how the system treats case while sorting records.
        Returns:
        The sort weight. Valid values include: "shared" (upper- and lower-case characters are sorted as the same character) and "unique" (upper- and lower-case characters are sorted as different characters). The default value is "shared".
      • getTimeFormat

        public java.lang.String getTimeFormat()
        Returns the time format used in time literals with SQL statements.
        Returns:
        The time format.

        Valid values include:

        • "hms"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "" (server job value) - default.
        The default value is based on the server job.
      • getTimeSeparator

        public java.lang.String getTimeSeparator()
        Returns the time separator used in time literals within SQL statements.
        Returns:
        The time separator.

        Valid values include:

        • ":" (colon)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • getTimestampFormat

        public java.lang.String getTimestampFormat()
        Returns the timestamp format used by getString methods.
        Returns:
        The timestamp format.

        Valid values include:

        • "iso"
        • "ibmsql"
        The default value is based on the server job.
      • getTransactionIsolation

        public java.lang.String getTransactionIsolation()
        Returns the system's transaction isolation.
        Returns:
        The transaction isolation level.

        Valid values include:

        • "none"
        • "read uncommitted" - The default value.
        • "read committed"
        • "repeatable read"
        • "serializable"
      • getUser

        public java.lang.String getUser()
        Returns the database user property.
        Returns:
        The user.
      • getPortNumber

        public int getPortNumber()
        Returns the port number
        Returns:
        the port number
      • getQaqqiniLibrary

        public java.lang.String getQaqqiniLibrary()
        Returns the QAQQINI library name.
        Returns:
        The QAQQINI library name.
      • getQaqqinilib

        public java.lang.String getQaqqinilib()
        Returns the QAQQINI library name.
        Returns:
        The QAQQINI library name. Note: this method is the same as getQaqqiniLibrary() so that it corresponds to the connection property name
      • getQueryOptimizeGoal

        public int getQueryOptimizeGoal()
        Returns the goal the IBM i system should use with optimization of queries.
        Returns:
        the goal the IBM i system should use with optimization of queries.

        Valid values include:

        • 0 = Optimize query for first block of data (*ALLIO) when extended dynamic packages are used; Optimize query for entire result set (*FIRSTIO) when packages are not used
        • 1 = Optimize query for first block of data (*FIRSTIO)
        • 2 = Optimize query for entire result set (*ALLIO)
        The default value is 0.
      • getQueryStorageLimit

        public int getQueryStorageLimit()
        Returns the storage limit in megabytes, that should be used for statements executing a query in a connection. Note, this setting is ignored when running to i5/OS V5R4 or earlier You must have *JOBCTL special authority to use query storage limit with Version 6 Release 1 of IBM i.

        Valid values are -1 to MAX_STORAGE_LIMIT megabytes. The default value is -1 meaning there is no limit.

        Returns:
        the storage limit
      • getQueryReplaceTruncatedParameter

        public java.lang.String getQueryReplaceTruncatedParameter()
        Returns the string to be substituted for a truncated parameter on a query. A empty string means that substitution will not occur.
        Returns:
        the substituted

        Valid values include:

        • "" = No substitution will occur.
        • value = The value to be used when a query parameter is truncated.
        The default value is "".
      • getQueryTimeoutMechanism

        public java.lang.String getQueryTimeoutMechanism()
        Returns the mechanism used to implement query timeout.
        Returns:
        the mechanism used to implement query timeout.

        Valid values include:

        • qqrytimlmt = The QQRYTIMLMT will be used.
        • cancel = A long running statement will be cancelled.
        The default value is 0.
      • getXALooselyCoupledSupport

        public int getXALooselyCoupledSupport()
        Indicates whether lock sharing is allowed for loosely coupled transaction branches.
        Returns:
        the lock sharing setting.

        Valid values include:

        • 0 = Locks cannot be shared
        • 1 = Locks can be shared
        The default value is 0.
      • isTrueAutoCommit

        public boolean isTrueAutoCommit()
        Indicates whether true auto commit support is used.
        Returns:
        true if true auto commit support is used; false otherwise. The default value is false.
      • isTrueAutocommit

        public boolean isTrueAutocommit()
        Indicates whether true auto commit support is used.
        Returns:
        true if true auto commit support is used; false otherwise. The default value is false. Note: this method is the same as isTrueAutoCommit() so that it corresponds to the connection property name
      • isVariableFieldCompression

        public boolean isVariableFieldCompression()
        Indicates whether variable-length fields are compressed.
        Returns:
        true if variable-length fields are compressed; false otherwise. The default value is true.
      • getVariableFieldCompression

        public java.lang.String getVariableFieldCompression()
        Returns:
        variable filed compression setting
      • isAutoCommit

        public boolean isAutoCommit()
        Returns whether auto-commit mode is the default connection mode for new connections.
        Returns:
        Auto commit. The default value is true.
      • isAutocommitException

        public boolean isAutocommitException()
        Returns whether commit or rollback throws SQLException when autocommit is enabled.
        Returns:
        Autocommit Exception. The default value is false.
      • isBidiImplicitReordering

        public boolean isBidiImplicitReordering()
        Indicates whether bidi implicit reordering is used.
        Returns:
        true if bidi implicit reordering is used; false otherwise. The default value is true.
      • isBidiNumericOrdering

        public boolean isBidiNumericOrdering()
        Indicates whether bidi numeric ordering round trip is used.
        Returns:
        true if bidi numeric ordering round trip is used; false otherwise. The default value is false.
      • isBigDecimal

        public boolean isBigDecimal()
        Indicates whether a big decimal value is returned.
        Returns:
        true if a big decimal is returned; false otherwise. The default value is true.
      • isCursorHold

        public boolean isCursorHold()
        Indicates whether the cursor is held.
        Returns:
        true if the cursor is held; false otherwise. The default value is true.
      • isDataCompression

        public boolean isDataCompression()
        Indicates whether data compression is used.
        Returns:
        true if data compression is used; false otherwise. The default value is true.
      • isDataTruncation

        public boolean isDataTruncation()
        Indicates whether data truncation is used.
        Returns:
        true if data truncation is used; false otherwise. The default value is true.
      • isExtendedDynamic

        public boolean isExtendedDynamic()
        Indicates whether extended dynamic support is used. Extended dynamic support provides a mechanism for caching dynamic SQL statements on the system. The first time a particular SQL statement is prepared, it is stored in an SQL package on the system. If the package does not exist, it will be automatically created. On subsequent prepares of the same SQL statement, the system can skip a significant part of the processing by using information stored in the SQL package.
        Returns:
        true if extended dynamic support is used; false otherwise. The default value is not to use extended dynamic support.
      • isExtendedMetaData

        public boolean isExtendedMetaData()
        Indicates whether the driver should request extended metadata from the IBM i system. If this property is set to true, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the IBM i system.
        Returns:
        true if extended metadata will be requested; false otherwise. The default value is false.
      • isExtendedMetadata

        public boolean isExtendedMetadata()
        Indicates whether the driver should request extended metadata from the IBM i system. If this property is set to true, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the IBM i system.
        Returns:
        true if extended metadata will be requested; false otherwise. The default value is false. Note: this method is the same as isExtendedMetaData() so that it corresponds to the connection property name
      • isFullOpen

        public boolean isFullOpen()
        Indicates whether the IBM i system fully opens a file when performing a query. By default the system optimizes opens so they perform better. In certain cases an optimized open will fail. In some cases a query will fail when a database performance monitor is turned on even though the same query works with the monitor turned off. In this case set the full open property to true. This disables optimization on the system.
        Returns:
        true if files are fully opened; false otherwise. The default value is false.
      • isJvm16Synchronize

        public boolean isJvm16Synchronize()
        Indicates whether the temporary fix for JVM 1.6 is enabled.
        Returns:
        true if enabled; false otherwise. The default value is true.
      • isLazyClose

        public boolean isLazyClose()
        Indicates whether to delay closing cursors until subsequent requests.
        Returns:
        true to delay closing cursors until subsequent requests; false otherwise. The default value is false.
      • isHoldInputLocators

        public boolean isHoldInputLocators()
        Indicates whether input locators are of type hold.
        Returns:
        true if input locators are of type hold; false otherwise. The default value is true.
      • isPackageAdd

        public boolean isPackageAdd()
        Indicates whether to add newly prepared statements to the SQL package specified on the "package" property. This property has no effect unless the extended dynamic property is set to true;
        Returns:
        true If newly prepared statements should be added to the SQL package specified on the "package" property; false otherwise. The default value is true.
      • isPackageCache

        public boolean isPackageCache()
        Indicates whether a subset of the SQL package information is cached in client memory. Caching SQL packages locally reduces the amount of communication to the IBM i system for prepares and describes. This property has no effect unless the extended dynamic property is set to true.
        Returns:
        true if caching is used; false otherwise. The defalut value is false.
      • isPackageClear

        public boolean isPackageClear()
        Deprecated. 
        Indicates whether SQL packages are cleared when they become full. This method has been deprecated. Package clearing and the decision for the threshold where package clearing is needed is now handled automatically by the database.
        Returns:
        Always false. This method is deprecated.
      • isPrefetch

        public boolean isPrefetch()
        Indicates whether data is prefetched upon executing a SELECT statement. This will increase performance when accessing the initial rows in the result set.
        Returns:
        If prefetch is used; false otherwise. The default value is prefetch data.
      • isPrompt

        public boolean isPrompt()
        Indicates whether the user is prompted if a user name or password is needed to connect to the IBM i system. If a connection can not be made without prompting the user, and this property is set to false, then an attempt to connect will fail throwing an exception.
        Returns:
        true if the user is prompted for signon information; false otherwise. The default value is false.
      • isRollbackCursorHold

        public boolean isRollbackCursorHold()
        Indicates whether the cursor is held after a rollback.
        Returns:
        true if the cursor is held; false otherwise. The default value is false.
      • isHoldStatements

        public boolean isHoldStatements()
        Indicates whether statements remain open until a transaction boundary when autocommit is off and they are associated with Lob locators.
        Returns:
        true if statements are only closed at transaction boundaries; false otherwise. The default value is false.
      • isSavePasswordWhenSerialized

        public boolean isSavePasswordWhenSerialized()
        Indicates whether the password is saved locally with the rest of the properties when this data source object is serialized.

        If the password is saved, it is up to the application to protect the serialized form of the object because it contains all necessary information to connect to the IBM i system. The default is false. It is a security risk to save the password with the rest of the properties so by default the password is not saved. If the programmer chooses to accept this risk, call setSavePasswordWhenSerialized(true) to force the Toolbox to save the password with the other properties when the data source object is serialized.

        Returns:
        true if the password is saved with the rest of the properties when the data source object is serialized; false otherwise. The default value is false.
      • isSecure

        public boolean isSecure()
        Indicates whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system. SSL connections are only available when connecting to systems at V4R4 or later.
        Returns:
        true if Secure Socket Layer connection is used; false otherwise. The default value is false.
      • isSecureCurrentUser

        public boolean isSecureCurrentUser()
        Returns the secure current user setting. True indicates to disallow "" and *current for user name and password.
        Returns:
        The secure current user setting.
      • isThreadUsed

        public boolean isThreadUsed()
        Indicates whether a thread is used.
        Returns:
        true if a thread is used; false otherwise. The default value is true.
      • isTrace

        public boolean isTrace()
        Indicates whether trace messages should be logged.
        Returns:
        true if trace message are logged; false otherwise. The default value is false.
      • isTranslateBinary

        public boolean isTranslateBinary()
        Indicates whether binary data is translated. If this property is set to true, then BINARY and VARBINARY fields are treated as CHAR and VARCHAR fields.
        Returns:
        true if binary data is translated; false otherwise. The default value is false.
      • isTranslateBoolean

        public boolean isTranslateBoolean()
        Indicates how Boolean objects are interpreted when setting the value for a character field/parameter using the PreparedStatement.setObject(), CallableStatement.setObject() or ResultSet.updateObject() methods. Setting the property to "true", would store the Boolean object in the character field as either "true" or "false". Setting the property to "false", would store the Boolean object in the character field as either "1" or "0".
        Returns:
        true if boolean data is translated; false otherwise. The default value is true.
      • isUseBlockUpdate

        public boolean isUseBlockUpdate()
        Indicates whether blocking is used for update and delete operations
        Returns:
        true if enabled; false otherwise. The default value is false.
      • isUseDrdaMetadataVersion

        public boolean isUseDrdaMetadataVersion()
        Indicates whether DRDA metadata should be returned.
        Returns:
        true if enabled; false otherwise. The default value is false.
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Removes the PropertyChangeListener. If the PropertyChangeListener is not in the list, nothing is done.
        Parameters:
        listener - The PropertyChangeListener.
        See Also:
        addPropertyChangeListener(java.beans.PropertyChangeListener)
      • setAccess

        public void setAccess(java.lang.String access)
        Sets the level of database access for the connection.
        Parameters:
        access - The access level.

        Valid values include:

        • "all" (all SQL statements allowed)
        • "read call" (SELECT and CALL statements allowed)
        • "read only" (SELECT statements only)
        The default value is "all".
      • setAutoCommit

        public void setAutoCommit(boolean value)
        Sets whether auto-commit mode is the default connection mode for new connections.
        Parameters:
        value - The default value is true.
      • setAutocommitException

        public void setAutocommitException(boolean value)
        Sets whether commit or rollback throws SQLException when autocommit is enabled.
        Parameters:
        value - The default value is false.
      • setTrueAutoCommit

        public void setTrueAutoCommit(boolean value)
        Sets whether true auto commit support is used.
        Parameters:
        value - true if true auto commit support should be used; false otherwise. The default value is false.
      • setTrueAutocommit

        public void setTrueAutocommit(boolean value)
        Sets whether true auto commit support is used.
        Parameters:
        value - true if true auto commit support should be used; false otherwise. The default value is false. Note: this method is the same as setTrueAutoCommit() so that it corresponds to the connection property nameproperty name
      • setBehaviorOverride

        public void setBehaviorOverride(int behaviors)
        Sets the Toolbox JDBC Driver behaviors to override. Multiple behaviors can be changed in combination by adding the constants and passing that sum on the this method.
        Parameters:
        behaviors - The driver behaviors to override.

        Valid values include:

        • 1 - Do not throw an exception if Statement.executeQuery() or PreparedStatement.executeQuery() do not return a result set. Instead, return null for the result set.
        Carefully consider the result of overriding the default behavior of the driver. For example, setting the value of this property to 1 means the driver will no longer throw an exception even though the JDBC 3.0 specification states throwing an exception is the correct behavior. Be sure your application correctly handles the altered behavior.
      • setBidiStringType

        public void setBidiStringType(int bidiStringType)
        Sets the output string type of bidi data. See BidiStringType for more information and valid values.
        Parameters:
        bidiStringType - the bidi string type
      • setBidiImplicitReordering

        public void setBidiImplicitReordering(boolean value)
        Sets whether bidi implicit reordering is used. In this version, the parameter is used to determine whether Bidi layout transformation should be applied to meta-data such as columns names.
        Parameters:
        value - true if implicit reordering should be used; false otherwise. The default value is true.
      • setBidiNumericOrdering

        public void setBidiNumericOrdering(boolean value)
        Sets whether bidi numeric ordering round trip is used.
        Parameters:
        value - true if numeric ordering round trip should be used; false otherwise. The default value is false.
      • setBigDecimal

        public void setBigDecimal(boolean value)
        Sets whether a big decimal value is returned.
        Parameters:
        value - true if a big decimal is returned; false otherwise. The default value is true.
      • setBlockCriteria

        public void setBlockCriteria(int blockCriteria)
        Sets the criteria for retrieving data from the IBM i system in blocks of records. Specifying a non-zero value for this property will reduce the frequency of communication to the system, and therefore increase performance.
        Parameters:
        blockCriteria - The block criteria.

        Valid values include:

        • 0 (no record blocking)
        • 1 (block if FOR FETCH ONLY is specified)
        • 2 (block if FOR UPDATE is specified) - The default value.
      • setBlockSize

        public void setBlockSize(int blockSize)
        Sets the block size in kilobytes to retrieve from the IBM i system and cache on the client. This property has no effect unless the block criteria property is non-zero. Larger block sizes reduce the frequency of communication to the system, and therefore may increase performance.
        Parameters:
        blockSize - The block size in kilobytes.

        Valid values include:

        • 0
        • 8
        • 16
        • 32 - The default value.
        • 64
        • 128
        • 256
        • 512
      • setCharacterTruncation

        public void setCharacterTruncation(java.lang.String setting)
        Sets the character truncation property, which indicates how the driver should handle character truncation errors.
        Parameters:
        setting - The character truncation behavior.

        Valid values are:

        • "default" ()
        • "warning" ()
        • "none" ()
        The default value is "default".
      • setCursorSensitivity

        public void setCursorSensitivity(java.lang.String cursorSensitivity)
        Sets the cursor sensitivity to be requested from the database. If the resultSetType is ResultSet.TYPE_FORWARD_ONLY or ResultSet.TYPE_SCROLL_SENSITIVE, the value of this property will control what cursor sensitivity is requested from the database. If the resultSetType is ResultSet.TYPE_SCROLL_INSENSITIVE, this property will be ignored.

        Valid values include:

        • "asensitive"
        • "insensitive"
        • "sensitive"
        The default is "asensitive". This property is ignored when connecting to systems running OS/400 V5R1 and earlier.
        Parameters:
        cursorSensitivity -
      • setCursorHold

        public void setCursorHold(boolean cursorHold)
        Sets whether the cursor is held.
        Parameters:
        cursorHold - true if the cursor is held; false otherwise. The default value is true.
      • setDatabaseName

        public void setDatabaseName(java.lang.String databaseName)
        Sets the database name. This property is ignored when connecting to systems running OS/400 V5R1 and earlier. If a database name is specified it must exist in the relational database directory on the system. Use CL command WRKRDBDIRE to view the directory. The following criteria are used to determine which database is accessed:
        1. If a database name is specified, that database is used. Attempts to connect will fail if the database does not exist.
        2. If special value *SYSBAS is specified, the system default database is used.
        3. If a database name is not specified, the database specified in the job description for the user profile is used.
        4. If a database name is not specified and a database is not specified in the job description for the user profile, the system default database is used.
        Parameters:
        databaseName - The database name or *SYSBAS.
      • setDataCompression

        public void setDataCompression(boolean compression)
        Sets whether to use data compression. The default value is true.
        Parameters:
        compression - true if data compression is used; false otherwise.
      • setDataSourceName

        public void setDataSourceName(java.lang.String dataSourceName)
        Sets the data source name. This property can be used for connection pooling implementations.
        Parameters:
        dataSourceName - The data source name.
      • setDataTruncation

        public void setDataTruncation(boolean truncation)
        Sets whether to use data truncation. The default value is true.
        Parameters:
        truncation - true if data truncation is used; false otherwise.
      • setDateFormat

        public void setDateFormat(java.lang.String dateFormat)
        Sets the date format used in date literals within SQL statements.
        Parameters:
        dateFormat - The date format.

        Valid values include:

        • "mdy"
        • "dmy"
        • "ymd"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "julian"
        • "" (server job value) - default.
        The default is based on the server job.
      • setDateSeparator

        public void setDateSeparator(java.lang.String dateSeparator)
        Sets the date separator used in date literals within SQL statements. This property has no effect unless the "data format" property is set to: "julian", "mdy", "dmy", or "ymd".
        Parameters:
        dateSeparator - The date separator.

        Valid values include:

        • "/" (slash)
        • "-" (dash)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setDecfloatRoundingMode

        public void setDecfloatRoundingMode(java.lang.String decfloatRoundingMode)
        Sets the decfloat rounding mode.
        Parameters:
        decfloatRoundingMode - The decfloat rounding mode.

        Valid values include:

        • "half even" - default
        • "half up"
        • "down"
        • "ceiling"
        • "floor"
        • "half down"
        • "up"
      • setDecimalDataErrors

        public void setDecimalDataErrors(java.lang.String decimalDataErrors)
        Sets the decimal data errors property.
        Parameters:
        decimalDataErrors -
      • setDecimalSeparator

        public void setDecimalSeparator(java.lang.String decimalSeparator)
        Sets the decimal separator used in numeric literals within SQL statements.
        Parameters:
        decimalSeparator - The decimal separator.

        Valid values include:

        • "." (period)
        • "," (comma)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setIgnoreWarnings

        public void setIgnoreWarnings(java.lang.String ignoreWarnings)
        Sets the ignore warnings property.
        Parameters:
        ignoreWarnings - Specifies a list of SQL states for which the driver should not create warning objects.
      • setDescription

        public void setDescription(java.lang.String description)
        Sets the data source description.
        Parameters:
        description - The description.
      • setSort

        public void setSort(java.lang.String sort)
        Sets how the IBM i system sorts records before sending them to the client.
        Parameters:
        sort - The sort value.

        Valid values include:

        • "hex" (base the sort on hexadecimal values)
        • "language" (base the sort on the language set in the sort language property)
        • "table" (base the sort on the sort sequence table set in the sort table property).
        The default value is "hex".
      • setErrors

        public void setErrors(java.lang.String errors)
        Sets the amount of detail to be returned in the message for errors occurring on the IBM i system.
        Parameters:
        errors - The error message level. Valid values include: "basic" and "full". The default value is "basic".
      • setExtendedDynamic

        public void setExtendedDynamic(boolean extendedDynamic)
        Sets whether to use extended dynamic support. Extended dynamic support provides a mechanism for caching dynamic SQL statements on the IBM i system. The first time a particular SQL statement is prepared, it is stored in an SQL package on the system. If the package does not exist, it will be automatically created. On subsequent prepares of the same SQL statement, the system can skip a significant part of the processing by using information stored in the SQL package. If this is set to "true", then a package name must be set using the "package" property.
        Parameters:
        extendedDynamic - If extended dynamic support is used; false otherwise. The default value is not to use extended dynamic support.
      • setExtendedMetaData

        public void setExtendedMetaData(boolean extendedMetaData)
        Sets whether the driver should request extended metadata from the IBM i system. This property is ignored when connecting to systems running OS/400 V5R1 and earlier. If this property is set to true and connecting to a system running OS/400 V5R2 or IBM i, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the system.
        Parameters:
        extendedMetaData - True to request extended metadata from the system, false otherwise. The default value is false.
      • setExtendedMetadata

        public void setExtendedMetadata(boolean extendedMetaData)
        Sets whether the driver should request extended metadata from the IBM i system. This property is ignored when connecting to systems running OS/400 V5R1 and earlier. If this property is set to true and connecting to a system running OS/400 V5R2 or IBM i, the accuracy of the information that is returned from ResultSetMetaData methods getColumnLabel(int), isReadOnly(int), isSearchable(int), and isWriteable(int) will be increased. In addition, the ResultSetMetaData method getSchemaName(int) will be supported with this property set to true. However, performance will be slower with this property on. Leave this property set to its default (false) unless you need more specific information from those methods. For example, without this property turned on, isSearchable(int) will always return true even though the correct answer may be false because the driver does not have enough information from the system to make a judgment. Setting this property to true forces the driver to get the correct data from the system.
        Parameters:
        extendedMetaData - True to request extended metadata from the system, false otherwise. The default value is false. Note: this method is the same as setExtendedMetaData() so that it corresponds to the connection property name
      • setFullOpen

        public void setFullOpen(boolean fullOpen)
        Sets whether to fully open a file when performing a query. By default the IBM i system optimizes opens so they perform better. In most cases optimization functions correctly and improves performance. Running a query repeatedly when a database performance monitor is turned on may fail because of the optimization, however. Leave this property set to its default (false) until you experience errors running queries with monitors turned on. At that time set the property to true which will disable the optimization.
        Parameters:
        fullOpen - True to fully open a file (turn off optimizations), false to allow optimizations. The default value is false.
      • setHoldInputLocators

        public void setHoldInputLocators(boolean value)
        Sets whether input locators are allocated as hold locators.
        Parameters:
        value - true if locators should be allocated as hold locators; false otherwise. The default value is true.
      • setHoldStatements

        public void setHoldStatements(boolean value)
        Sets whether statements should remain open until a transaction boundary when autocommit is off and they are associated with Lob locators.
        Parameters:
        value - true if statements should remain open; false otherwise. The default value is false.
      • setJvm16Synchronize

        public void setJvm16Synchronize(boolean value)
        Indicates whether the temporary fix for JVM 1.6 is enabled.
        Parameters:
        value - true if JVM 1.6 fix is enabled; false otherwise. The default value is true.
      • setLazyClose

        public void setLazyClose(boolean lazyClose)
        Sets whether to delay closing cursors until subsequent requests.
        Parameters:
        lazyClose - true to delay closing cursors until subsequent requests; false otherwise. The default value is false.
      • setLibraries

        public void setLibraries(java.lang.String libraries)
        Sets the libraries to add to the server job's library list. The libraries are delimited by commas or spaces, and "*LIBL" may be used as a place holder for the server job's current library list. The library list is used for resolving unqualified stored procedure calls and finding schemas in DatabaseMetaData catalog methods. If "*LIBL" is not specified, the specified libraries will replace the server job's current library list.
        Parameters:
        libraries - The library list.
      • setLobThreshold

        public void setLobThreshold(int threshold)
        Sets the maximum LOB (large object) size in bytes that can be retrieved as part of a result set. LOBs that are larger than this threshold will be retrieved in pieces using extra communication to the IBM i system. Larger LOB thresholds will reduce the frequency of communication to the system, but will download more LOB data, even if it is not used. Smaller LOB thresholds may increase frequency of communication to the system, but will only download LOB data as it is needed.
        Parameters:
        threshold - The lob threshold. Valid range is 0-16777216. The default value is 32768.
      • setLoginTimeout

        public void setLoginTimeout(int timeout)
                             throws java.sql.SQLException
        Sets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero specifies that the timeout is the system default if one exists; otherwise it specifies that there is no timeout. The default value is initially zero.
        Specified by:
        setLoginTimeout in interface javax.sql.CommonDataSource
        Parameters:
        timeout - The login timeout in seconds.
        Throws:
        java.sql.SQLException
      • setLogWriter

        public void setLogWriter(java.io.PrintWriter writer)
                          throws java.sql.SQLException
        Sets the log writer for this data source.
        Specified by:
        setLogWriter in interface javax.sql.CommonDataSource
        Parameters:
        writer - The log writer; to disable, set to null.
        Throws:
        java.sql.SQLException - If a database error occurs.
      • setMetaDataSource

        public void setMetaDataSource(int mds)
        Sets how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Parameters:
        mds - The setting for metadata source The default value is 1.
      • setMetadataSource

        public void setMetadataSource(int mds)
        Sets how to retrieve DatabaseMetaData. If set to 0, database metadata will be retrieved through the ROI data flow. If set to 1, database metadata will be retrieved by calling system stored procedures. The methods that currently are available through stored procedures are: getColumnPrivileges
        Parameters:
        mds - The setting for metadata source The default value is 1. Note: this method is the same as setMetaDataSource() so that it corresponds to the connection property name
      • setNaming

        public void setNaming(java.lang.String naming)
        Sets the naming convention used when referring to tables.
        Parameters:
        naming - The naming convention. Valid values include: "sql" (e.g. schema.table) and "system" (e.g. schema/table). The default value is "sql".
      • setPackage

        public void setPackage(java.lang.String packageName)
        Sets the base name of the SQL package. Note that only the first six characters are used to generate the name of the SQL package on the IBM i system. This property has no effect unless the extended dynamic property is set to true. In addition, this property must be set if the extended dynamic property is set to true.
        Parameters:
        packageName - The base name of the SQL package.
      • setPackageAdd

        public void setPackageAdd(boolean add)
        Sets whether to add newly prepared statements to the SQL package specified on the "package" property. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        add - If newly prepared statements should be added to the SQL package specified on the "package" property; false otherwise. The default value is true.
      • setPackageCache

        public void setPackageCache(boolean cache)
        Sets whether to cache a subset of the SQL package information in client memory. Caching SQL packages locally reduces the amount of communication to the IBM i system for prepares and describes. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        cache - If caching is used; false otherwise. The default value is false.
      • setPackageClear

        public void setPackageClear(boolean clear)
        Deprecated. 
        Sets whether to clear SQL packages when they become full. This method has been deprecated. Package clearing and the decision for the threshold where package clearing is needed is now handled automatically by the database.
        Parameters:
        clear - If the SQL package are cleared when full; false otherwise.
      • setPackageCriteria

        public void setPackageCriteria(java.lang.String packageCriteria)
        Sets the type of SQL statement to be stored in the SQL package. This can be useful to improve the performance of complex join conditions. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        packageCriteria - The type of SQL statement. Valid values include: "default" (only store SQL statements with parameter markers in the package), and "select" (store all SQL SELECT statements in the package). The default value is "default".
      • setPackageError

        public void setPackageError(java.lang.String packageError)
        Sets the action to take when SQL package errors occur. When an SQL package error occurs, the driver will optionally throw an SQLException or post a warning to the Connection, based on the value of this property. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        packageError - The action when SQL errors occur. Valid values include: "exception", "warning", and "none". The default value is "warning".
      • setPackageLibrary

        public void setPackageLibrary(java.lang.String packageLibrary)
        Sets the library for the SQL package. This property has no effect unless the extended dynamic property is set to true.
        Parameters:
        packageLibrary - The SQL package library. The default package library is "QGPL".
      • setPassword

        public void setPassword(java.lang.String password)
        Sets the database password.
        Parameters:
        password - The password.
      • setPrefetch

        public void setPrefetch(boolean prefetch)
        Sets whether to prefetch data upon executing a SELECT statement. This will increase performance when accessing the initial rows in the result set.
        Parameters:
        prefetch - If prefetch is used; false otherwise. The default value is to prefectch data.
      • setPrompt

        public void setPrompt(boolean prompt)
        Sets whether the user should be prompted if a user name or password is needed to connect to the IBM i system. If a connection can not be made without prompting the user, and this property is set to false, then an attempt to connect will fail.
        Parameters:
        prompt - true if the user is prompted for signon information; false otherwise. The default value is false.
      • setProperties

        public void setProperties(java.lang.String propertiesString)
        Sets the properties based on ";" delimited string of properties, in same fashion as URL properties specified with DriverManager.getConnection(urlProperties). This method simply parses property string and then calls setPropertes(Properties). This method is intended as an enhancement so that the user does not have to write new code to call the setters for new/deleted properties.
        Parameters:
        propertiesString - list of ";" delimited properties
      • setProperties

        public void setProperties(java.util.Properties newProperties)
        Sets the properties for this datasource. This method is intended as an enhancement so that the user does not have to write new code to call the setters for new/deleted properties.
        Parameters:
        newProperties - object containing updated property values
      • setProxyServer

        public void setProxyServer(java.lang.String proxyServer)
        Sets the name of the proxy server.
        Parameters:
        proxyServer - The proxy server.
      • setRemarks

        public void setRemarks(java.lang.String remarks)
        Sets the source of the text for REMARKS columns in ResultSets returned by DatabaseMetaData methods.
        Parameters:
        remarks - The text source. Valid values include: "sql" (SQL object comment) and "system" (IBM i object description). The default value is "system".
      • setRollbackCursorHold

        public void setRollbackCursorHold(boolean cursorHold)
        Sets whether the cursor is held after a rollback.
        Parameters:
        cursorHold - true if the cursor is held; false otherwise. The default value is false.
      • setSecondaryUrl

        public void setSecondaryUrl(java.lang.String url)
        Sets the secondary URL to be used for a connection on the middle-tier's DriverManager in a multiple tier environment, if it is different than already specified. This property allows you to use this driver to connect to databases other than DB2 for IBM i. Use a backslash as an escape character before backslashes and semicolons in the URL.
        Parameters:
        url - The secondary URL.
      • setSecondaryURL

        public void setSecondaryURL(java.lang.String url)
        Sets the secondary URL to be used for a connection on the middle-tier's DriverManager in a multiple tier environment, if it is different than already specified. This property allows you to use this driver to connect to databases other than DB2 for IBM i. Use a backslash as an escape character before backslashes and semicolons in the URL.
        Parameters:
        url - The secondary URL. Note: this method is the same as setSecondaryUrl() so that it corresponds to the connection property name
      • setSecure

        public void setSecure(boolean secure)
        Sets whether a Secure Socket Layer (SSL) connection is used to communicate with the IBM i system. SSL connections are only available when connecting to systems at V4R4 or later.
        Parameters:
        secure - true if Secure Socket Layer connection is used; false otherwise. The default value is false.
      • setSecureCurrentUser

        public void setSecureCurrentUser(boolean secureCurrentUser)
        Sets whether to disallow "" and *current as user name and password. True indicates to disallow "" and *current for user name and password.
        Parameters:
        secureCurrentUser - The secure current user setting.
      • setServerName

        public void setServerName(java.lang.String serverName)
        Sets the IBM i system name.
        Parameters:
        serverName - The system name.
      • setServerTraceCategories

        public void setServerTraceCategories(int traceCategories)
        Enables tracing of the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system, and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time.

        Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,

          dataSource.setServerTraceCategories(AS400JDBCDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
          
        Parameters:
        traceCategories - level of tracing to start.

        Valid values include:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service.

      • setServerTrace

        public void setServerTrace(int traceCategories)
        Enables tracing of the JDBC server job. If tracing is enabled, tracing is started when the client connects to the IBM i system, and ends when the connection is disconnected. Tracing must be started before connecting to the system since the client enables tracing only at connect time.

        Trace data is collected in spooled files on the system. Multiple levels of tracing can be turned on in combination by adding the constants and passing that sum on the set method. For example,

          dataSource.setServerTraceCategories(AS400JDBCDataSource.SERVER_TRACE_START_DATABASE_MONITOR + AS400JDBCDataSource.SERVER_TRACE_SAVE_SERVER_JOBLOG);
          
        Parameters:
        traceCategories - level of tracing to start.

        Valid values include:

        • SERVER_TRACE_START_DATABASE_MONITOR - Start the database monitor on the JDBC server job. The numeric value of this constant is 2.
        • SERVER_TRACE_DEBUG_SERVER_JOB - Start debug on the JDBC server job. The numeric value of this constant is 4.
        • SERVER_TRACE_SAVE_SERVER_JOBLOG - Save the joblog when the JDBC server job ends. The numeric value of this constant is 8.
        • SERVER_TRACE_TRACE_SERVER_JOB - Start job trace on the JDBC server job. The numeric value of this constant is 16.
        • SERVER_TRACE_SAVE_SQL_INFORMATION - Save SQL information. The numeric value of this constant is 32.

        Tracing the JDBC server job will use significant amounts of system resources. Additional processor resource is used to collect the data, and additional storage is used to save the data. Turn on tracing only to debug a problem as directed by IBM service. Note: this method is the same as setServerTraceCategories() so that it corresponds to the connection property name

      • setDescribeOption

        public void setDescribeOption(java.lang.String option)
        Sets the describe option property.
        Parameters:
        option -
      • setDriver

        public void setDriver(java.lang.String driver)
        Sets the JDBC driver implementation. This property has no effect if the "secondary URL" property is set. This property cannot be set to "native" if the environment is not an IBM i Java Virtual Machine. param driver The driver value.

        Valid values include:

        • "toolbox" (use the IBM Toolbox for Java JDBC driver)
        • "native" (use the IBM Developer Kit for Java JDBC driver)
        The default value is "toolbox". Note: Not supported in a connection pool.
        Parameters:
        driver -
      • setSavePasswordWhenSerialized

        public void setSavePasswordWhenSerialized(boolean savePassword)
        Sets whether to save the password locally with the rest of the properties when this data source object is serialized.

        If the password is saved, it is up to the application to protect the serialized form of the object because it contains all necessary information to connect to the IBM i system. The default is false. It is a security risk to save the password with the rest of the properties so by default the password is not saved. If the application programmer chooses to accept this risk, set this property to true to force the Toolbox to save the password with the other properties when the data source object is serialized.

        Parameters:
        savePassword - true if the password is saved; false otherwise. The default value is false
      • setSortLanguage

        public void setSortLanguage(java.lang.String language)
        Sets the three-character language id to use for selection of a sort sequence. This property has no effect unless the sort property is set to "language".
        Parameters:
        language - The three-character language id. The default value is ENU.
      • setSortTable

        public void setSortTable(java.lang.String table)
        Sets the library and file name of a sort sequence table stored on the IBM i system. This property has no effect unless the sort property is set to "table". The default is an empty String ("").
        Parameters:
        table - The qualified sort table name.
      • setSortWeight

        public void setSortWeight(java.lang.String sortWeight)
        Sets how the IBM i system treats case while sorting records. This property has no effect unless the sort property is set to "language".
        Parameters:
        sortWeight - The sort weight. Valid values include: "shared" (upper- and lower-case characters are sorted as the same character) and "unique" (upper- and lower-case characters are sorted as different characters). The default value is "shared".
      • setThreadUsed

        public void setThreadUsed(boolean threadUsed)
        Sets whether a thread is used.
        Parameters:
        threadUsed - true if a thread is used; false otherwise. The default value is true.
      • setTimeFormat

        public void setTimeFormat(java.lang.String timeFormat)
        Sets the time format used in time literals with SQL statements.
        Parameters:
        timeFormat - The time format.

        Valid values include:

        • "hms"
        • "usa"
        • "iso"
        • "eur"
        • "jis"
        • "" (server job value) - default.
        The default value is based on the server job.
      • setTimeSeparator

        public void setTimeSeparator(java.lang.String timeSeparator)
        Sets the time separator used in time literals within SQL statements. This property has no effect unless the time format property is set to "hms".
        Parameters:
        timeSeparator - The time separator.

        Valid values include:

        • ":" (colon)
        • "." (period)
        • "," (comma)
        • " " (space)
        • "" (server job value) - default.
        The default value is based on the server job.
      • setTimestampFormat

        public void setTimestampFormat(java.lang.String timestampFormat)
        Sets the timestamp format used by getString methods.
        Parameters:
        timestampFormat - The timestamp format.

        Valid values include:

        • "iso"
        • "ibmsql"
        The default value is based on the server job.
      • setTrace

        public void setTrace(boolean trace)
        Sets whether trace messages should be logged. Trace messages are useful for debugging programs that call JDBC. However, there is a performance penalty associated with logging trace messages, so this property should only be set to true for debugging. Trace messages are logged to System.out.
        Parameters:
        trace - true if trace message are logged; false otherwise. The default value is false.
      • setTransactionIsolation

        public void setTransactionIsolation(java.lang.String transactionIsolation)
        Sets the IBM i system's transaction isolation.
        Parameters:
        transactionIsolation - The transaction isolation level.

        Valid values include:

        • "none"
        • "read uncommitted" - The default value.
        • "read committed"
        • "repeatable read"
        • "serializable"
      • setTranslateBinary

        public void setTranslateBinary(boolean translate)
        Sets whether binary data is translated. If this property is set to true, then BINARY and VARBINARY fields are treated as CHAR and VARCHAR fields.
        Parameters:
        translate - true if binary data is translated; false otherwise. The default value is false.
      • setTranslateBoolean

        public void setTranslateBoolean(boolean translate)
        Sets how Boolean objects are interpreted when setting the value for a character field/parameter using the PreparedStatement.setObject(), CallableStatement.setObject() or ResultSet.updateObject() methods. Setting the property to "true", would store the Boolean object in the character field as either "true" or "false". Setting the property to "false", would store the Boolean object in the character field as either "1" or "0".
        Parameters:
        translate - true if boolean data is translated; false otherwise. The default value is true.
      • setUseBlockUpdate

        public void setUseBlockUpdate(boolean value)
        Indicates whether blocking should be used for updates and delete.
        Parameters:
        value - true if blocking is used for updates and deletes. The default value is false.
      • setUseDrdaMetadataVersion

        public void setUseDrdaMetadataVersion(boolean value)
        Indicates whether DRDA metadata should be returned.
        Parameters:
        value - true if DRDA metadata is returned. The default value is false.
      • setUser

        public void setUser(java.lang.String user)
        Sets the database user.
        Parameters:
        user - The user.
      • setVariableFieldCompression

        public void setVariableFieldCompression(boolean compress)
        Specifies whether variable-length fields should be compressed.
        Parameters:
        compress - true if variable-length fields should be compressed; false otherwise. The default value is true.
      • setVariableFieldCompression

        public void setVariableFieldCompression(java.lang.String compress)
        Specifies how variable-length fields should be compressed.
        Parameters:
        compress - Possible values are
        • "true" -- compression will be used for result set data
        • "false" -- no compression will be used
        • "insert" -- compression will only be used for batched insert data
        • "all" -- compression will be used for result set data and for batched insert data
        The default value is "all" when connected to a server that supports compression of batched insert data and "true" when the server does not support compression of batched insert date
      • getKeepAlive

        public boolean getKeepAlive()
        Gets the socket keepalive option.
        Returns:
        The value of the socket keepalive option.
      • isKeepAlive

        public boolean isKeepAlive()
        Gets the socket keepalive option. -- returns result as boolean
        Returns:
        The value of the socket keepalive option.
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Gets the socket receive buffer size option. NOTE: This does not get the actual receive buffer size, only the option which is used as a hint by the underlying socket code.
        Returns:
        The value of the socket receive buffer size option.
      • getSendBufferSize

        public int getSendBufferSize()
        Gets the socket send buffer size option. NOTE: This does not get the actual send buffer size, only the option which is used as a hint by the underlying socket code.
        Returns:
        The value of the socket send buffer size option.
      • getSoLinger

        public int getSoLinger()
        Gets the socket linger option in seconds.
        Returns:
        The value of the socket linger option.
      • getSoTimeout

        public int getSoTimeout()
        Gets the socket timeout option in milliseconds.
        Returns:
        The value of the socket timeout option.
      • getTcpNoDelay

        public boolean getTcpNoDelay()
        Gets the socket TCP no delay option.
        Returns:
        The value of the socket TCP no delay option.
      • setKeepAlive

        public void setKeepAlive(boolean keepAlive)
        This property allows the turning on of socket keep alive.
        Parameters:
        keepAlive - The keepalive option value.
      • setReceiveBufferSize

        public void setReceiveBufferSize(int size)
        This property sets the receive buffer size socket option to the specified value. The receive buffer size option is used as a hint for the size to set the underlying network I/O buffers. Increasing the receive buffer size can increase the performance of network I/O for high-volume connection, while decreasing it can help reduce the backlog of incoming data. This value must be greater than 0.
        Parameters:
        size - The socket receive buffer size option value.
      • setSendBufferSize

        public void setSendBufferSize(int size)
        This property sets the send buffer size socket option to the specified value. The send buffer size option is used by the platform's networking code as a hint for the size to set the underlying network I/O buffers. This value must be greater than 0.
        Parameters:
        size - The socket send buffer size option value.
      • setSoLinger

        public void setSoLinger(int seconds)
        This property allows the turning on of socket linger with the specified linger time in seconds. The maxium value for this property is platform specific.
        Parameters:
        seconds - The socket linger option value.
      • setSoTimeout

        public void setSoTimeout(int milliseconds)
        This property enables/disables socket timeout with the specified value in milliseconds. A timeout value must be greater than zero, a value of zero for this property indicates infinite timeout.
        Parameters:
        milliseconds - The socket timeout option value.
      • setSocketTimeout

        public void setSocketTimeout(int milliseconds)
        This property enables/disables socket timeout with the specified value in milliseconds. A timeout value must be greater than zero, a value of zero for this property indicates infinite timeout.
        Parameters:
        milliseconds - The socket timeout option value.
      • setTcpNoDelay

        public void setTcpNoDelay(boolean noDelay)
        This property allows the turning on of the TCP no delay socket option.
        Parameters:
        noDelay - The socket TCP no delay option value.
      • getPackageCCSID

        public int getPackageCCSID()
        Gets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in. Default value: 13488
        Returns:
        The value of the package CCSID property.
      • getPackageCcsid

        public int getPackageCcsid()
        Gets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in. Default value: 13488
        Returns:
        The value of the package CCSID property. Note: this method is the same as getPackageCCSID() so that it corresponds to the connection property name
      • setPackageCCSID

        public void setPackageCCSID(int ccsid)
        Sets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in. Recommended values: 1200(UTF-16) and 13488 (UCS-2). See BidiStringType for Bidi considerations. Default value: 13488
        Parameters:
        ccsid - The package CCSID.
      • setPackageCcsid

        public void setPackageCcsid(int ccsid)
        Sets the package CCSID property, which indicates the CCSID in which statements are sent to the IBM i system and also the CCSID of the package they are stored in. Recommended values: 1200(UTF-16) and 13488 (UCS-2). See BidiStringType for Bidi considerations. Default value: 13488
        Parameters:
        ccsid - The package CCSID. Note: this method is the same as setPackageCCSID() so that it corresponds to the connection property name
      • getMinimumDivideScale

        public int getMinimumDivideScale()
        Gets the minimum divide scale property. This property ensures the scale of the result of decimal division is never less than its specified value. Valid values: 0-9. 0 is default.
        Returns:
        The minimum divide scale.
      • getMaximumBlockedInputRows

        public int getMaximumBlockedInputRows()
        Gets the maximum block input rows. This property indicates the number of rows sent to the database engine for a block insert operation. Valid values: 1-32000. 32000 is default.
        Returns:
        The maximum block input rows
      • getMaximumPrecision

        public int getMaximumPrecision()
        Gets the maximum precision property. This property indicates the maximum decimal precision the IBM i system should use. Valid values: 31 or 63. 31 is default.
        Returns:
        The maximum precision.
      • getMaximumScale

        public int getMaximumScale()
        Gets the maximum scale property. This property indicates the maximum decimal scale the IBM i system should use. Valid values: 0-63. 31 is default.
        Returns:
        The maximum scale.
      • setMinimumDivideScale

        public void setMinimumDivideScale(int scale)
        Sets the minimum divide scale property. This property ensures the scale of the result of decimal division is never less than its specified value. Valid values: 0-9. 0 is default.
        Parameters:
        scale - The minimum divide scale.
      • setMaximumBlockedInputRows

        public void setMaximumBlockedInputRows(int maximumBlockedInputRows)
        Sets the maximum blocked input rows. This property indicates the maximum number of rows sent to the database engine for a blocked input operation. Valid values: 1-32000. 32000 is the default
        Parameters:
        maximumBlockedInputRows - The maximum number of input rows
      • setMaximumPrecision

        public void setMaximumPrecision(int precision)
        Sets the maximum precision property. This property indicates the maximum decimal precision the IBM i system should use. Valid values: 31 or 63. 31 is default.
        Parameters:
        precision - The maximum precision.
      • setMaximumScale

        public void setMaximumScale(int scale)
        Sets the maximum scale property. This property indicates the maximum decimal scale the IBM i system should use. Valid values: 0-63. 31 is default.
        Parameters:
        scale - The maximum scale.
      • setNumericRangeError

        public void setNumericRangeError(java.lang.String setting)
        Sets the numeric range error property, which indicates how the driver should handle numberic range errors.
        Parameters:
        setting - The numeric range error behavior.

        Valid values are:

        • "default" ()
        • "warning" ()
        • "none" ()
        The default value is "character".
      • getTranslateHex

        public java.lang.String getTranslateHex()
        Gets the translate hex property, which indicates how the parser will treat hexadecimal literals.
        Returns:
        The value of the translate hex property.

        Valid values include:

        • "character" (Interpret hexadecimal constants as character data)
        • "binary" (Interpret hexadecimal constants as binary data)
        The default value is "character".
      • setTranslateHex

        public void setTranslateHex(java.lang.String parseOption)
        Sets the translate hex property, which indicates how the parser will treat hexadecimal literals.
        Parameters:
        parseOption - The hex constant parser option.

        Valid values include:

        • "character" (Interpret hexadecimal constants as character data)
        • "binary" (Interpret hexadecimal constants as binary data)
        The default value is "character".
      • setPortNumber

        public void setPortNumber(int portNumber)
        Sets the port number
        Parameters:
        portNumber - The port number to use for the connection.
      • setQaqqiniLibrary

        public void setQaqqiniLibrary(java.lang.String libraryName)
        Sets the QAQQINI library name.
        Parameters:
        libraryName - The QAQQINI library name.
      • setQaqqinilib

        public void setQaqqinilib(java.lang.String libraryName)
        Sets the QAQQINI library name.
        Parameters:
        libraryName - The QAQQINI library name. Note: this method is the same as setQaqqiniLibrary() so that it corresponds to the connection property name
      • setQueryOptimizeGoal

        public void setQueryOptimizeGoal(int goal)
        Sets the goal the IBM i system should use with optimization of queries. This setting corresponds with the system's QAQQINI option called OPTIMIZATION_GOAL. Note, this setting is ignored when running to V5R3 IBM i or earlier
        Parameters:
        goal - - the optimization goal

        Valid values include:

        • 0 = Optimize query for first block of data (*ALLIO) when extended dynamic packages are used; Optimize query for entire result set (*FIRSTIO) when packages are not used
        • 1 = Optimize query for first block of data (*FIRSTIO)
        • 2 = Optimize query for entire result set (*ALLIO)
        The default value is 0.
      • setQueryStorageLimit

        public void setQueryStorageLimit(int limit)
        Sets the storage limit in megabytes, that should be used for statements executing a query in a connection. Note, this setting is ignored when running to i5/OS V5R4 or earlier You must have *JOBCTL special authority to use query storage limit with Version 6 Release 1 of IBM i.
        Parameters:
        limit - the storage limit (in megabytes)

        Valid values are -1 to MAX_STORAGE_LIMIT megabytes. The default value is -1 meaning there is no limit.

      • setQueryReplaceTruncatedParameter

        public void setQueryReplaceTruncatedParameter(java.lang.String queryReplaceTruncatedParameter)
        Sets the query replace truncated parameter property, which will replaced a truncated query parameter with a value. This is intended as a workaround for the problem that a truncated value may match an item in a column, thus causing in incorrect query results.
        Parameters:
        queryReplaceTruncatedParameter - The value to be used for a truncated query parameter.

        Valid values include:

        • "" (replacement will not occur)
        • value (the value to be used when a query parameter is truncated)
        The default value is "".
      • setQueryTimeoutMechanism

        public void setQueryTimeoutMechanism(java.lang.String timeoutMechanism)
        Sets the query timeout mechanism property, which indicates how the toolbox will enforce the query timeout specified on the statement.
        Parameters:
        timeoutMechanism - The timeout mechanism to use.

        Valid values include:

        • "qqrytimlmt" (QQRTIMLMT will be used)
        • "cancel" (cancel will be used)
        The default value is "character".
      • setXALooselyCoupledSupport

        public void setXALooselyCoupledSupport(int lcs)
        Sets whether lock sharing is allowed for loosely coupled transaction branches. Note, this setting is ignored when running to V5R3 IBM i or earlier.
        Parameters:
        lcs - - the "loosely coupled support" setting

        Valid values include:

        • 0 = Locks cannot be shared
        • 1 = Locks can be shared
        The default value is 0.
      • getToolboxTraceCategory

        public java.lang.String getToolboxTraceCategory()
        Returns the toolbox trace category.
        Returns:
        The toolbox trace category.

        Valid values include:

        • "none" - The default value.
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
      • getToolboxTrace

        public java.lang.String getToolboxTrace()
        Returns the toolbox trace category.
        Returns:
        The toolbox trace category.

        Valid values include:

        • "none" - The default value.
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        Note: this method is the same as getToolboxTraceCategory() so that it corresponds to the connection property name
      • setToolboxTraceCategory

        public void setToolboxTraceCategory(java.lang.String traceCategory)
        Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
        Parameters:
        traceCategory - The category option.

        Valid values include:

        • "none"
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        The default value is "none".
      • setToolboxTrace

        public void setToolboxTrace(java.lang.String traceCategory)
        Sets the toolbox trace category, which indicates what trace points and diagnostic messages should be logged.
        Parameters:
        traceCategory - The category option.

        Valid values include:

        • "none"
        • "datastream"
        • "diagnostic"
        • "error"
        • "information"
        • "warning"
        • "conversion"
        • "proxy"
        • "pcml"
        • "jdbc"
        • "all"
        • "thread"
        The default value is "none". Note: this method is the same as setToolboxTraceCategory() so that it corresponds to the connection property name
      • toString

        public java.lang.String toString()
        Returns the string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.
      • getValidWrappedList

        protected java.lang.String[] getValidWrappedList()
      • getEnableClientAffinitiesList

        public int getEnableClientAffinitiesList()
        Returns the enableClientAffinitiesList setting.
      • setEnableClientAffinitiesList

        public void setEnableClientAffinitiesList(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.
      • getAffinityFailbackInterval

        public int getAffinityFailbackInterval()
        Returns the affinityFailbackInterval setting.
      • setAffinityFailbackInterval

        public void setAffinityFailbackInterval(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.
      • getClientRerouteAlternateServerName

        public java.lang.String getClientRerouteAlternateServerName()
        Returns the client reroute alternate server name.
      • setClientRerouteAlternateServerName

        public void setClientRerouteAlternateServerName(java.lang.String alternateServerName)
        Sets the client reroute alternate server name.
      • getClientRerouteAlternatePortNumber

        public java.lang.String getClientRerouteAlternatePortNumber()
        Returns the client reroute alternate server name.
      • setClientRerouteAlternatePortNumber

        public void setClientRerouteAlternatePortNumber(java.lang.String alternatePortNumber)
        Sets the client reroute alternate server name.
      • getMaxRetriesForClientReroute

        public int getMaxRetriesForClientReroute()
        Returns the maxRetriesForClientReroute setting.
      • setMaxRetriesForClientReroute

        public void setMaxRetriesForClientReroute(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.
      • getRetryIntervalForClientReroute

        public int getRetryIntervalForClientReroute()
        Returns the retryIntervalForClientReroute setting.
      • setRetryIntervalForClientReroute

        public void setRetryIntervalForClientReroute(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.
      • getEnableSeamlessFailover

        public int getEnableSeamlessFailover()
        Returns the enableSeamlessFailover setting.
      • setEnableSeamlessFailover

        public void setEnableSeamlessFailover(int setting)
        Sets the enable client afflinities list
        Parameters:
        setting - The setting to use for the connection.