public final class ConnectionProperty
extends java.lang.Object
Holds information like name, aliases, default value etc for a Jaybird connection property.
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionProperty.Builder |
Modifier and Type | Field and Description |
---|---|
static int |
NO_DPB_ITEM |
static int |
NO_SPB_ITEM |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
aliases()
Optional aliases (secondary names) for this property.
|
static ConnectionProperty.Builder |
builder()
Creates a connection property builder.
|
static ConnectionProperty.Builder |
builder(java.lang.String name) |
java.util.List<java.lang.String> |
choices()
Possible values for this property.
|
int |
dpbItem()
Database parameter buffer (DPB) item associated with this property.
|
boolean |
equals(java.lang.Object o) |
boolean |
hasDpbItem() |
int |
hashCode() |
boolean |
hasSpbItem() |
boolean |
isIdenticalTo(ConnectionProperty other)
Checks if the provided object is identical to this object.
|
java.lang.String |
name() |
DpbType |
pbType()
Type of the value when sent in the database (or service attach) parameter buffer.
|
int |
spbItem()
Service parameter buffer (SPB) item associated with this property.
|
java.lang.String |
toString() |
ConnectionPropertyType |
type()
Type of the property.
|
static ConnectionProperty |
unknown(java.lang.String name)
Creates an unknown connection property.
|
<T> T |
validate(T value)
Validates
value for this property. |
public static final int NO_DPB_ITEM
public static final int NO_SPB_ITEM
public static ConnectionProperty.Builder builder()
public static ConnectionProperty.Builder builder(java.lang.String name)
public static ConnectionProperty unknown(java.lang.String name)
An unknown connection property was either not defined but used, or can be used for lookups (given the
definition of equals and hashcode). An unknown connection property returned by this method always applies type
ConnectionPropertyType.STRING
name
- Property namepublic java.lang.String name()
public java.util.List<java.lang.String> aliases()
Aliases are alternative names for the property, either for backwards compatibility or for ease of use.
name()
public ConnectionPropertyType type()
public java.util.List<java.lang.String> choices()
public <T> T validate(T value)
value
for this property.value
- value to validatevalue
when validation passedjava.lang.IllegalArgumentException
- When value
is not a valid value for this propertypublic DpbType pbType()
public int dpbItem()
NO_DPB_ITEM
if no item is associatedhasDpbItem()
public boolean hasDpbItem()
true
if this property has a DPB itemdpbItem()
public int spbItem()
NO_SPB_ITEM
if no item is associatedhasSpbItem()
public boolean hasSpbItem()
true
if this property has an SPB itemspbItem()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
Equality (and hash code) only considers the name
.
Use isIdenticalTo(ConnectionProperty)
for checking full equality.
equals
in class java.lang.Object
public int hashCode()
The hashcode (and equals) only considers the name
.
hashCode
in class java.lang.Object
public boolean isIdenticalTo(ConnectionProperty other)
This supplements equals(Object)
which only checks the name
.
other
- Other connection property objecttrue
if this is the same object or all fields have the same value, false
otherwiseCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.