org.firebirdsql.jdbc
Interface FirebirdConnectionProperties

All Known Subinterfaces:
FirebirdPool
All Known Implementing Classes:
AbstractFBConnectionPoolDataSource, FBAbstractCommonDataSource, FBConnectionPoolDataSource, FBConnectionPoolDataSource, FBConnectionProperties, FBManagedConnectionFactory, FBSimpleDataSource, FBSimpleDataSource, FBWrappingDataSource, FBXADataSource

public interface FirebirdConnectionProperties

Connection properties for the Firebird connection. Main part of this interface corresponds to the Database Parameter Buffer, but also contains properties to specify default transaction parameters.


Method Summary
 int getBlobBufferSize()
           
 int getBuffersNumber()
           
 java.lang.String getCharSet()
           
 int getConnectTimeout()
          Get the current connect timeout.
 java.lang.String getDatabase()
           
 DatabaseParameterBuffer getDatabaseParameterBuffer()
          Get the database parameter buffer corresponding to the current connection request information.
 java.lang.String getDefaultIsolation()
          Get the default transaction isolation level as string.
 int getDefaultTransactionIsolation()
          Get the default transaction isolation level.
 java.lang.String getEncoding()
           
 java.lang.String getNonStandardProperty(java.lang.String key)
          Get the property that does not have corresponding getter method by its name.
 java.lang.String getPassword()
           
 java.lang.String getRoleName()
           
 int getSocketBufferSize()
           
 int getSoTimeout()
          Get the current Socket blocking timeout (SoTimeout).
 java.lang.String getSqlDialect()
           
 java.lang.String getTpbMapping()
          Get the used TPB mapping.
 TransactionParameterBuffer getTransactionParameters(int isolation)
          Get the transaction parameter buffer corresponding to the current connection request information.
 java.lang.String getType()
           
 java.lang.String getUserName()
           
 java.lang.String getUseTranslation()
           
 boolean isDefaultResultSetHoldable()
          Get the default ResultSet holdability.
 boolean isTimestampUsesLocalTimezone()
           
 boolean isUseFirebirdAutocommit()
          Get whether to use Firebird autocommit (experimental).
 boolean isUseStandardUdf()
           
 boolean isUseStreamBlobs()
           
 void setBlobBufferSize(int bufferSize)
           
 void setBuffersNumber(int buffersNumber)
           
 void setCharSet(java.lang.String charSet)
           
 void setConnectTimeout(int connectTimeout)
          Set the connect timeout.
 void setDatabase(java.lang.String database)
           
 void setDefaultIsolation(java.lang.String isolation)
          Set the default transaction isolation level as string.
 void setDefaultResultSetHoldable(boolean isHoldable)
          Sets the default ResultSet holdability.
 void setDefaultTransactionIsolation(int defaultIsolationLevel)
          Set the default transaction isolation level.
 void setEncoding(java.lang.String encoding)
           
 void setNonStandardProperty(java.lang.String propertyMapping)
          Set the property that does not have corresponding setter method.
 void setNonStandardProperty(java.lang.String key, java.lang.String value)
          Set the property that does not have corresponding setter method.
 void setPassword(java.lang.String password)
           
 void setRoleName(java.lang.String roleName)
           
 void setSocketBufferSize(int socketBufferSize)
           
 void setSoTimeout(int soTimeout)
          Set the Socket blocking timeout (SoTimeout).
 void setSqlDialect(java.lang.String sqlDialect)
           
 void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
           
 void setTpbMapping(java.lang.String tpbMapping)
          Set path to the properties file with the TPB mapping.
 void setTransactionParameters(int isolation, TransactionParameterBuffer tpb)
          Set transaction parameters for the specified transaction isolation level.
 void setType(java.lang.String type)
           
 void setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
          Set whether to use Firebird autocommit (experimental).
 void setUserName(java.lang.String userName)
           
 void setUseStandardUdf(boolean useStandardUdf)
           
 void setUseStreamBlobs(boolean useStreamBlobs)
           
 void setUseTranslation(java.lang.String translationPath)
           
 

Method Detail

getDatabase

java.lang.String getDatabase()
Returns:
path to the database including the server name and the port, if needed.

