Class ConnectionProperty
- java.lang.Object
- 
- org.firebirdsql.jaybird.props.def.ConnectionProperty
 
- 
 public final class ConnectionProperty extends java.lang.ObjectA Jaybird connection property.Holds information like name, aliases, default value etc for a Jaybird connection property. - Since:
- 5
- Author:
- Mark Rotteveel
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classConnectionProperty.Builder
 - 
Field SummaryFields Modifier and Type Field Description static intNO_DPB_ITEMstatic intNO_SPB_ITEM
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>aliases()Optional aliases (secondary names) for this property.static ConnectionProperty.Builderbuilder()Creates a connection property builder.static ConnectionProperty.Builderbuilder(java.lang.String name)java.util.List<java.lang.String>choices()Possible values for this property.intdpbItem()Database parameter buffer (DPB) item associated with this property.booleanequals(java.lang.Object o)booleanhasDpbItem()inthashCode()booleanhasSpbItem()booleanisIdenticalTo(ConnectionProperty other)Checks if the provided object is identical to this object.java.lang.Stringname()DpbTypepbType()Type of the value when sent in the database (or service attach) parameter buffer.intspbItem()Service parameter buffer (SPB) item associated with this property.java.lang.StringtoString()ConnectionPropertyTypetype()Type of the property.static ConnectionPropertyunknown(java.lang.String name)Creates an unknown connection property.<T> Tvalidate(T value)Validatesvaluefor this property.
 
- 
- 
- 
Field Detail- 
NO_DPB_ITEMpublic static final int NO_DPB_ITEM - See Also:
- Constant Field Values
 
 - 
NO_SPB_ITEMpublic static final int NO_SPB_ITEM - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
builderpublic static ConnectionProperty.Builder builder() Creates a connection property builder.- Returns:
- builder
 
 - 
builderpublic static ConnectionProperty.Builder builder(java.lang.String name) 
 - 
unknownpublic static ConnectionProperty unknown(java.lang.String name) Creates an unknown connection property.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- Parameters:
- name- Property name
- Returns:
- An unknown property with the specified name
 
 - 
namepublic java.lang.String name() - Returns:
- name of the property
 
 - 
aliasespublic java.util.List<java.lang.String> aliases() Optional aliases (secondary names) for this property.Aliases are alternative names for the property, either for backwards compatibility or for ease of use. - Returns:
- aliases for this property, empty means no aliases
- See Also:
- name()
 
 - 
typepublic ConnectionPropertyType type() Type of the property.- Returns:
- type of the property
 
 - 
choicespublic java.util.List<java.lang.String> choices() Possible values for this property.- Returns:
- possible values for this property, or empty when unrestricted
 
 - 
validatepublic <T> T validate(T value) Validatesvaluefor this property.- Parameters:
- value- value to validate
- Returns:
- valuewhen validation passed
- Throws:
- java.lang.IllegalArgumentException- When- valueis not a valid value for this property
 
 - 
pbTypepublic DpbType pbType() Type of the value when sent in the database (or service attach) parameter buffer.- Returns:
- type for the parameter buffer
 
 - 
dpbItempublic int dpbItem() Database parameter buffer (DPB) item associated with this property.- Returns:
- database parameter buffer item, or NO_DPB_ITEMif no item is associated
- See Also:
- hasDpbItem()
 
 - 
hasDpbItempublic boolean hasDpbItem() - Returns:
- trueif this property has a DPB item
- See Also:
- dpbItem()
 
 - 
spbItempublic int spbItem() Service parameter buffer (SPB) item associated with this property.- Returns:
- service parameter buffer item, or NO_SPB_ITEMif no item is associated
- See Also:
- hasSpbItem()
 
 - 
hasSpbItempublic boolean hasSpbItem() - Returns:
- trueif this property has an SPB item
- See Also:
- spbItem()
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object o) Equality (and hash code) only considers the name.Use isIdenticalTo(ConnectionProperty)for checking full equality.- Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() The hashcode (and equals) only considers the name.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
isIdenticalTopublic boolean isIdenticalTo(ConnectionProperty other) Checks if the provided object is identical to this object.This supplements equals(Object)which only checks thename.- Parameters:
- other- Other connection property object
- Returns:
- trueif this is the same object or all fields have the same value,- falseotherwise
 
 
- 
 
-