public final class FbConnectionProperties extends AbstractAttachProperties<IConnectionProperties> implements IConnectionProperties
IConnectionPropertiesFbImmutableConnectionPropertiesDEFAULT_BUFFERS_NUMBER, DEFAULT_DIALECT, SESSION_TIME_ZONE_SERVERDEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT, DEFAULT_SERVER_NAME, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE| Constructor and Description |
|---|
FbConnectionProperties()
Default constructor for FbConnectionProperties
|
FbConnectionProperties(IConnectionProperties src)
Copy constructor for FbConnectionProperties.
|
| Modifier and Type | Method and Description |
|---|---|
IConnectionProperties |
asImmutable() |
IConnectionProperties |
asNewMutable() |
protected void |
dirtied()
Called by setters if they have been called.
|
void |
fromDpb(DatabaseParameterBuffer dpb)
Deprecated.
TODO: This method is only intended to simplify migration of the protocol implementation and needs to be removed.
|
java.lang.String |
getAttachObjectName() |
short |
getConnectionDialect()
Get the dialect of the client connection
|
java.lang.String |
getDatabaseName() |
DatabaseParameterBuffer |
getExtraDatabaseParameters()
Gets the extra database parameters.
|
int |
getPageCacheSize()
Get the page cache size.
|
java.lang.String |
getSessionTimeZone()
Get the
sessionTimeZone. |
boolean |
isColumnLabelForName()
Gets the current setting of
columnLabelForName |
boolean |
isResultSetDefaultHoldable()
Get whether ResultSets are holdable by default.
|
void |
setColumnLabelForName(boolean columnLabelForName)
Set if
ResultSetMetaData.getColumnName(int) returns the columnLabel instead of the
columnName. |
void |
setConnectionDialect(short connectionDialect)
Set the dialect of the client connection
|
void |
setDatabaseName(java.lang.String databaseName) |
void |
setPageCacheSize(int pageCacheSize)
Set the page cache size.
|
void |
setResultSetDefaultHoldable(boolean holdable)
Set if
ResultSet should be ResultSet.HOLD_CURSORS_OVER_COMMIT by default. |
void |
setSessionTimeZone(java.lang.String sessionTimeZone)
Sets the
sessionTimeZone. |
getAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getPassword, getPortNumber, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setPassword, setPortNumber, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setUser, setWireCompression, setWireCryptclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getPassword, getPortNumber, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setPassword, setPortNumber, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setUser, setWireCompression, setWireCryptpublic FbConnectionProperties(IConnectionProperties src)
All properties defined in IConnectionProperties are
copied from src to the new instance.
src - Source to copy frompublic FbConnectionProperties()
public java.lang.String getDatabaseName()
getDatabaseName in interface IConnectionPropertiespublic void setDatabaseName(java.lang.String databaseName)
setDatabaseName in interface IConnectionPropertiesdatabaseName - Name or alias of the databasepublic java.lang.String getAttachObjectName()
getAttachObjectName in interface IAttachProperties<IConnectionProperties>public short getConnectionDialect()
IConnectionProperties
NOTE: Implementer should take care to return IConnectionProperties.DEFAULT_DIALECT if
the value hasn't been set yet.
getConnectionDialect in interface IConnectionPropertiespublic void setConnectionDialect(short connectionDialect)
IConnectionProperties
NOTE: Implementer should take care to use IConnectionProperties.DEFAULT_DIALECT if the
value hasn't been set yet.
setConnectionDialect in interface IConnectionPropertiesconnectionDialect - SQL dialect of the client.public int getPageCacheSize()
IConnectionProperties
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 IConnectionProperties.DEFAULT_BUFFERS_NUMBER if
the value hasn't been set yet.
getPageCacheSize in interface IConnectionPropertiespublic void setPageCacheSize(int pageCacheSize)
IConnectionProperties
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 use IConnectionProperties.DEFAULT_BUFFERS_NUMBER if
the value hasn't been set yet.
setPageCacheSize in interface IConnectionPropertiespageCacheSize - number of cache buffers that should be allocated for this
connection, should be specified for ClassicServer instances,
SuperServer has a server-wide configuration parameter.public void setResultSetDefaultHoldable(boolean holdable)
IConnectionPropertiesResultSet should be ResultSet.HOLD_CURSORS_OVER_COMMIT by default.setResultSetDefaultHoldable in interface IConnectionPropertiesholdable - true ResultSets are holdable, false (default) ResultSets are ResultSet.CLOSE_CURSORS_AT_COMMITpublic boolean isResultSetDefaultHoldable()
IConnectionPropertiesisResultSetDefaultHoldable in interface IConnectionPropertiestrue ResultSets by default are ResultSet.HOLD_CURSORS_OVER_COMMIT,
false (default), ResultSets
are ResultSet.CLOSE_CURSORS_AT_COMMITpublic void setColumnLabelForName(boolean columnLabelForName)
IConnectionPropertiesResultSetMetaData.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 IConnectionPropertiescolumnLabelForName - false JDBC compliant behavior (columnName is returned), true
compatibility option (columnLabel is returned)public boolean isColumnLabelForName()
IConnectionPropertiescolumnLabelForNameisColumnLabelForName in interface IConnectionPropertiesfalse JDBC compliant behavior (columnName is returned), true
compatibility option (columnLabel is returned)IConnectionProperties.setColumnLabelForName(boolean)public void setSessionTimeZone(java.lang.String sessionTimeZone)
IConnectionPropertiessessionTimeZone.setSessionTimeZone in interface IConnectionPropertiessessionTimeZone - 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 java.lang.String getSessionTimeZone()
IConnectionPropertiessessionTimeZone.getSessionTimeZone in interface IConnectionPropertiessessionTimeZonepublic DatabaseParameterBuffer getExtraDatabaseParameters()
IConnectionProperties
An immutable instance of IConnectionProperties must return a copy.
getExtraDatabaseParameters in interface IConnectionPropertiespublic IConnectionProperties asImmutable()
asImmutable in interface IAttachProperties<IConnectionProperties>asImmutable in interface IConnectionPropertiesIConnectionPropertiespublic IConnectionProperties asNewMutable()
asNewMutable in interface IAttachProperties<IConnectionProperties>asNewMutable in interface IConnectionPropertiesIConnectionProperties with all properties
copied.@Deprecated public void fromDpb(DatabaseParameterBuffer dpb) throws java.sql.SQLException
Unsupported or unknown properties are ignored.
dpb - Database parameter bufferjava.sql.SQLExceptionprotected void dirtied()
AbstractAttachPropertiesdirtied in class AbstractAttachProperties<IConnectionProperties>Copyright © 2001-2023 Jaybird (Firebird JDBC/JCA) team. All rights reserved.