Class AbstractImmutableAttachProperties<T extends IAttachProperties<T>>
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractImmutableAttachProperties<T>
 
- 
- All Implemented Interfaces:
- IAttachProperties<T>,- AttachmentProperties,- BaseProperties
 - Direct Known Subclasses:
- FbImmutableConnectionProperties,- FbImmutableServiceProperties
 
 public abstract class AbstractImmutableAttachProperties<T extends IAttachProperties<T>> extends java.lang.Object implements IAttachProperties<T> Abstract immutable implementation ofIAttachProperties.NOTE: This class relies on the default implementation provided in AttachmentProperties, so in itself, immutability is not guaranteed by this class: subclasses need to befinaland guard against mutation (that is, they do not override setters, unless they callimmutable()(.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field Summary- 
Fields inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesDEFAULT_CONNECT_TIMEOUT, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractImmutableAttachProperties(IAttachProperties<T> src)Copy constructor for IAttachProperties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<ConnectionProperty,java.lang.Object>connectionPropertyValues()An unmodifiable view on the connection properties held by this BaseProperties implementation.booleanequals(java.lang.Object o)java.lang.BooleangetBooleanProperty(java.lang.String name)Retrieves abooleanproperty value by name.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.inthashCode()protected voidimmutable()Throws an UnsupportedOperationExceptionbooleanisImmutable()protected ConnectionPropertyproperty(java.lang.String name)Returns the property of the specified name.voidsetBooleanProperty(java.lang.String name, java.lang.Boolean value)Sets abooleanproperty by name.voidsetIntProperty(java.lang.String name, java.lang.Integer value)Sets anintproperty by name.voidsetProperty(java.lang.String name, java.lang.String value)Sets a property by name.- 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.AttachmentPropertiesgetAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEncoding, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getServerName, getSocketBufferSize, getSoTimeout, getType, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEncoding, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setServerName, setSocketBufferSize, setSoTimeout, setType, setUser, setWireCompression, setWireCrypt
 - 
Methods inherited from interface org.firebirdsql.jaybird.props.BasePropertiesgetBooleanProperty, getIntProperty, getProperty
 - 
Methods inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesasImmutable, asNewMutable, getAttachObjectName, getWireCryptAsEnum, setAttachObjectName, setWireCryptAsEnum
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractImmutableAttachPropertiesprotected AbstractImmutableAttachProperties(IAttachProperties<T> src) Copy constructor for IAttachProperties.All properties defined in IAttachPropertiesare copied fromsrcto the new instance.- Parameters:
- src- Source to copy from
 
 
- 
 - 
Method Detail- 
getPropertypublic final 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.- Specified by:
- getPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Value of the property, or nullwhen not set or not a known property
 
 - 
setPropertypublic final 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.- Specified by:
- setPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
getIntPropertypublic final 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- Specified by:
- getIntPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Integer with value of the property, or nullwhen not set
 
 - 
setIntPropertypublic final 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. - Specified by:
- setIntPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
getBooleanPropertypublic final 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- Specified by:
- getBooleanPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- Returns:
- Integer with value of the property, or nullwhen not set
 
 - 
setBooleanPropertypublic final 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. - Specified by:
- setBooleanPropertyin interface- BaseProperties
- Parameters:
- name- Property name (not- nullor empty)
- value- Property value (use- nullto apply default)
 
 - 
propertyprotected final ConnectionProperty property(java.lang.String name) Returns the property of the specified name.When the property is not a known property, an unknown variant is returned. - Parameters:
- name- Property name
- Returns:
- A connection property instance, never null
 
 - 
connectionPropertyValuespublic final 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.- Specified by:
- connectionPropertyValuesin interface- BaseProperties
- Returns:
- An unmodifiable view on the property values held in this properties instance
 
 - 
isImmutablepublic final boolean isImmutable() - Specified by:
- isImmutablein interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- trueif this is an immutable implementation,- falseif mutable
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
immutableprotected final void immutable() Throws an UnsupportedOperationException
 
- 
 
-