Package org.pjdbc.capabilities
Record Class DriverCapability
java.lang.Object
java.lang.Record
org.pjdbc.capabilities.DriverCapability
- Record Components:
name- Human-readable driver nameprefix- JDBC URL prefix (e.g., "pool", "log", "cache")driverClass- Fully qualified Java class namedescription- Brief description of driver purposecapabilities- List of capability tagsparameters- Configurable URL parametersdependencies- Optional external dependenciessideEffects- Side effects this driver may producecomposable- Whether driver can be chained with othersterminal- Whether driver terminates the chain (no delegate)
public record DriverCapability(String name, String prefix, String driverClass, String description, List<String> capabilities, List<DriverCapability.Parameter> parameters, List<DriverCapability.Dependency> dependencies, DriverCapability.SideEffects sideEffects, boolean composable, boolean terminal)
extends Record
Represents the capabilities of a PJDBC driver.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents an external dependency.static final recordRepresents a configurable driver parameter.static final recordRepresents side effects a driver may produce. -
Constructor Summary
ConstructorsConstructorDescriptionDriverCapability(String name, String prefix, String driverClass, String description, List<String> capabilities, List<DriverCapability.Parameter> parameters, List<DriverCapability.Dependency> dependencies, DriverCapability.SideEffects sideEffects, boolean composable, boolean terminal) Creates an instance of aDriverCapabilityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilitiesrecord component.booleanReturns the value of thecomposablerecord component.Returns the value of thedependenciesrecord component.Returns the value of thedescriptionrecord component.Returns the value of thedriverClassrecord component.final booleanIndicates whether some other object is "equal to" this one.getParameter(String name) Gets a parameter by name.Returns the full JDBC URL prefix for this driver.booleanhasCapability(String capability) Checks if this driver has the specified capability.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of theparametersrecord component.prefix()Returns the value of theprefixrecord component.Returns the value of thesideEffectsrecord component.booleanterminal()Returns the value of theterminalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DriverCapability
public DriverCapability(String name, String prefix, String driverClass, String description, List<String> capabilities, List<DriverCapability.Parameter> parameters, List<DriverCapability.Dependency> dependencies, DriverCapability.SideEffects sideEffects, boolean composable, boolean terminal) Creates an instance of aDriverCapabilityrecord class.- Parameters:
name- the value for thenamerecord componentprefix- the value for theprefixrecord componentdriverClass- the value for thedriverClassrecord componentdescription- the value for thedescriptionrecord componentcapabilities- the value for thecapabilitiesrecord componentparameters- the value for theparametersrecord componentdependencies- the value for thedependenciesrecord componentsideEffects- the value for thesideEffectsrecord componentcomposable- the value for thecomposablerecord componentterminal- the value for theterminalrecord component
-
-
Method Details
-
hasCapability
Checks if this driver has the specified capability. -
getParameter
Gets a parameter by name. -
getUrlPrefix
Returns the full JDBC URL prefix for this driver. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
driverClass
Returns the value of thedriverClassrecord component.- Returns:
- the value of the
driverClassrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
dependencies
Returns the value of thedependenciesrecord component.- Returns:
- the value of the
dependenciesrecord component
-
sideEffects
Returns the value of thesideEffectsrecord component.- Returns:
- the value of the
sideEffectsrecord component
-
composable
public boolean composable()Returns the value of thecomposablerecord component.- Returns:
- the value of the
composablerecord component
-
terminal
public boolean terminal()Returns the value of theterminalrecord component.- Returns:
- the value of the
terminalrecord component
-