public abstract class AbstractConnectionPropertiesDataSource extends RootCommonDataSource implements FirebirdConnectionProperties
FirebirdConnectionProperties
to ensure subclasses can be introspected as beans.Constructor and Description |
---|
AbstractConnectionPropertiesDataSource() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthPlugins()
Get the list of authentication plugins to try.
|
int |
getBlobBufferSize() |
int |
getBuffersNumber()
Deprecated.
|
java.lang.String |
getCharSet()
Java character set configured for the connection.
|
int |
getConnectTimeout()
Get the connect timeout in seconds.
|
java.lang.String |
getDatabase()
Deprecated.
|
java.lang.String |
getDatabaseName()
Gets the database of the connection.
|
java.lang.String |
getDataTypeBind()
Get the
dataTypeBind configuration. |
java.lang.String |
getDbCryptConfig()
Get the database encryption plugin configuration.
|
java.lang.String |
getDecfloatRound() |
java.lang.String |
getDecfloatTraps() |
java.lang.String |
getDefaultIsolation()
Get the default transaction isolation level as string.
|
int |
getDefaultTransactionIsolation()
Get the default transaction isolation level.
|
java.lang.String |
getEncoding()
Firebird character set configured for the connection.
|
java.lang.String |
getGeneratedKeysEnabled()
Get the
generatedKeysEnabled configuration. |
int |
getLoginTimeout() |
int |
getPageCacheSize()
Get the page cache size.
|
int |
getParallelWorkers() |
java.lang.String |
getPassword() |
int |
getPortNumber()
Get the port number of the server.
|
java.lang.Integer |
getProcessId() |
java.lang.String |
getProcessName() |
java.lang.String |
getRoleName() |
java.lang.String |
getScrollableCursor() |
int |
getServerBatchBufferSize() |
java.lang.String |
getServerName()
Get the hostname or IP address of the Firebird server.
|
java.lang.String |
getSessionTimeZone()
Get the
sessionTimeZone . |
int |
getSocketBufferSize()
Get the socket buffer size.
|
int |
getSoTimeout()
Get the initial Socket blocking timeout (SoTimeout).
|
int |
getSqlDialect() |
java.lang.String |
getTpbMapping()
Get the used TPB mapping.
|
java.lang.String |
getType() |
java.lang.String |
getUser() |
java.lang.String |
getUserName()
Deprecated.
|
java.lang.String |
getWireCrypt()
Get the wire encryption level.
|
boolean |
isColumnLabelForName()
Gets the current setting of
columnLabelForName |
boolean |
isDefaultResultSetHoldable()
Get whether ResultSets are holdable by default.
|
boolean |
isExtendedMetadata() |
boolean |
isIgnoreProcedureType()
Get the value for
ignoreProcedureType . |
boolean |
isTimestampUsesLocalTimezone()
Deprecated.
|
boolean |
isUseFirebirdAutocommit()
Get whether to use Firebird autocommit (experimental).
|
boolean |
isUseServerBatch() |
boolean |
isUseStreamBlobs() |
boolean |
isWireCompression()
Get if wire compression should be enabled.
|
void |
setAuthPlugins(java.lang.String authPlugins)
Sets the authentication plugins to try.
|
void |
setBlobBufferSize(int blobBufferSize) |
void |
setBuffersNumber(int buffersNumber)
Deprecated.
|
void |
setCharSet(java.lang.String charSet)
Set the Java character set for the connection.
|
void |
setColumnLabelForName(boolean columnLabelForName)
Set if
ResultSetMetaData.getColumnName(int) returns the columnLabel instead of the
columnName . |
void |
setConnectTimeout(int connectTimeout)
Set the connect timeout in seconds.
|
void |
setDatabase(java.lang.String database)
Deprecated.
|
void |
setDatabaseName(java.lang.String databaseName)
Sets the database of the connection
|
void |
setDataTypeBind(java.lang.String dataTypeBind)
Sets the
dataTypeBind configuration. |
void |
setDbCryptConfig(java.lang.String dbCryptConfig)
Sets the database encryption plugin configuration.
|
void |
setDecfloatRound(java.lang.String decfloatRound)
Sets the
DECFLOAT rounding mode |
void |
setDecfloatTraps(java.lang.String decfloatTraps)
Sets the
DECFLOAT error traps. |
void |
setDefaultIsolation(java.lang.String isolation)
Set the default transaction isolation level as string.
|
void |
setDefaultResultSetHoldable(boolean defaultResultSetHoldable)
Set if
ResultSet should be ResultSet.HOLD_CURSORS_OVER_COMMIT by default. |
void |
setDefaultTransactionIsolation(int defaultIsolationLevel)
Set the default transaction isolation level.
|
void |
setEncoding(java.lang.String encoding)
Set the Firebird character set for the connection.
|
void |
setExtendedMetadata(boolean extendedMetadata)
Sets if certain metadata classes will perform additional queries to enrich the information for certain types.
|
void |
setGeneratedKeysEnabled(java.lang.String generatedKeysEnabled)
Sets the
generatedKeysEnabled configuration. |
void |
setIgnoreProcedureType(boolean ignoreProcedureType)
Sets the value
ignoreProcedureType . |
void |
setLoginTimeout(int seconds) |
void |
setPageCacheSize(int pageCacheSize)
Set the page cache size.
|
void |
setParallelWorkers(int parallelWorkers)
Sets the number of parallel workers of the connection.
|
void |
setPassword(java.lang.String password) |
void |
setPortNumber(int portNumber)
Set the port number of the server.
|
void |
setProcessId(java.lang.Integer processId)
Sets a custom process id to send to Firebird on attach.
|
void |
setProcessName(java.lang.String processName)
Sets a custom process name to send to Firebird on attach
|
void |
setRoleName(java.lang.String roleName) |
void |
setScrollableCursor(java.lang.String scrollableCursor)
Sets the type of scrollable cursor.
|
void |
setServerBatchBufferSize(int serverBatchBufferSize)
Sets the server batch buffer size (if server batch is supported and enabled).
|
void |
setServerName(java.lang.String serverName)
Set the hostname or IP address of the Firebird server.
|
void |
setSessionTimeZone(java.lang.String sessionTimeZone)
Sets the
sessionTimeZone . |
void |
setSocketBufferSize(int socketBufferSize)
Set the socket buffer size.
|
void |
setSoTimeout(int soTimeout)
Set the initial Socket blocking timeout (SoTimeout).
|
void |
setSqlDialect(int sqlDialect) |
void |
setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
Deprecated.
|
void |
setTpbMapping(java.lang.String tpbMapping)
Set path to the properties file with the TPB mapping.
|
void |
setType(java.lang.String type) |
void |
setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
Set whether to use Firebird autocommit (experimental).
|
void |
setUser(java.lang.String user) |
void |
setUserName(java.lang.String userName)
Deprecated.
|
void |
setUseServerBatch(boolean useServerBatch)
Sets whether to use server-side batch support, if available.
|
void |
setUseStreamBlobs(boolean useStreamBlobs) |
void |
setWireCompression(boolean wireCompression)
Sets if the connection should try to enable wire compression.
|
void |
setWireCrypt(java.lang.String wireCrypt)
Set the wire encryption level.
|
getLogWriter, getParentLogger, setLogWriter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNonStandardProperty, getTransactionParameters, setNonStandardProperty, setNonStandardProperty, setTransactionParameters
connectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty
public AbstractConnectionPropertiesDataSource()
public java.lang.String getServerName()
AttachmentProperties
getServerName
in interface AttachmentProperties
AttachmentProperties.setServerName(String)
public void setServerName(java.lang.String serverName)
AttachmentProperties
When set to null
(the default), the databaseName
or serviceName
is used as the full
identification of the database host, port and database path/alias. Protocol implementations, for example
PURE_JAVA
, may default to localhost
when this property is null
, but
databaseName
/serviceName
does not (seem to) contain a host name.
setServerName
in interface AttachmentProperties
serverName
- Hostname or IP address of the serverpublic int getPortNumber()
AttachmentProperties
getPortNumber
in interface AttachmentProperties
AttachmentProperties.setPortNumber(int)
public void setPortNumber(int portNumber)
AttachmentProperties
Defaults to 3050
. This property value will be ignored if serverName
is null
, unless the
protocol implementation needs a hostname, but cannot find a hostname in databaseName
/serviceName
.
setPortNumber
in interface AttachmentProperties
portNumber
- Port number of the serverAttachmentProperties.setServerName(String)
public java.lang.String getDatabaseName()
DatabaseConnectionProperties
getDatabaseName
in interface DatabaseConnectionProperties
DatabaseConnectionProperties.setDatabaseName(String)
public void setDatabaseName(java.lang.String databaseName)
DatabaseConnectionProperties
When serverName
is null
, the value is taken as the URL of the database, and exact
interpretation depends on the protocol implementation (type
). Basically, the URL would be the JDBC URL,
but without the jdbc:firebird[sql]:[subprotocol:]
prefix and without connection properties. Examples:
serverName
, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)C
, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)C
, depending on the Firebird version and platform, NATIVE may use Firebird Embedded)xnet
)fbclient
connection URLs — NATIVE (EMBEDDED will behave as NATIVE, protocols
like PURE_JAVA may interpret the protocol name as a host nametype
implementations may support other URL formats
Some protocols, for example PURE_JAVA, when serverName
is not set, but databaseName
doesn't seem
to contain a host name, may default to attempting to connect to localhost with databaseName
as the
database path or alias.
When serverName
is set, the value is taken as the database path or alias. Examples:
setDatabaseName
in interface DatabaseConnectionProperties
databaseName
- database name@Deprecated public java.lang.String getDatabase()
getDatabase
in interface FirebirdConnectionProperties
@Deprecated public void setDatabase(java.lang.String database)
setDatabase
in interface FirebirdConnectionProperties
database
- path to the database including the server name and the port, if needed.public java.lang.String getType()
getType
in interface AttachmentProperties
public void setType(java.lang.String type)
setType
in interface AttachmentProperties
type
- type of the connection, for example, "PURE_JAVA", "NATIVE", "EMBEDDED", depends on the GDS
implementations installed in the system.public java.lang.String getUser()
getUser
in interface AttachmentProperties
public void setUser(java.lang.String user)
setUser
in interface AttachmentProperties
user
- Name of the user to authenticate to the server.public java.lang.String getPassword()
getPassword
in interface AttachmentProperties
public void setPassword(java.lang.String password)
setPassword
in interface AttachmentProperties
password
- Password to authenticate to the server.public java.lang.String getRoleName()
getRoleName
in interface AttachmentProperties
public void setRoleName(java.lang.String roleName)
setRoleName
in interface AttachmentProperties
roleName
- SQL role to use.public java.lang.String getCharSet()
AttachmentProperties
After connect, the actual Java character set applied can be obtained from
FbAttachment.getEncoding()
(property charsetName
), or FbAttachment.getEncodingFactory()
(properties defaultEncoding.charsetName
or {code defaultEncodingDefinition.javaCharset}).
getCharSet
in interface AttachmentProperties
null
when not explicitly configured).public void setCharSet(java.lang.String charSet)
AttachmentProperties
It is possible to set both the charSet
and encoding
to achieve a character set conversion effect,
but in general only one of both properties should be set.
setCharSet
in interface AttachmentProperties
charSet
- Character set for the connection. Similar to encoding
property, but accepts Java names instead
of Firebird ones.AttachmentProperties.setEncoding(String)
public java.lang.String getEncoding()
AttachmentProperties
After connect, the actual Firebird character set applied can be obtained from
FbAttachment.getEncodingFactory()
, property defaultEncodingDefinition.firebirdEncodingName
.
getEncoding
in interface AttachmentProperties
null
when not explicitly configured).public void setEncoding(java.lang.String encoding)
AttachmentProperties
It is possible to set both the charSet
and encoding
to achieve a character set conversion effect,
but in general only one of both properties should be set.
setEncoding
in interface AttachmentProperties
encoding
- Firebird character encoding for the connection. See Firebird documentation for more information.AttachmentProperties.setCharSet(String)
public java.lang.Integer getProcessId()
getProcessId
in interface AttachmentProperties
null
means the default is applied (read from
system property org.firebirdsql.jdbc.pid
, future versions may also determine the actual process id)public void setProcessId(java.lang.Integer processId)
AttachmentProperties
setProcessId
in interface AttachmentProperties
processId
- The process id to send; null
to apply the default behaviour (see AttachmentProperties.getProcessId()
)public java.lang.String getProcessName()
getProcessName
in interface AttachmentProperties
null
means the default is applied (read from
system property org.firebirdsql.jdbc.processName
)public void setProcessName(java.lang.String processName)
AttachmentProperties
setProcessName
in interface AttachmentProperties
processName
- The process name to send; null
to apply the default behaviour (see AttachmentProperties.getProcessName()
)public int getSocketBufferSize()
AttachmentProperties
getSocketBufferSize
in interface AttachmentProperties
-1
if not setpublic void setSocketBufferSize(int socketBufferSize)
AttachmentProperties
setSocketBufferSize
in interface AttachmentProperties
socketBufferSize
- socket buffer size in bytes.public int getSoTimeout()
AttachmentProperties
getSoTimeout
in interface AttachmentProperties
-1
if not setpublic void setSoTimeout(int soTimeout)
AttachmentProperties
setSoTimeout
in interface AttachmentProperties
soTimeout
- Timeout in milliseconds (0 is 'infinite')public int getConnectTimeout()
AttachmentProperties
getConnectTimeout
in interface AttachmentProperties
-1
if not setpublic void setConnectTimeout(int connectTimeout)
AttachmentProperties
setConnectTimeout
in interface AttachmentProperties
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)public int getLoginTimeout() throws java.sql.SQLException
This property is an alias for the connectTimeout property.
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
This property is an alias for the connectTimeout property.
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public java.lang.String getWireCrypt()
AttachmentProperties
getWireCrypt
in interface AttachmentProperties
public void setWireCrypt(java.lang.String wireCrypt)
AttachmentProperties
Values are defined by WireCrypt
, values are handled case insensitive. Invalid values will throw an
exception.
setWireCrypt
in interface AttachmentProperties
wireCrypt
- Wire encryption level (null
not allowed)public java.lang.String getDbCryptConfig()
AttachmentProperties
getDbCryptConfig
in interface AttachmentProperties
public void setDbCryptConfig(java.lang.String dbCryptConfig)
AttachmentProperties
setDbCryptConfig
in interface AttachmentProperties
dbCryptConfig
- Database encryption plugin configuration, meaning plugin specificpublic java.lang.String getAuthPlugins()
AttachmentProperties
getAuthPlugins
in interface AttachmentProperties
public void setAuthPlugins(java.lang.String authPlugins)
AttachmentProperties
Invalid names are skipped during authentication.
setAuthPlugins
in interface AttachmentProperties
authPlugins
- comma-separated list of authentication pluginspublic boolean isWireCompression()
AttachmentProperties
Wire compression requires Firebird 3 or higher, and the server must have the zlib library. If compression cannot be negotiated, the connection will be made without wire compression.
This property will be ignored for native connections. For native connections, the configuration in
firebird.conf
read by the client library will be used.
isWireCompression
in interface AttachmentProperties
true
wire compression enabledpublic void setWireCompression(boolean wireCompression)
AttachmentProperties
setWireCompression
in interface AttachmentProperties
wireCompression
- true
enable wire compression, false
disable wire compression (the default)AttachmentProperties.isWireCompression()
public int getSqlDialect()
getSqlDialect
in interface DatabaseConnectionProperties
public void setSqlDialect(int sqlDialect)
setSqlDialect
in interface DatabaseConnectionProperties
sqlDialect
- SQL dialect of the client connection.public int getPageCacheSize()
DatabaseConnectionProperties
A value of 0
indicates that the value is not set, and that the server default is used.
This option is only relevant for Firebird implementations with per connection cache (eg Classic)
NOTE: Implementer should take care to return 0
if the value hasn't been set yet.
getPageCacheSize
in interface DatabaseConnectionProperties
public void setPageCacheSize(int pageCacheSize)
DatabaseConnectionProperties
A value of 0
indicates that the value is not set, and that the server default is used.
This option is only relevant for Firebird implementations with per connection cache (eg Classic).
setPageCacheSize
in interface DatabaseConnectionProperties
pageCacheSize
- size of cache in pages for this connection, can be specified for Classic and SuperClassic instances
ignored for SuperServer as the cache is shared.public java.lang.String getDataTypeBind()
DatabaseConnectionProperties
dataTypeBind
configuration.getDataTypeBind
in interface DatabaseConnectionProperties
dataTypeBind
, or null
for driver defaultpublic void setDataTypeBind(java.lang.String dataTypeBind)
DatabaseConnectionProperties
dataTypeBind
configuration.
If the value is explicitly set to a non-null value and the connected server is Firebird 4 or higher, this will
configure the data type binding with the specified values using isc_dpb_set_bind
, which is equivalent to
executing SET BIND
statements with the values.
See also Firebird documentation for SET BIND
.
setDataTypeBind
in interface DatabaseConnectionProperties
dataTypeBind
- Firebird 4+ data type bind configuration, a semicolon-separated list of <from-type> TO <to-type>
public java.lang.String getSessionTimeZone()
DatabaseConnectionProperties
sessionTimeZone
.getSessionTimeZone
in interface DatabaseConnectionProperties
sessionTimeZone
, or null
for driver default (JVM default time zone)public void setSessionTimeZone(java.lang.String sessionTimeZone)
DatabaseConnectionProperties
sessionTimeZone
.setSessionTimeZone
in interface DatabaseConnectionProperties
sessionTimeZone
- Firebird 4+ session time zone name (we strongly suggest to use Java compatible names only),
use "server"
to use server default time zone (note: conversion will use JVM default time zone)public int getBlobBufferSize()
getBlobBufferSize
in interface DatabaseConnectionProperties
public void setBlobBufferSize(int blobBufferSize)
setBlobBufferSize
in interface DatabaseConnectionProperties
blobBufferSize
- size of the BLOB buffer in bytes.public boolean isUseStreamBlobs()
isUseStreamBlobs
in interface DatabaseConnectionProperties
true
if stream blobs should be created, otherwise false
.public void setUseStreamBlobs(boolean useStreamBlobs)
setUseStreamBlobs
in interface DatabaseConnectionProperties
useStreamBlobs
- true
if stream blobs should be created, otherwise false
.public boolean isDefaultResultSetHoldable()
DatabaseConnectionProperties
isDefaultResultSetHoldable
in interface DatabaseConnectionProperties
true
ResultSets by default are ResultSet.HOLD_CURSORS_OVER_COMMIT
,
false
(default), ResultSets are ResultSet.CLOSE_CURSORS_AT_COMMIT
public void setDefaultResultSetHoldable(boolean defaultResultSetHoldable)
DatabaseConnectionProperties
ResultSet
should be ResultSet.HOLD_CURSORS_OVER_COMMIT
by default.setDefaultResultSetHoldable
in interface DatabaseConnectionProperties
defaultResultSetHoldable
- true
ResultSets are holdable, false
(default) ResultSets are ResultSet.CLOSE_CURSORS_AT_COMMIT
public boolean isUseFirebirdAutocommit()
DatabaseConnectionProperties
isUseFirebirdAutocommit
in interface DatabaseConnectionProperties
true
use Firebird autocommitpublic void setUseFirebirdAutocommit(boolean useFirebirdAutocommit)
DatabaseConnectionProperties
setUseFirebirdAutocommit
in interface DatabaseConnectionProperties
useFirebirdAutocommit
- true
Use Firebird autocommitpublic boolean isColumnLabelForName()
DatabaseConnectionProperties
columnLabelForName
isColumnLabelForName
in interface DatabaseConnectionProperties
false
JDBC compliant behavior (columnName
is returned), true
compatibility
option (columnLabel
is returned)DatabaseConnectionProperties.setColumnLabelForName(boolean)
public void setColumnLabelForName(boolean columnLabelForName)
DatabaseConnectionProperties
ResultSetMetaData.getColumnName(int)
returns the columnLabel
instead of the
columnName
.
The default behaviour (with columnLabelForName=false
is JDBC-compliant. The behavior for value
true
is to provide compatibility with tools with a wrong expectation.
setColumnLabelForName
in interface DatabaseConnectionProperties
columnLabelForName
- false
JDBC compliant behavior (columnName
is returned), true
compatibility
option (columnLabel
is returned)public java.lang.String getGeneratedKeysEnabled()
DatabaseConnectionProperties
generatedKeysEnabled
configuration.getGeneratedKeysEnabled
in interface DatabaseConnectionProperties
generatedKeysEnabled
, or null
for driver defaultpublic void setGeneratedKeysEnabled(java.lang.String generatedKeysEnabled)
DatabaseConnectionProperties
generatedKeysEnabled
configuration.setGeneratedKeysEnabled
in interface DatabaseConnectionProperties
generatedKeysEnabled
- Generated keys support configuration: default
(or null/empty), disabled
, ignored
,
or a list of statement types to enable (possible values: insert
, update
, delete
,
update_or_insert
, merge
)public boolean isIgnoreProcedureType()
DatabaseConnectionProperties
ignoreProcedureType
.isIgnoreProcedureType
in interface DatabaseConnectionProperties
ignoreProcedureType
public void setIgnoreProcedureType(boolean ignoreProcedureType)
DatabaseConnectionProperties
ignoreProcedureType
.
When set to true, the CallableStatement
implementation in Jaybird will ignore metadata
information about the stored procedure type and default to using EXECUTE PROCEDURE
, unless the type is
explicitly set using FirebirdCallableStatement.setSelectableProcedure(boolean)
. This can be useful in
situations where a stored procedure is selectable, but tooling or code expects an executable stored procedure.
setIgnoreProcedureType
in interface DatabaseConnectionProperties
ignoreProcedureType
- true
Ignore procedure typepublic java.lang.String getDecfloatRound()
getDecfloatRound
in interface DatabaseConnectionProperties
DECFLOAT
rounding mode, null
applies the Firebird server defaultpublic void setDecfloatRound(java.lang.String decfloatRound)
DatabaseConnectionProperties
DECFLOAT
rounding modesetDecfloatRound
in interface DatabaseConnectionProperties
decfloatRound
- Firebird 4+ server-side DECFLOAT
rounding mode (ceiling, up, half_up, half_even,
half_down, down, floor, reround
); null
to apply the Firebird server default (half_up
in
Firebird 4)public java.lang.String getDecfloatTraps()
getDecfloatTraps
in interface DatabaseConnectionProperties
DECFLOAT
error traps, null
applies the Firebird server defaultpublic void setDecfloatTraps(java.lang.String decfloatTraps)
DatabaseConnectionProperties
DECFLOAT
error traps.setDecfloatTraps
in interface DatabaseConnectionProperties
decfloatTraps
- Firebird 4+ server-side DECFLOAT
error traps; comma-separated list with options
Division_by_zero, Inexact, Invalid_operation, Overflow, Underflow
; null
to apply
Firebird server default (Division_by_zero,Invalid_operation,Overflow
in Firebird 4)public java.lang.String getTpbMapping()
DatabaseConnectionProperties
getTpbMapping
in interface DatabaseConnectionProperties
DatabaseConnectionProperties.setTpbMapping(String)
public void setTpbMapping(java.lang.String tpbMapping)
DatabaseConnectionProperties
"res:"
should be used to specify resource in the
classpath.
For 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).setTpbMapping
in interface DatabaseConnectionProperties
tpbMapping
- path to the properties filepublic int getDefaultTransactionIsolation()
DatabaseConnectionProperties
getDefaultTransactionIsolation
in interface DatabaseConnectionProperties
public void setDefaultTransactionIsolation(int defaultIsolationLevel)
DatabaseConnectionProperties
setDefaultTransactionIsolation
in interface DatabaseConnectionProperties
defaultIsolationLevel
- default transaction isolation level.public java.lang.String getDefaultIsolation()
DatabaseConnectionProperties
DatabaseConnectionProperties.getDefaultTransactionIsolation()
, however it returns a string name instead of a numeric constant.getDefaultIsolation
in interface DatabaseConnectionProperties
DatabaseConnectionProperties.setDefaultIsolation(String)
public void setDefaultIsolation(java.lang.String isolation)
DatabaseConnectionProperties
DatabaseConnectionProperties.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.
setDefaultIsolation
in interface DatabaseConnectionProperties
isolation
- string constant representing a default isolation level.public java.lang.String getScrollableCursor()
getScrollableCursor
in interface DatabaseConnectionProperties
EMULATED
(default) or SERVER
(case-insensitive)DatabaseConnectionProperties.setScrollableCursor(String)
public void setScrollableCursor(java.lang.String scrollableCursor)
DatabaseConnectionProperties
Possible values are (case-insensitive):
EMULATED
(default) - emulate scrollable cursors in memory by fetching all rowsSERVER
- user server-side scrollable cursor (requires Firebird 5.0 and pure-java connection).
Falls back to EMULATED
behaviour when server-side support is not available, or when holdable cursors are
requestedsetScrollableCursor
in interface DatabaseConnectionProperties
scrollableCursor
- Scrollable cursor type, one of EMULATED
or SERVER
(case-insensitive)public boolean isUseServerBatch()
isUseServerBatch
in interface DatabaseConnectionProperties
true
(default) use server-side batch if supported by server, false
always use emulated batchDatabaseConnectionProperties.setUseServerBatch(boolean)
public void setUseServerBatch(boolean useServerBatch)
DatabaseConnectionProperties
Currently, server-side batch is only supported with Firebird 4.0 or higher, with a pure Java connection, using
a PreparedStatement
, but not a CallableStatement
, and only when not requesting
generated keys.
The implementation will fall back to emulated batches if either the server version doesn't support batches, or if the statement cannot be executed using the server-side batch mechanism for other reasons (e.g. requesting generated keys).
setUseServerBatch
in interface DatabaseConnectionProperties
useServerBatch
- true
, use server-side batch support if possible, false
always use emulated
batchpublic int getServerBatchBufferSize()
getServerBatchBufferSize
in interface DatabaseConnectionProperties
< 0
to use server-side default (16MB as of Firebird 4.0),
0
(default) to use server-side maximum (256MB as of Firebird 4.0), values exceeding server-side maximum
will set server-side maximumDatabaseConnectionProperties.setServerBatchBufferSize(int)
public void setServerBatchBufferSize(int serverBatchBufferSize)
DatabaseConnectionProperties
setServerBatchBufferSize
in interface DatabaseConnectionProperties
serverBatchBufferSize
- server batch buffer size in bytes, use < 0
to set server-side default (16MB as of Firebird 4.0),
use 0
to use server-side maximum (256MB as of Firebird 4.0), values exceeding server-side maximum
will set server-side maximumpublic int getParallelWorkers()
getParallelWorkers
in interface AttachmentProperties
-1
means no value was set (or it was explicitly set to -1
)public void setParallelWorkers(int parallelWorkers)
AttachmentProperties
Requires Firebird 5.0 or higher, and a Firebird server configured with MaxParallelWorkers
higher than
specified by parallelWorkers
.
NOTE: For service attachments, this property controls behaviour only for specific operations, and requires Jaybird to explicitly set the parallel workers for that operation.
setParallelWorkers
in interface AttachmentProperties
parallelWorkers
- number of parallel workerspublic boolean isExtendedMetadata()
isExtendedMetadata
in interface DatabaseConnectionProperties
true
(default) if metadata (e.g. ResultSetMetaData
) will perform additional queries for
more detailed information, false
if only the available bind information will be usedDatabaseConnectionProperties.setExtendedMetadata(boolean)
public void setExtendedMetadata(boolean extendedMetadata)
DatabaseConnectionProperties
Currently this is used only by ResultSetMetaData
for its getPrecision
and isAutoIncrement
methods. If disabled, these methods will return an estimated precision, or false
for auto-increment
instead of actual precision and identity column state information.
Disabling this setting may improve performance of querying metadata information, in exchange for less precise information.
setExtendedMetadata
in interface DatabaseConnectionProperties
extendedMetadata
- true
(default) - metadata (e.g. ResultSetMetaData
) will perform additional queries for
more detailed information, false
- only the available bind information will be used@Deprecated public boolean isTimestampUsesLocalTimezone()
isTimestampUsesLocalTimezone
in interface DatabaseConnectionProperties
true
if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also
compatible with MySQL calendar treatment.@Deprecated public void setTimestampUsesLocalTimezone(boolean timestampUsesLocalTimezone)
DatabaseConnectionProperties
timestampUsesLocalTimezone
.setTimestampUsesLocalTimezone
in interface DatabaseConnectionProperties
timestampUsesLocalTimezone
- true
if the Jaybird 1.0 handling of the calendar in corresponding setters. This is also
compatible with MySQL calendar treatment.@Deprecated public java.lang.String getUserName()
getUserName
in interface FirebirdConnectionProperties
@Deprecated public void setUserName(java.lang.String userName)
setUserName
in interface FirebirdConnectionProperties
userName
- name of the user that will be used when connecting to the database.@Deprecated public int getBuffersNumber()
getBuffersNumber
in interface FirebirdConnectionProperties
@Deprecated public void setBuffersNumber(int buffersNumber)
setBuffersNumber
in interface FirebirdConnectionProperties
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.Copyright © 2001-2024 Jaybird (Firebird JDBC) team. All rights reserved.