com.metamatrix.jdbc
Class BaseDataSource

java.lang.Object
  extended by com.metamatrix.jdbc.WrapperImpl
      extended by com.metamatrix.jdbc.BaseDataSource
All Implemented Interfaces:
java.io.Serializable, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.ConnectionPoolDataSource, javax.sql.DataSource, javax.sql.XADataSource
Direct Known Subclasses:
MMDataSource, TeiidDataSource

public abstract class BaseDataSource
extends WrapperImpl
implements javax.sql.DataSource, javax.sql.XADataSource, javax.sql.ConnectionPoolDataSource, java.io.Serializable

The MetaMatrix JDBC DataSource implementation class of DataSource and XADataSource.

The DataSource interface follows the JavaBean design pattern, meaning the implementation class has properties that are accessed with getter methods and set using setter methods, and where the getter and setter methods follow the JavaBean naming convention (e.g., getPropertyName() : PropertyType and setPropertyName(PropertyType) : void).

The XADataSource interface is almost identical to the DataSource interface, but rather than returning Connection instances, there are methods that return XAConnection instances that can be used with distributed transactions.

The following are the properties for this DataSource:

Property NameTypeDescription
applicationName StringThe optional name of the application using the DataSource.
clientToken SerializableThe optional client token that will be passed directly through to the connectors, which may use it and/or pass it down to their underlying data source.

The form and type of the client token is up to the client but it must implement the Serializable interface. MetaMatrix does nothing with this token except to make it available for authentication/augmentation/replacement upon authentication to the system and to connectors that may require it at the data source level.

databaseName StringThe name of a particular virtual database on a MetaMatrix Server.
databaseVersion StringThe optional version of a particular virtual database on a MetaMatrix Server; if not supplied, then the latest version is assumed.
dataSourceName StringThe optional logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.
description StringThe optional description of this data source.
logFile StringThe optional path and file name to which JDBC Log Statements will be written; if none is specified, then no Log Statements will be written.
logLevel int The optional level for logging, which only applies if the logFile property is set. Value must be one of the following:
  • "0" - no JDBC log messages will be written to the file; this is the default
  • "1" - all JDBC log messages will be written to the file
  • "2" - all JDBC log messages as well as stack traces of any exceptions thrown from this driver will be written to the file
passwordStringThe user's password.
userStringThe user name to use for the connection.
partialResultsModebooleanSupport partial results mode or not.
fetchSizeintSet default fetch size for statements, default=500.
sqlOptionsStringSet sql options to use on every command. default=null

See Also:
Serialized Form

Field Summary
static java.lang.String APP_NAME
           
static java.lang.String DEFAULT_APP_NAME
           
protected static int DEFAULT_FETCH_SIZE
           
protected static int DEFAULT_LOG_LEVEL
           
protected static java.lang.String DEFAULT_PARTIAL_RESULTS_MODE
           
protected static java.lang.String DEFAULT_RESULT_SET_CACHE_MODE
           
protected static int DEFAULT_TIMEOUT
           
static java.lang.String JDBC
           
static java.lang.String METAMATRIX_PROTOCOL
           
static java.lang.String PASSWORD
           
static java.lang.String TXN_AUTO_WRAP_OFF
          Transaction auto wrap constant - never wrap a command execution in a transaction and allow multi-source updates to occur outside of a transaction.
static java.lang.String TXN_AUTO_WRAP_ON
          Transaction auto wrap constant - always wrap every non-transactional command execution in a transaction.
static java.lang.String TXN_AUTO_WRAP_OPTIMISTIC
          Transaction auto wrap constant - optimistic mode assumes that non-transactional commands typically do not require a transaction due to a multi-source update, so no transaction is created.
static java.lang.String TXN_AUTO_WRAP_PESSIMISTIC
          Transaction auto wrap constant - pessimistic mode assumes that any command execution might require a transaction to be wrapped around it.
