Record Class JdbcInfo

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.model.JdbcInfo
Record Components:
database - The database product name
version - The database product version
driverName - The JDBC driver name
driverVersion - The JDBC driver version
catalog - The current catalog
schema - The current schema

public record JdbcInfo(String database, String version, String driverName, String driverVersion, String catalog, String schema) extends Record
JDBC metadata exposed for a datasource.
  • Field Details

    • EMPTY

      public static final JdbcInfo EMPTY
  • Constructor Details

    • JdbcInfo

      public JdbcInfo(String database, String version, String driverName, String driverVersion, String catalog, String schema)
      Creates an instance of a JdbcInfo record class.
      Parameters:
      database - the value for the database record component
      version - the value for the version record component
      driverName - the value for the driverName record component
      driverVersion - the value for the driverVersion record component
      catalog - the value for the catalog record component
      schema - the value for the schema record component
  • Method Details

    • present

      public boolean present()
      Returns:
      true if at least one metadata field is available
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • database

      public String database()
      Returns the value of the database record component.
      Returns:
      the value of the database record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • driverName

      public String driverName()
      Returns the value of the driverName record component.
      Returns:
      the value of the driverName record component
    • driverVersion

      public String driverVersion()
      Returns the value of the driverVersion record component.
      Returns:
      the value of the driverVersion record component
    • catalog

      public String catalog()
      Returns the value of the catalog record component.
      Returns:
      the value of the catalog record component
    • schema

      public String schema()
      Returns the value of the schema record component.
      Returns:
      the value of the schema record component