setDatabase

void setDatabase(java.lang.String database)
Parameters:
database - path to the database including the server name and the port, if needed.

getType

java.lang.String getType()
Returns:
type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.

setType

void setType(java.lang.String type)
Parameters:
type - type of the connection, for example, "PURE_JAVA", "LOCAL", "EMBEDDED", depends on the GDS implementations installed in the system.

getBlobBufferSize

int getBlobBufferSize()
Returns:
BLOB buffer size in bytes.

setBlobBufferSize

void setBlobBufferSize(int bufferSize)
Parameters:
bufferSize - size of the BLOB buffer in bytes.

getCharSet

java.lang.String getCharSet()
Returns:
Character set for the connection.
See Also:
setCharSet(String)

setCharSet

void setCharSet(java.lang.String charSet)
Parameters:
charSet - Character set for the connection. Similar to encoding property, but accepts Java names instead of Firebird ones.

getEncoding

java.lang.String getEncoding()
Returns:
Character encoding for the connection.
See Also:
setEncoding(String)

setEncoding

void setEncoding(java.lang.String encoding)
Parameters:
encoding - Character encoding for the connection. See Firebird documentation for more information.

getRoleName

java.lang.String getRoleName()
Returns:
SQL role to use.

setRoleName

void setRoleName(java.lang.String roleName)
Parameters:
roleName - SQL role to use.

getSqlDialect

java.lang.String getSqlDialect()
Returns:
SQL dialect of the client.

setSqlDialect

void setSqlDialect(java.lang.String sqlDialect)
Parameters:
sqlDialect - SQL dialect of the client.

getUseTranslation

java.lang.String getUseTranslation()
Returns:
path to the character translation table.

setUseTranslation

void setUseTranslation(java.lang.String translationPath)
Parameters:
translationPath - path to the character translation table.

isUseStreamBlobs

boolean isUseStreamBlobs()
Returns:
true if stream blobs should be created, otherwise false.

setUseStreamBlobs

void setUseStreamBlobs(boolean useStreamBlobs)
Parameters:
useStreamBlobs - true if stream blobs should be created, otherwise false.

isUseStandardUdf

boolean isUseStandardUdf()
Returns:
true if driver should assume that standard UDF are installed.

setUseStandardUdf

void setUseStandardUdf(boolean useStandardUdf)
Parameters:
useStandardUdf - true if driver should assume that standard UDF are installed.

getSocketBufferSize

int getSocketBufferSize()
Returns:
socket buffer size in bytes, or -1 is not specified.

setSocketBufferSize

void setSocketBufferSize(int socketBufferSize)
Parameters:
socketBufferSize - socket buffer size in bytes.

isTimestampUsesLocalTimezone

boolean isTimestampUsesLocalTimezone()
Returns:
true if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.

setTimestampUsesLocalTimezone

void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
Parameters:
timestampUsesLocalTimezone - true if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also compatible with MySQL calendar treatment.

getUserName

java.lang.String getUserName()
Returns:
name of the user that will be used when connecting to the database.

setUserName

void setUserName(java.lang.String userName)
Parameters:
userName - name of the user that will be used when connecting to the database.

getPassword

java.lang.String getPassword()
Returns:
password corresponding to the specified user name.

setPassword

void setPassword(java.lang.String password)
Parameters:
password - password corresponding to the specified user name.

getBuffersNumber

int getBuffersNumber()
Returns:
number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.

setBuffersNumber

void setBuffersNumber(int buffersNumber)
Parameters:
buffersNumber - number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.

getNonStandardProperty

java.lang.String getNonStandardProperty(java.lang.String key)
Get the property that does not have corresponding getter method by its name.

Parameters:
key - name of the property to get.
Returns:
value of the property.

setNonStandardProperty

void setNonStandardProperty(java.lang.String key,
                            java.lang.String value)
Set the property that does not have corresponding setter method.

Parameters:
key - name of the property to set.
value - value of the property.

setNonStandardProperty

void setNonStandardProperty(java.lang.String propertyMapping)
Set the property that does not have corresponding setter method.

