Class FbImmutableConnectionProperties
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractImmutableAttachProperties<IConnectionProperties>
- 
- org.firebirdsql.gds.ng.FbImmutableConnectionProperties
 
 
- 
- All Implemented Interfaces:
- IAttachProperties<IConnectionProperties>,- IConnectionProperties
 
 public final class FbImmutableConnectionProperties extends AbstractImmutableAttachProperties<IConnectionProperties> implements IConnectionProperties Immutable implementation ofIConnectionProperties.- Since:
- 3.0
- Author:
- , Mark Rotteveel
- See Also:
- FbConnectionProperties
 
- 
- 
Field Summary- 
Fields inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesDEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT, DEFAULT_SERVER_NAME, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE
 - 
Fields inherited from interface org.firebirdsql.gds.ng.IConnectionPropertiesDEFAULT_BUFFERS_NUMBER, DEFAULT_DIALECT, SESSION_TIME_ZONE_SERVER
 
- 
 - 
Constructor SummaryConstructors Constructor Description FbImmutableConnectionProperties(IConnectionProperties src)Copy constructor for FbConnectionProperties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IConnectionPropertiesasImmutable()IConnectionPropertiesasNewMutable()java.lang.StringgetAttachObjectName()shortgetConnectionDialect()Get the dialect of the client connectionjava.lang.StringgetDatabaseName()DatabaseParameterBuffergetExtraDatabaseParameters()Gets the extra database parameters.intgetPageCacheSize()Get the page cache size.java.lang.StringgetSessionTimeZone()Get thesessionTimeZone.booleanisColumnLabelForName()Gets the current setting ofcolumnLabelForNamebooleanisResultSetDefaultHoldable()Get whether ResultSets are holdable by default.voidsetColumnLabelForName(boolean columnLabelForName)Set ifResultSetMetaData.getColumnName(int)returns thecolumnLabelinstead of thecolumnName.voidsetConnectionDialect(short connectionDialect)Set the dialect of the client connectionvoidsetDatabaseName(java.lang.String databaseName)voidsetPageCacheSize(int pageCacheSize)Set the page cache size.voidsetResultSetDefaultHoldable(boolean holdable)Set ifResultSetshould beResultSet.HOLD_CURSORS_OVER_COMMITby default.voidsetSessionTimeZone(java.lang.String sessionTimeZone)Sets thesessionTimeZone.- 
Methods inherited from class org.firebirdsql.gds.ng.AbstractImmutableAttachPropertiesgetAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getPassword, getPortNumber, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getUser, getWireCrypt, immutable, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setPassword, setPortNumber, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setUser, setWireCompression, setWireCrypt
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesgetAuthPlugins, 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, setWireCrypt
 
- 
 
- 
- 
- 
Constructor Detail- 
FbImmutableConnectionPropertiespublic FbImmutableConnectionProperties(IConnectionProperties src) Copy constructor for FbConnectionProperties.All properties defined in IConnectionPropertiesare copied fromsrcto the new instance.- Parameters:
- src- Source to copy from
 
 
- 
 - 
Method Detail- 
getDatabaseNamepublic java.lang.String getDatabaseName() - Specified by:
- getDatabaseNamein interface- IConnectionProperties
- Returns:
- Name or alias of the database
 
 - 
setDatabaseNamepublic void setDatabaseName(java.lang.String databaseName) - Specified by:
- setDatabaseNamein interface- IConnectionProperties
- Parameters:
- databaseName- Name or alias of the database
 
 - 
getAttachObjectNamepublic java.lang.String getAttachObjectName() - Specified by:
- getAttachObjectNamein interface- IAttachProperties<IConnectionProperties>
- Returns:
- The name of the object to attach to (either a database or service name).
 
 - 
getConnectionDialectpublic short getConnectionDialect() Description copied from interface:IConnectionPropertiesGet the dialect of the client connectionNOTE: Implementer should take care to return IConnectionProperties.DEFAULT_DIALECTif the value hasn't been set yet.- Specified by:
- getConnectionDialectin interface- IConnectionProperties
- Returns:
- SQL dialect of the client.
 
 - 
setConnectionDialectpublic void setConnectionDialect(short connectionDialect) Description copied from interface:IConnectionPropertiesSet the dialect of the client connectionNOTE: Implementer should take care to use IConnectionProperties.DEFAULT_DIALECTif the value hasn't been set yet.- Specified by:
- setConnectionDialectin interface- IConnectionProperties
- Parameters:
- connectionDialect- SQL dialect of the client.
 
 - 
