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.
getBlobBufferSize
public int getBlobBufferSize()
- BLOB buffer size in bytes.
getBuffersNumber
public int getBuffersNumber()
- number of cache buffers that should be allocated for this
connection, should be specified for ClassicServer instances,
SuperServer has a server-wide configuration parameter.
getCharSet
public String getCharSet()
- Character set for the connection.
getDatabase
public String getDatabase()
- path to the database including the server name and the port,
if needed.
getDatabaseParameterBuffer
public DatabaseParameterBuffer getDatabaseParameterBuffer()
throws SQLException
Get the database parameter buffer corresponding to the current connection
request information.
getDefaultIsolation
public 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.
- default transaction isolation as string.
getDefaultTransactionIsolation
public int getDefaultTransactionIsolation()
Get the default transaction isolation level. This is the transaction
isolation level for the newly created connections.
- default transaction isolation level.
getEncoding
public String getEncoding()
- Character encoding for the connection.
getNonStandardProperty
public String getNonStandardProperty(String key)
Get the property that does not have corresponding getter method by its
name.
key
- name of the property to get.
getPassword
public String getPassword()
- password corresponding to the specified user name.
getRoleName
public String getRoleName()
getSocketBufferSize
public int getSocketBufferSize()
- socket buffer size in bytes, or -1 is not specified.
getSqlDialect
public String getSqlDialect()
- SQL dialect of the client.
getTpbMapping
public String getTpbMapping()
Get the used TPB mapping.
getTransactionParameters
public TransactionParameterBuffer getTransactionParameters(int isolation)
Get the transaction parameter buffer corresponding to the current
connection request information.
isolation
- transaction isolation level for which TPB should be returned.
getType
public String getType()
- type of the connection, for example, "PURE_JAVA", "LOCAL",
"EMBEDDED", depends on the GDS implementations installed in the system.
getUseTranslation
public String getUseTranslation()
- path to the character translation table.
getUserName
public String getUserName()
- name of the user that will be used when connecting to the
database.
isDefaultResultSetHoldable
public boolean isDefaultResultSetHoldable()
isTimestampUsesLocalTimezone
public boolean isTimestampUsesLocalTimezone()
true
if the Jaybird 1.0 handling of the calendar
in corresponding setters. This is also compatible with MySQL
calendar treatment.
isUseStandardUdf
public boolean isUseStandardUdf()
true
if driver should assume that standard UDF are
installed.
isUseStreamBlobs
public boolean isUseStreamBlobs()
true
if stream blobs should be created, otherwise
false
.
setBlobBufferSize
public void setBlobBufferSize(int bufferSize)
bufferSize
- size of the BLOB buffer in bytes.
setBuffersNumber
public void setBuffersNumber(int buffersNumber)
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.
setCharSet
public void setCharSet(String charSet)
charSet
- Character set for the connection. Similar to
encoding
property, but accepts Java names
instead of Firebird ones.
setDatabase
public void setDatabase(String database)
database
- path to the database including the server name and the
port, if needed.
setDefaultIsolation
public void setDefaultIsolation(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:
"TRANSACTION_READ_COMMITTED"
for a READ COMMITTED
isolation level.
"TRANSACTION_REPEATABLE_READ"
for a REPEATABLE READ
isolation level.
"TRANSACTION_SERIALIZABLE"
for a SERIALIZABLE
isolation level.
isolation
- string constant representing a default isolation level.
setDefaultResultSetHoldable
public void setDefaultResultSetHoldable(boolean isHoldable)
setDefaultTransactionIsolation
public void setDefaultTransactionIsolation(int defaultIsolationLevel)
Set the default transaction isolation level.
defaultIsolationLevel
- default transaction isolation level.
setEncoding
public void setEncoding(String encoding)
encoding
- Character encoding for the connection. See Firebird
documentation for more information.
setNonStandardProperty
public void setNonStandardProperty(String propertyMapping)
Set the property that does not have corresponding setter method.
propertyMapping
- parameter value in the ?propertyName[=propertyValue]? form,
this allows setting non-standard parameters using
configuration files.
setNonStandardProperty
public void setNonStandardProperty(String key,
String value)
Set the property that does not have corresponding setter method.
key
- name of the property to set.value
- value of the property.
setPassword
public void setPassword(String password)
password
- password corresponding to the specified user name.
setRoleName
public void setRoleName(String roleName)
roleName
- SQL role to use.
setSocketBufferSize
public void setSocketBufferSize(int socketBufferSize)
socketBufferSize
- socket buffer size in bytes.
setSqlDialect
public void setSqlDialect(String sqlDialect)
sqlDialect
- SQL dialect of the client.
setTimestampUsesLocalTimezone
public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
timestampUsesLocalTimezone
- true
if the Jaybird 1.0 handling of the
calendar in corresponding setters. This is also compatible
with MySQL calendar treatment.
setTpbMapping
public void setTpbMapping(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
java.sql.Connection
interface
and a comma-separated list of TPB parameters.
tpbMapping
- path to the properties file.
setTransactionParameters
public 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.
setType
public void setType(String type)
type
- type of the connection, for example, "PURE_JAVA", "LOCAL",
"EMBEDDED", depends on the GDS implementations installed in the system.
setUseStandardUdf
public void setUseStandardUdf(boolean useStandardUdf)
useStandardUdf
- true
if driver should assume that standard UDF
are installed.
setUseStreamBlobs
public void setUseStreamBlobs(boolean useStreamBlobs)
useStreamBlobs
- true
if stream blobs should be created,
otherwise false
.
setUseTranslation
public void setUseTranslation(String translationPath)
translationPath
- path to the character translation table.
setUserName
public void setUserName(String userName)
userName
- name of the user that will be used when connecting to the
database.