static java.lang.String USER_NAME
           
static java.lang.String VDB_NAME
           
static java.lang.String VDB_VERSION
           
static java.lang.String VERSION
           
 
Constructor Summary
BaseDataSource()
          Constructor for MMDataSource.
 
Method Summary
protected  java.util.Properties buildProperties(java.lang.String userName, java.lang.String password)
           
 java.lang.String getAdditionalProperties()
           
 java.lang.String getApplicationName()
          Returns the name of the application.
 java.io.Serializable getClientToken()
          Get the Serializable client token that will be passed directly through to the connectors, which may use it and/or pass it down to their underlying data source.
 java.sql.Connection getConnection()
          Attempt to establish a database connection.
 java.lang.String getDatabaseName()
          Returns the name of the virtual database on a particular MetaMatrix Server.
 java.lang.String getDatabaseVersion()
          Returns the databaseVersion.
 java.lang.String getDataSourceName()
          Returns the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.
 java.lang.String getDescription()
          Returns the description of this data source.
 java.lang.String getDisableLocalTxn()
           
 int getFetchSize()
           
 int getLoginTimeout()
          Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
 java.io.PrintWriter getLogWriter()
          Get the log writer for this data source.
 java.lang.String getPartialResultsMode()
           
 java.lang.String getPassword()
          Returns the password.
 javax.sql.PooledConnection getPooledConnection()
           
 javax.sql.PooledConnection getPooledConnection(java.lang.String userName, java.lang.String password)
           
protected static java.lang.String getResourceMessage(java.lang.String key)
           
 java.lang.String getResultSetCacheMode()
           
 java.lang.String getSqlOptions()
          Get special sqlOptions string, which can currently be set only to SHOWPLAN
 java.lang.String getTransactionAutoWrap()
          Returns the current setting for how connections are created by this DataSource manage transactions for client requests when client applications do not use transactions.
 java.lang.String getUser()
          Returns the user.
 javax.sql.XAConnection getXAConnection()
           
 javax.sql.XAConnection getXAConnection(java.lang.String userName, java.lang.String password)
          Attempt to establish a database connection that can be used with distributed transactions.
static java.lang.String reasonWhyInvalidApplicationName(java.lang.String applicationName)
          Return the reason why the supplied application name may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidClientToken(java.io.Serializable clientToken)
          Return the reason why the supplied client token may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidDatabaseName(java.lang.String databaseName)
          Return the reason why the supplied virtual database name may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidDatabaseVersion(java.lang.String databaseVersion)
          Return the reason why the supplied virtual database version may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidDataSourceName(java.lang.String dataSourceName)
          Return the reason why the supplied data source name may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidDescription(java.lang.String description)
          Return the reason why the supplied description may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidFetchSize(int fetchSize)
          The reason why fetchSize is invalid.
static java.lang.String reasonWhyInvalidPartialResultsMode(java.lang.String partialMode)
          The reason why partialResultsMode is invalid.
static java.lang.String reasonWhyInvalidPassword(java.lang.String pwd)
          Return the reason why the supplied password may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidTransactionAutoWrap(java.lang.String autoWrap)
          Return the reason why the supplied transaction auto wrap value may be invalid, or null if it is considered valid.