getPageCacheSizepublic int getPageCacheSize() Description copied from interface:IConnectionPropertiesGet the page cache size.A value of 0indicates 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_NUMBERif the value hasn't been set yet.- Specified by:
- getPageCacheSizein interface- IConnectionProperties
- 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.
 
 - 
setPageCacheSizepublic void setPageCacheSize(int pageCacheSize) Description copied from interface:IConnectionPropertiesSet the page cache size.A value of 0indicates 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_NUMBERif the value hasn't been set yet.- Specified by:
- setPageCacheSizein interface- IConnectionProperties
- Parameters:
- pageCacheSize- number of cache buffers that should be allocated for this connection, should be specified for ClassicServer instances, SuperServer has a server-wide configuration parameter.
 
 - 
setResultSetDefaultHoldablepublic void setResultSetDefaultHoldable(boolean holdable) Description copied from interface:IConnectionPropertiesSet ifResultSetshould beResultSet.HOLD_CURSORS_OVER_COMMITby default.- Specified by:
- setResultSetDefaultHoldablein interface- IConnectionProperties
- Parameters:
- holdable-- trueResultSets are holdable,- false(default) ResultSets are- ResultSet.CLOSE_CURSORS_AT_COMMIT
 
 - 
isResultSetDefaultHoldablepublic boolean isResultSetDefaultHoldable() Description copied from interface:IConnectionPropertiesGet whether ResultSets are holdable by default.- Specified by:
- isResultSetDefaultHoldablein interface- IConnectionProperties
- Returns:
- trueResultSets by default are- ResultSet.HOLD_CURSORS_OVER_COMMIT,- false(default), ResultSets are- ResultSet.CLOSE_CURSORS_AT_COMMIT
 
 - 
setColumnLabelForNamepublic void setColumnLabelForName(boolean columnLabelForName) Description copied from interface:IConnectionPropertiesSet ifResultSetMetaData.getColumnName(int)returns thecolumnLabelinstead of thecolumnName.The default behaviour (with columnLabelForName=falseis JDBC-compliant. The behavior for valuetrueis to provide compatibility with tools with a wrong expectation.- Specified by:
- setColumnLabelForNamein interface- IConnectionProperties
- Parameters:
- columnLabelForName-- falseJDBC compliant behavior (- columnNameis returned),- truecompatibility option (- columnLabelis returned)
 
 - 
isColumnLabelForNamepublic boolean isColumnLabelForName() Description copied from interface:IConnectionPropertiesGets the current setting ofcolumnLabelForName- Specified by:
- isColumnLabelForNamein interface- IConnectionProperties
- Returns:
- falseJDBC compliant behavior (- columnNameis returned),- truecompatibility option (- columnLabelis returned)
- See Also:
- IConnectionProperties.setColumnLabelForName(boolean)
 
 - 
setSessionTimeZonepublic void setSessionTimeZone(java.lang.String sessionTimeZone) Description copied from interface:IConnectionPropertiesSets thesessionTimeZone.- Specified by:
- setSessionTimeZonein interface- IConnectionProperties
- Parameters:
- 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)
 
 - 
getSessionTimeZonepublic java.lang.String getSessionTimeZone() Description copied from interface:IConnectionPropertiesGet thesessionTimeZone.- Specified by:
- getSessionTimeZonein interface- IConnectionProperties
- Returns:
- value for sessionTimeZone
 
 - 
getExtraDatabaseParameterspublic DatabaseParameterBuffer getExtraDatabaseParameters() Description copied from interface:IConnectionPropertiesGets the extra database parameters. This can be used to pass extra database parameters that are not directly supported.An immutable instance of IConnectionPropertiesmust return a copy.- Specified by:
- getExtraDatabaseParametersin interface- IConnectionProperties
- Returns:
- DatabaseParameterBuffer instance.
 
 - 
asImmutablepublic IConnectionProperties asImmutable() - Specified by:
- asImmutablein interface- IAttachProperties<IConnectionProperties>
- Specified by:
- asImmutablein interface- IConnectionProperties
- Returns:
- An immutable version of this instance as an implementation of IConnectionProperties
 
 - 
asNewMutablepublic IConnectionProperties asNewMutable() - Specified by:
- asNewMutablein interface- IAttachProperties<IConnectionProperties>
- Specified by:
- asNewMutablein interface- IConnectionProperties
- Returns:
- A new, mutable, instance as an implementation of IConnectionPropertieswith all properties copied.
 
 
- 
 
-