Parameters:
propertyMapping - parameter value in the ?propertyName[=propertyValue]? form, this allows setting non-standard parameters using configuration files.

getDatabaseParameterBuffer

DatabaseParameterBuffer getDatabaseParameterBuffer()
                                                   throws java.sql.SQLException
Get the database parameter buffer corresponding to the current connection request information.

Returns:
instance of DatabaseParameterBuffer.
Throws:
java.sql.SQLException - if database parameter buffer cannot be created.

getTpbMapping

java.lang.String getTpbMapping()
Get the used TPB mapping.

Returns:
path to the TPB mapping.
See Also:
setTpbMapping(String)

setTpbMapping

void setTpbMapping(java.lang.String tpbMapping)
Set path to the properties file with the TPB mapping. The path begins with the protocol specification followed by the path to the resource. A special protocol "res:" should be used to specify resource in the classpath.

For the compatibility reasons, if no protocol is specified, classpath is used by default.

Properties file contains a mapping between the transaction isolation level (name of the constant in the Connection interface and a comma-separated list of TPB parameters.

Parameters:
tpbMapping - path to the properties file.

getDefaultTransactionIsolation

int getDefaultTransactionIsolation()
Get the default transaction isolation level. This is the transaction isolation level for the newly created connections.

Returns:
default transaction isolation level.

setDefaultTransactionIsolation

void setDefaultTransactionIsolation(int defaultIsolationLevel)
Set the default transaction isolation level.

Parameters:
defaultIsolationLevel - default transaction isolation level.

getDefaultIsolation

java.lang.String getDefaultIsolation()
Get the default transaction isolation level as string. This method is complementary to the getDefaultTransactionIsolation(), however it takes a string as parameter instead of a numeric constant.

Returns:
default transaction isolation as string.
See Also:
setDefaultIsolation(String)

setDefaultIsolation

void setDefaultIsolation(java.lang.String isolation)
Set the default transaction isolation level as string. This method is complementary to the setDefaultTransactionIsolation(int), however it takes a string as parameter instead of a numeric constant.

Following strings are allowed:

Parameters:
isolation - string constant representing a default isolation level.

getTransactionParameters

TransactionParameterBuffer getTransactionParameters(int isolation)
Get the transaction parameter buffer corresponding to the current connection request information.

Parameters:
isolation - transaction isolation level for which TPB should be returned.
Returns:
instance of TransactionParameterBuffer.

setTransactionParameters

void setTransactionParameters(int isolation,
                              TransactionParameterBuffer tpb)
Set transaction parameters for the specified transaction isolation level. The specified TPB is used as a default mapping for the specified isolation level.

Parameters:
isolation - transaction isolation level.
tpb - instance of TransactionParameterBuffer containing transaction parameters.

isDefaultResultSetHoldable

boolean isDefaultResultSetHoldable()
Get the default ResultSet holdability.

Returns:
true when ResultSets are holdable by default, false not holdable.

setDefaultResultSetHoldable

void setDefaultResultSetHoldable(boolean isHoldable)
Sets the default ResultSet holdability.

Parameters:
isHoldable - true when ResultSets are holdable by default, false not holdable.

getSoTimeout

int getSoTimeout()
Get the current Socket blocking timeout (SoTimeout).

Returns:
The socket blocking timeout in milliseconds (0 is 'infinite')

setSoTimeout

void setSoTimeout(int soTimeout)
Set the Socket blocking timeout (SoTimeout).

Parameters:
soTimeout - Timeout in milliseconds (0 is 'infinite')

getConnectTimeout

int getConnectTimeout()
Get the current connect timeout.

Returns:
Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)

setConnectTimeout

void setConnectTimeout(int connectTimeout)
Set the connect timeout.

Parameters:
connectTimeout - Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)

isUseFirebirdAutocommit

boolean isUseFirebirdAutocommit()
Get whether to use Firebird autocommit (experimental).

Returns:
use Firebird autocommit

setUseFirebirdAutocommit

void setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
Set whether to use Firebird autocommit (experimental).

Parameters:
useFirebirdAutocommit - true Use Firebird autocommit


Copyright © 2001-2019 Jaybird (Firebird JDBC/JCA) team. All rights reserved.