static java.lang.String reasonWhyInvalidUser(java.lang.String userName)
          Return the reason why the supplied user name may be invalid, or null if it is considered valid.
 void setAdditionalProperties(java.lang.String additionalProperties)
           
 void setApplicationName(java.lang.String applicationName)
          Sets the name of the application.
 void setClientToken(java.io.Serializable clientToken)
          Set the Serializable client token that will be passed directly through to the connectors, which may use it and/or pass it down to their underlying data source.
 void setDatabaseName(java.lang.String databaseName)
          Sets the name of the virtual database on a particular MetaMatrix Server.
 void setDatabaseVersion(java.lang.String databaseVersion)
          Sets the databaseVersion.
 void setDataSourceName(java.lang.String dataSourceName)
          Sets the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.
 void setDescription(java.lang.String description)
          Sets the description of this data source.
 void setDisableLocalTxn(java.lang.String disableLocalTxn)
           
 void setFetchSize(int fetchSize)
           
 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)
          Set the log writer for this data source.
 void setPartialResultsMode(java.lang.String partialResultsMode)
           
 void setPassword(java.lang.String password)
          Sets the password.
 void setResultSetCacheMode(java.lang.String resultSetCacheMode)
           
 void setSqlOptions(java.lang.String sqlOptions)
          Sets special sqlOptions that should be used with each command.
 void setTransactionAutoWrap(java.lang.String transactionAutoWrap)
          Sets the setting for how connections are created by this DataSource manage transactions for client requests when client applications do not use transactions.
 void setUser(java.lang.String user)
          Sets the user.
protected  void validateProperties(java.lang.String userName, java.lang.String password)
           
 
Methods inherited from class com.metamatrix.jdbc.WrapperImpl
isWrapperFor, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sql.DataSource
getConnection
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

DEFAULT_APP_NAME

public static final java.lang.String DEFAULT_APP_NAME
See Also:
Constant Field Values

VDB_NAME

public static final java.lang.String VDB_NAME
See Also:
Constant Field Values

VDB_VERSION

public static final java.lang.String VDB_VERSION
See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

APP_NAME

public static final java.lang.String APP_NAME
See Also:
Constant Field Values

USER_NAME

public static final java.lang.String USER_NAME
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

DEFAULT_TIMEOUT

protected static final int DEFAULT_TIMEOUT
See Also:
Constant Field Values

DEFAULT_LOG_LEVEL

protected static final int DEFAULT_LOG_LEVEL
See Also:
Constant Field Values

METAMATRIX_PROTOCOL

public static final java.lang.String METAMATRIX_PROTOCOL
See Also:
Constant Field Values

JDBC

public static final java.lang.String JDBC
See Also:
Constant Field Values

DEFAULT_FETCH_SIZE

protected static final int DEFAULT_FETCH_SIZE
See Also:
Constant Field Values

DEFAULT_PARTIAL_RESULTS_MODE

protected static final java.lang.String DEFAULT_PARTIAL_RESULTS_MODE
See Also:
Constant Field Values

DEFAULT_RESULT_SET_CACHE_MODE

protected static final java.lang.String DEFAULT_RESULT_SET_CACHE_MODE
See Also:
Constant Field Values

TXN_AUTO_WRAP_OFF

public static final java.lang.String TXN_AUTO_WRAP_OFF
Transaction auto wrap constant - never wrap a command execution in a transaction and allow multi-source updates to occur outside of a transaction.

See Also:
Constant Field Values

TXN_AUTO_WRAP_ON

public static final java.lang.String TXN_AUTO_WRAP_ON
Transaction auto wrap constant - always wrap every non-transactional command execution in a transaction.

See Also:
Constant Field Values

TXN_AUTO_WRAP_PESSIMISTIC

public static final java.lang.String TXN_AUTO_WRAP_PESSIMISTIC
Transaction auto wrap constant - pessimistic mode assumes that any command execution might require a transaction to be wrapped around it. To determine this an extra server call is made to check whether the command requires a transaction and a transaction will be automatically started. This is most accurate and safe, but has a performance impact.

See Also:
Constant Field Values

TXN_AUTO_WRAP_OPTIMISTIC

public static final java.lang.String TXN_AUTO_WRAP_OPTIMISTIC
Transaction auto wrap constant - optimistic mode assumes that non-transactional commands typically do not require a transaction due to a multi-source update, so no transaction is created. In this respect, this mode is identical to TXN_AUTO_WRAP_OFF. However, these modes differ because if we discover during server execution that multiple sources will be updated by a particular command, an exception is thrown to indicate that the command cannot be executed. This is the default mode.

