Class FBAbstractCommonDataSource
- java.lang.Object
- 
- org.firebirdsql.ds.RootCommonDataSource
- 
- org.firebirdsql.ds.AbstractConnectionPropertiesDataSource
- 
- org.firebirdsql.ds.FBAbstractCommonDataSource
 
 
 
- 
- All Implemented Interfaces:
- javax.sql.CommonDataSource,- AttachmentProperties,- BaseProperties,- DatabaseConnectionProperties,- FirebirdConnectionProperties
 - Direct Known Subclasses:
- FBConnectionPoolDataSource,- FBXADataSource
 
 public abstract class FBAbstractCommonDataSource extends AbstractConnectionPropertiesDataSource Abstract class for properties and behaviour common to DataSources, XADataSources and ConnectionPoolDataSources- Since:
- 2.2
- Author:
- Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.lang.StringREF_DESCRIPTIONprotected static java.lang.StringREF_PROPERTIES
 - 
Constructor SummaryConstructors Constructor Description FBAbstractCommonDataSource()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckNotStarted()Method to check if this DataSource has not yet started.java.util.Map<ConnectionProperty,java.lang.Object>connectionPropertyValues()An unmodifiable view on the connection properties held by this BaseProperties implementation.java.lang.BooleangetBooleanProperty(java.lang.String name)Retrieves abooleanproperty value by name.protected FBConnectionPropertiesgetConnectionProperties()java.lang.StringgetDescription()java.lang.IntegergetIntProperty(java.lang.String name)Retrieves anintproperty value by name.java.lang.StringgetProperty(java.lang.String name)Retrieves a string property value by name.TransactionParameterBuffergetTransactionParameters(int isolation)Get the transaction parameter buffer corresponding to the current connection request information.voidsetBooleanProperty(java.lang.String name, java.lang.Boolean value)Sets abooleanproperty by name.protected voidsetConnectionProperties(FBConnectionProperties connectionProperties)voidsetDescription(java.lang.String description)voidsetIntProperty(java.lang.String name, java.lang.Integer value)Sets anintproperty by name.voidsetNonStandardProperty(java.lang.String propertyMapping)Method that allows setting non-standard property in the form "key=value" form.voidsetProperty(java.lang.String name, java.lang.String value)Sets a property by name.voidsetTransactionParameters(int isolation, TransactionParameterBuffer tpb)Set transaction parameters for the specified transaction isolation level.protected static voidupdateReference(javax.naming.Reference ref, FBAbstractCommonDataSource instance)Updates the supplied reference with RefAddr properties relevant to this class.protected LockCloseablewithLock()- 
Methods inherited from class org.firebirdsql.ds.AbstractConnectionPropertiesDataSourcegetAuthPlugins, getBlobBufferSize, getBuffersNumber, getCharSet, getConnectTimeout, getDatabase, getDatabaseName, getDataTypeBind, getDbCryptConfig, getDecfloatRound, getDecfloatTraps, getDefaultIsolation, getDefaultTransactionIsolation, getEncoding, getGeneratedKeysEnabled, getLoginTimeout, getMaxBlobCacheSize, getMaxInlineBlobSize, getPageCacheSize, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getScrollableCursor, getServerBatchBufferSize, getServerName, getSessionTimeZone, getSocketBufferSize, getSoTimeout, getSqlDialect, getTpbMapping, getType, getUser, getUserName, getWireCrypt, isColumnLabelForName, isDefaultResultSetHoldable, isExtendedMetadata, isIgnoreProcedureType, isTimestampUsesLocalTimezone, isUseFirebirdAutocommit, isUseServerBatch, isUseStreamBlobs, isWireCompression, setAuthPlugins, setBlobBufferSize, setBuffersNumber, setCharSet, setColumnLabelForName, setConnectTimeout, setDatabase, setDatabaseName, setDataTypeBind, setDbCryptConfig, setDecfloatRound, setDecfloatTraps, setDefaultIsolation, setDefaultResultSetHoldable, setDefaultTransactionIsolation, setEncoding, setExtendedMetadata, setGeneratedKeysEnabled, setIgnoreProcedureType, setLoginTimeout, setMaxBlobCacheSize, setMaxInlineBlobSize, setPageCacheSize, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setScrollableCursor, setServerBatchBufferSize, setServerName, setSessionTimeZone, setSocketBufferSize, setSoTimeout, setSqlDialect, setTimestampUsesLocalTimezone, setTpbMapping, setType, setUseFirebirdAutocommit, setUser, setUserName, setUseServerBatch, setUseStreamBlobs, setWireCompression, setWireCrypt
 - 
Methods inherited from class org.firebirdsql.ds.RootCommonDataSourcegetLogWriter, getParentLogger, setLogWriter
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.BasePropertiesgetBooleanProperty, getIntProperty, getProperty
 - 
