Record Class DriverCapability

java.lang.Object
java.lang.Record
org.pjdbc.capabilities.DriverCapability
Record Components:
name - Human-readable driver name
prefix - JDBC URL prefix (e.g., "pool", "log", "cache")
driverClass - Fully qualified Java class name
description - Brief description of driver purpose
capabilities - List of capability tags
parameters - Configurable URL parameters
dependencies - Optional external dependencies
sideEffects - Side effects this driver may produce
composable - Whether driver can be chained with others
terminal - 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.
  • Constructor Details

  • Method Details

    • hasCapability

      public boolean hasCapability(String capability)
      Checks if this driver has the specified capability.
    • getParameter

      public Optional<DriverCapability.Parameter> getParameter(String name)
      Gets a parameter by name.
    • getUrlPrefix

      public String getUrlPrefix()
      Returns the full JDBC URL prefix for this driver.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • prefix

      public String prefix()
      Returns the value of the prefix record component.
      Returns:
      the value of the prefix record component
    • driverClass

      public String driverClass()
      Returns the value of the driverClass record component.
      Returns:
      the value of the driverClass record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • capabilities

      public List<String> capabilities()
      Returns the value of the capabilities record component.
      Returns:
      the value of the capabilities record component
    • parameters

      public List<DriverCapability.Parameter> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component
    • dependencies

      public List<DriverCapability.Dependency> dependencies()
      Returns the value of the dependencies record component.
      Returns:
      the value of the dependencies record component
    • sideEffects

      public DriverCapability.SideEffects sideEffects()
      Returns the value of the sideEffects record component.
      Returns:
      the value of the sideEffects record component
    • composable

      public boolean composable()
      Returns the value of the composable record component.
      Returns:
      the value of the composable record component
    • terminal

      public boolean terminal()
      Returns the value of the terminal record component.
      Returns:
      the value of the terminal record component