See Also:
Constant Field Values
Constructor Detail

BaseDataSource

public BaseDataSource()
Constructor for MMDataSource.

Method Detail

buildProperties

protected java.util.Properties buildProperties(java.lang.String userName,
                                               java.lang.String password)

validateProperties

protected void validateProperties(java.lang.String userName,
                                  java.lang.String password)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Attempt to establish a database connection.

Specified by:
getConnection in interface javax.sql.DataSource
Returns:
a Connection to the database
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
DataSource.getConnection()

getXAConnection

public javax.sql.XAConnection getXAConnection()
                                       throws java.sql.SQLException
Specified by:
getXAConnection in interface javax.sql.XADataSource
Throws:
java.sql.SQLException
See Also:
XADataSource.getXAConnection()

getXAConnection

public javax.sql.XAConnection getXAConnection(java.lang.String userName,
                                              java.lang.String password)
                                       throws java.sql.SQLException
Attempt to establish a database connection that can be used with distributed transactions.

Specified by:
getXAConnection in interface javax.sql.XADataSource
Parameters:
userName - the database user on whose behalf the XAConnection is being made
password - the user's password
Returns:
an XAConnection to the database
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
XADataSource.getXAConnection(java.lang.String, java.lang.String)

getPooledConnection

public javax.sql.PooledConnection getPooledConnection()
                                               throws java.sql.SQLException
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getPooledConnection

public javax.sql.PooledConnection getPooledConnection(java.lang.String userName,
                                                      java.lang.String password)
                                               throws java.sql.SQLException
Specified by:
getPooledConnection in interface javax.sql.ConnectionPoolDataSource
Throws:
java.sql.SQLException

getDisableLocalTxn

public java.lang.String getDisableLocalTxn()

setDisableLocalTxn

public void setDisableLocalTxn(java.lang.String disableLocalTxn)

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Get the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the DriverManager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
getLogWriter in interface javax.sql.CommonDataSource
Returns:
the log writer for this data source, null if disabled
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
CommonDataSource.getLogWriter()

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. A value of zero means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Specified by:
getLoginTimeout in interface javax.sql.CommonDataSource
Returns:
the data source login time limit
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
CommonDataSource.getLoginTimeout()

setLogWriter

public void setLogWriter(java.io.PrintWriter writer)
                  throws java.sql.SQLException
Set the log writer for this data source.

The log writer is a character output stream to which all logging and tracing messages for this data source object instance will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the DriverManager class. When a DataSource object is created the log writer is initially null, in other words, logging is disabled.

Specified by:
setLogWriter in interface javax.sql.CommonDataSource
Parameters:
writer - the log writer for this data source, null if disabled
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
CommonDataSource.setLogWriter(java.io.PrintWriter)

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 means that the timeout is the default system timeout if there is one; otherwise it means that there is no timeout. When a DataSource object is created the login timeout is initially zero.

Specified by:
setLoginTimeout in interface javax.sql.CommonDataSource
Parameters:
timeOut - the data source login time limit
Throws:
java.sql.SQLException - if a database-access error occurs
See Also:
CommonDataSource.setLoginTimeout(int)

getApplicationName

public java.lang.String getApplicationName()
Returns the name of the application. Supplying this property may allow an administrator of a MetaMatrix Server to better identify individual connections and usage patterns. This property is optional.

Returns:
String the application name; may be null or zero-length

getDatabaseName

public java.lang.String getDatabaseName()
Returns the name of the virtual database on a particular MetaMatrix Server.

Returns:
String

getDatabaseVersion

public java.lang.String getDatabaseVersion()
Returns the databaseVersion.

Returns:
String

getDataSourceName

public java.lang.String getDataSourceName()
Returns the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.

Returns:
the logical name for the underlying data source; may be null

getDescription

public java.lang.String getDescription()
Returns the description of this data source.