Methods inherited from interface org.firebirdsql.jdbc.FirebirdConnectionPropertiesgetNonStandardProperty, setNonStandardProperty
 
- 
 
- 
- 
- 
Field Detail- 
REF_DESCRIPTIONprotected static final java.lang.String REF_DESCRIPTION - See Also:
- Constant Field Values
 
 - 
REF_PROPERTIESprotected static final java.lang.String REF_PROPERTIES - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
withLockprotected final LockCloseable withLock() 
 - 
checkNotStartedprotected abstract void checkNotStarted() throws java.lang.IllegalStateExceptionMethod to check if this DataSource has not yet started.Implementations should throw IllegalStateException when the DataSource is already in use and modifying properties is not allowed. - Throws:
- java.lang.IllegalStateException- When the DataSource is already in use
 
 - 
getDescriptionpublic java.lang.String getDescription() 
 - 
setDescriptionpublic void setDescription(java.lang.String description) 
 - 
getTransactionParameterspublic TransactionParameterBuffer getTransactionParameters(int isolation) Description copied from interface:FirebirdConnectionPropertiesGet 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.
 
 - 
setTransactionParameterspublic void setTransactionParameters(int isolation, TransactionParameterBuffer tpb)Description copied from interface:FirebirdConnectionPropertiesSet 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- TransactionParameterBuffercontaining transaction parameters.
 
 - 
setNonStandardPropertypublic final void setNonStandardProperty(java.lang.String propertyMapping) Method that allows setting non-standard property in the form "key=value" form. This method is needed by some containers to specify properties in the configuration.- Parameters:
- propertyMapping- mapping between property name (key) and its value. Name and value are separated with "=", ":" or whitespace character. Whitespace characters on the beginning of the string and between key and value are ignored. No escaping is possible: "\n" is backslash-en, not a new line mark.
- See Also:
- setProperty(String, String)
 
 - 
getPropertypublic java.lang.String getProperty(java.lang.String name) Description copied from interface:BasePropertiesRetrieves a string property value by name.For properties with an explicit default, this method should return the string presentation of that default, not null. Forintorbooleanthe string equivalent is returned.- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Value of the property, or nullwhen not set or not a known property
 
 - 
setPropertypublic void setProperty(java.lang.String name, java.lang.String value)Description copied from interface:BasePropertiesSets a property by name.This method can be used to set all defined properties, but also properties not known by Jaybird. When setting intorbooleanproperties, the appropriate conversions are applied. Usingnullwill reset to the default value. Forbooleanproperties, an empty string is taken to meantrue.- Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
getIntPropertypublic java.lang.Integer getIntProperty(java.lang.String name) Description copied from interface:BasePropertiesRetrieves anintproperty value by name.For properties with an explicit default, this method should return the integer presentation of that default. For implementation simplicity, it is allowed to convert any string property to intinstead of checking if something is actually anintproperty- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Integer with value of the property, or nullwhen not set
 
 - 
setIntPropertypublic void setIntProperty(java.lang.String name, java.lang.Integer value)Description copied from interface:BasePropertiesSets anintproperty by name.For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent. - Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
getBooleanPropertypublic java.lang.Boolean getBooleanProperty(java.lang.String name) Description copied from interface:BasePropertiesRetrieves abooleanproperty value by name.For properties with an explicit default, this method should return the boolean presentation of that default. For implementation simplicity, it is allowed to convert any string property to booleaninstead of checking if something is actually anintproperty- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Integer with value of the property, or nullwhen not set
 
 - 
setBooleanPropertypublic void setBooleanProperty(java.lang.String name, java.lang.Boolean value)Description copied from interface:BasePropertiesSets abooleanproperty by name.For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent. - Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
connectionPropertyValuespublic java.util.Map<ConnectionProperty,java.lang.Object> connectionPropertyValues() Description copied from interface:BasePropertiesAn unmodifiable view on the connection properties held by this BaseProperties implementation.Be aware, implementations can have additional properties that are not mapped from ConnectionProperty. Such properties will need to be retrieved in an implementation-specific manner.- Returns:
- An unmodifiable view on the property values held in this properties instance
 
 - 
setConnectionPropertiesprotected final void setConnectionProperties(FBConnectionProperties connectionProperties) 
 - 
getConnectionPropertiesprotected final FBConnectionProperties getConnectionProperties() 
 - 
updateReferenceprotected static void updateReference(javax.naming.Reference ref, FBAbstractCommonDataSource instance) throws javax.naming.NamingExceptionUpdates the supplied reference with RefAddr properties relevant to this class.- Parameters:
- ref- Reference to update
- instance- Instance of this class to obtain values
- Throws:
- javax.naming.NamingException
 
 
- 
 
-