public abstract class AbstractAttachProperties<T extends IAttachProperties<T>> extends java.lang.Object implements IAttachProperties<T>
IAttachProperties.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractAttachProperties.PropertyUpdateListener
Property update listener.
|
DEFAULT_CONNECT_TIMEOUT, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAttachProperties()
Default constructor for AbstractAttachProperties
|
protected |
AbstractAttachProperties(IAttachProperties<T> src)
Copy constructor for IAttachProperties.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<ConnectionProperty,java.lang.Object> |
connectionPropertyValues()
An unmodifiable view on the connection properties held by this BaseProperties implementation.
|
protected abstract void |
dirtied()
Called by setters if they have been called.
|
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getBooleanProperty(java.lang.String name)
Retrieves a
boolean property value by name. |
java.lang.Integer |
getIntProperty(java.lang.String name)
Retrieves an
int property value by name. |
java.lang.String |
getProperty(java.lang.String name)
Retrieves a string property value by name.
|
int |
hashCode() |
boolean |
isImmutable() |
protected ConnectionProperty |
property(java.lang.String name)
Returns the property of the specified name.
|
void |
registerPropertyUpdateListener(AbstractAttachProperties.PropertyUpdateListener listener)
Registers an update listener that is notified when a connection property is modified.
|
protected java.lang.Object |
resolveStoredDefaultValue(ConnectionProperty property)
Resolve the default value for the specified connection property.
|
void |
setBooleanProperty(java.lang.String name,
java.lang.Boolean value)
Sets a
boolean property by name. |
void |
setIntProperty(java.lang.String name,
java.lang.Integer value)
Sets an
int property by name. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets a property by name.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitasImmutable, asNewMutable, getAttachObjectName, getWireCryptAsEnum, setAttachObjectName, setWireCryptAsEnumgetAuthPlugins, 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, setWireCryptgetBooleanProperty, getIntProperty, getPropertyprotected AbstractAttachProperties(IAttachProperties<T> src)
All properties defined in IAttachProperties are copied from src to the new instance.
src - Source to copy fromprotected AbstractAttachProperties()
public final void setProperty(java.lang.String name,
java.lang.String value)
BaseProperties
This method can be used to set all defined properties, but also properties not known by Jaybird. When setting
int or boolean properties, the appropriate conversions are applied. Using null will
reset to the default value. For boolean properties, an empty string is taken to mean true.
setProperty in interface BasePropertiesname - Property name (not null or empty)value - Property value (use null to apply default)public final java.lang.String getProperty(java.lang.String name)
BaseProperties
For properties with an explicit default, this method should return the string presentation of that default, not
null. For int or boolean the string equivalent is returned.
getProperty in interface BasePropertiesname - Property name (not null or empty)null when not set or not a known propertypublic final void setIntProperty(java.lang.String name,
java.lang.Integer value)
BasePropertiesint property by name.
For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent.
setIntProperty in interface BasePropertiesname - Property name (not null or empty)value - Property value (use null to apply default)public final java.lang.Integer getIntProperty(java.lang.String name)
BasePropertiesint property 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 int instead of checking if
something is actually an int property
getIntProperty in interface BasePropertiesname - Property name (not null or empty)null when not setpublic final void setBooleanProperty(java.lang.String name,
java.lang.Boolean value)
BasePropertiesboolean property by name.
For implementation simplicity, it is allowed to also set string properties. The value set will be the string equivalent.
setBooleanProperty in interface BasePropertiesname - Property name (not null or empty)value - Property value (use null to apply default)public final java.lang.Boolean getBooleanProperty(java.lang.String name)
BasePropertiesboolean property 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 boolean instead of checking
if something is actually an int property
getBooleanProperty in interface BasePropertiesname - Property name (not null or empty)null when not setprotected java.lang.Object resolveStoredDefaultValue(ConnectionProperty property)
This method is only used for properties that must have a stored default value to function correctly.
property - Connection propertynull)protected final ConnectionProperty property(java.lang.String name)
When the property is not a known property, an unknown variant is returned.
name - Property namenullpublic final java.util.Map<ConnectionProperty,java.lang.Object> connectionPropertyValues()
BaseProperties
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.
connectionPropertyValues in interface BasePropertiespublic final boolean isImmutable()
isImmutable in interface IAttachProperties<T extends IAttachProperties<T>>true if this is an immutable implementation, false if mutable@InternalApi public void registerPropertyUpdateListener(AbstractAttachProperties.PropertyUpdateListener listener)
This method is only for internal use within Jaybird.
listener - Listener to register or null to unregisterjava.lang.IllegalStateException - When a property update listener was already registeredpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected abstract void dirtied()
Copyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.