Returns:
the description; may be null

getUser

public java.lang.String getUser()
Returns the user.

Returns:
the name of the user for this data source

getPassword

public java.lang.String getPassword()
Returns the password.

Returns:
the password for this data source.

getClientToken

public java.io.Serializable getClientToken()
Get the Serializable client token that will be passed directly through to the connectors, which may use it and/or pass it down to their underlying data source. This property is optional.

The form and type of the client token is up to the client but it must implement the Serializabe interface. MetaMatrix does nothing with this token except to make it available for authentication/augmentation/replacement upon authentication to the system and to connectors that may require it at the data source level.

Returns:
The client token that was supplied by the client at system connection time; may be null.

setApplicationName

public void setApplicationName(java.lang.String applicationName)
Sets the name of the application. Supplying this property may allow an administrator of a MetaMatrix Server to better identify individual connections and usage patterns. This property is optional.

Parameters:
applicationName - The applicationName to set

setDatabaseName

public void setDatabaseName(java.lang.String databaseName)
Sets the name of the virtual database on a particular MetaMatrix Server.

Parameters:
databaseName - The name of the virtual database

setDatabaseVersion

public void setDatabaseVersion(java.lang.String databaseVersion)
Sets the databaseVersion.

Parameters:
databaseVersion - The version of the virtual database

setDataSourceName

public void setDataSourceName(java.lang.String dataSourceName)
Sets the logical name for the underlying XADataSource or ConnectionPoolDataSource; used only when pooling connections or distributed transactions are implemented.

Parameters:
dataSourceName - The dataSourceName for this data source; may be null

setUser

public void setUser(java.lang.String user)
Sets the user.

Parameters:
user - The user to set

setPassword

public void setPassword(java.lang.String password)
Sets the password.

Parameters:
password - The password for this data source

setClientToken

public void setClientToken(java.io.Serializable clientToken)
Set the Serializable client token that will be passed directly through to the connectors, which may use it and/or pass it down to their underlying data source. This property is optional.

The form and type of the client token is up to the client but it must implement the Serializabe interface. MetaMatrix does nothing with this token except to make it available for authentication/augmentation/replacement upon authentication to the system and to connectors that may require it at the data source level.

Parameters:
clientToken - The client token that will be passed with this user's requests.

setDescription

public void setDescription(java.lang.String description)
Sets the description of this data source.

Parameters:
description - The description for this data source; may be null

setPartialResultsMode

public void setPartialResultsMode(java.lang.String partialResultsMode)

getPartialResultsMode

public java.lang.String getPartialResultsMode()

setFetchSize

public void setFetchSize(int fetchSize)

getFetchSize

public int getFetchSize()

setResultSetCacheMode

public void setResultSetCacheMode(java.lang.String resultSetCacheMode)

getResultSetCacheMode

public java.lang.String getResultSetCacheMode()

getSqlOptions

public java.lang.String getSqlOptions()
Get special sqlOptions string, which can currently be set only to SHOWPLAN

Returns:
Returns sqlOptions string or null if none
Since:
4.3

setSqlOptions

public void setSqlOptions(java.lang.String sqlOptions)
Sets special sqlOptions that should be used with each command.

Parameters:
sqlOptions - SQL options, only "SHOWPLAN" is currently accepted
Since:
4.3

getTransactionAutoWrap

public java.lang.String getTransactionAutoWrap()
Returns the current setting for how connections are created by this DataSource manage transactions for client requests when client applications do not use transactions. Because a MetaMatrix virtual database will likely deal with multiple underlying information sources, the MetaMatrix XA Server will execute all client requests within the contexts of transactions. This method determines the semantics of creating such transactions when the client does not explicitly do so.

Returns:
the current setting, or null if the property has not been set and the default mode will be used.

setTransactionAutoWrap

public void setTransactionAutoWrap(java.lang.String transactionAutoWrap)
Sets the setting for how connections are created by this DataSource manage transactions for client requests when client applications do not use transactions. Because a MetaMatrix virtual database will likely deal with multiple underlying information sources, the MetaMatrix XA Server will execute all client requests within the contexts of transactions. This method determines the semantics of creating such transactions when the client does not explicitly do so.

The allowable values for this property are:

This property is important only if connecting to a MetaMatrix XA Server.

Parameters:
transactionAutoWrap - The transactionAutoWrap to set

reasonWhyInvalidApplicationName

public static java.lang.String reasonWhyInvalidApplicationName(java.lang.String applicationName)
Return the reason why the supplied application name may be invalid, or null if it is considered valid.

Parameters:
applicationName - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setApplicationName(String)

reasonWhyInvalidClientToken

public static java.lang.String reasonWhyInvalidClientToken(java.io.Serializable clientToken)
Return the reason why the supplied client token may be invalid, or null if it is considered valid.

Parameters:
clientToken - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setClientToken(Serializable)

reasonWhyInvalidDatabaseName

public static java.lang.String reasonWhyInvalidDatabaseName(java.lang.String databaseName)
Return the reason why the supplied virtual database name may be invalid, or null if it is considered valid.

Parameters:
databaseName - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setDatabaseName(String)

reasonWhyInvalidUser

public static java.lang.String reasonWhyInvalidUser(java.lang.String userName)
Return the reason why the supplied user name may be invalid, or null if it is considered valid.

Parameters:
userName - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setUser(String)

reasonWhyInvalidTransactionAutoWrap

public static java.lang.String reasonWhyInvalidTransactionAutoWrap(java.lang.String autoWrap)
Return the reason why the supplied transaction auto wrap value may be invalid, or null if it is considered valid.

This method checks to see that the value is one of the allowable values.

Parameters:
autoWrap - a possible value for the auto wrap property.
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setTransactionAutoWrap(String)

reasonWhyInvalidDatabaseVersion

public static java.lang.String reasonWhyInvalidDatabaseVersion(java.lang.String databaseVersion)
Return the reason why the supplied virtual database version may be invalid, or null if it is considered valid.

Parameters:
databaseVersion - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setDatabaseVersion(String)

reasonWhyInvalidDataSourceName

public static java.lang.String reasonWhyInvalidDataSourceName(java.lang.String dataSourceName)
Return the reason why the supplied data source name may be invalid, or null if it is considered valid.

Parameters:
dataSourceName - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setDataSourceName(String)

reasonWhyInvalidPassword

public static java.lang.String reasonWhyInvalidPassword(java.lang.String pwd)
Return the reason why the supplied password may be invalid, or null if it is considered valid.

Parameters:
pwd - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setPassword(String)

reasonWhyInvalidDescription

public static java.lang.String reasonWhyInvalidDescription(java.lang.String description)
Return the reason why the supplied description may be invalid, or null if it is considered valid.

Parameters:
description - a possible value for the property
Returns:
the reason why the property is invalid, or null if it is considered valid
See Also:
setDescription(String)

reasonWhyInvalidPartialResultsMode

public static java.lang.String reasonWhyInvalidPartialResultsMode(java.lang.String partialMode)
The reason why partialResultsMode is invalid.

Parameters:
partialMode - boolean flag
Returns:
String reason

reasonWhyInvalidFetchSize

public static java.lang.String reasonWhyInvalidFetchSize(int fetchSize)
The reason why fetchSize is invalid.

Parameters:
fetchSize - Number of rows per batch
Returns:
the reason why the property is invalid, or null if it is considered valid

getResourceMessage

protected static java.lang.String getResourceMessage(java.lang.String key)

setAdditionalProperties

public void setAdditionalProperties(java.lang.String additionalProperties)

getAdditionalProperties

public java.lang.String getAdditionalProperties()


Copyright © 2009. All Rights Reserved.