# Record Class StDatabaseConfiguration

java.lang.Object
java.lang.Record
com.io7m.stonesignal.server.database.StDatabaseConfiguration

Record Components:
  `configuration` - The configuration
  `telemetry` - The telemetry

All Implemented Interfaces:
  `com.io7m.darco.api.DDatabaseConfigurationType`, `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

public record StDatabaseConfiguration(StConfiguration configuration, com.io7m.darco.api.DDatabaseTelemetryType telemetry) extends Record implements com.io7m.darco.postgres.DPQDatabaseConfigurationType
The database configuration.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StDatabaseConfiguration(StConfiguration configuration, com.io7m.darco.api.DDatabaseTelemetryType telemetry)`
  The database configuration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `StConfiguration`
  `configuration()`
  Returns the value of the `configuration` record component.
  `com.io7m.darco.api.DDatabaseCreate`
  `create()`
  `String`
  `databaseAddress()`
  `String`
  `databaseName()`
  `int`
  `databasePort()`
  `boolean`
  `databaseUseTLS()`
  `com.io7m.darco.api.DUsernamePassword`
  `defaultRole()`
  `com.io7m.darco.api.DUsernamePassword`
  `deviceRole()`
  `final boolean`
  `equals(Object o)`
  Indicates whether some other object is "equal to" this one.
  `final int`
  `hashCode()`
  Returns a hash code value for this object.
  `com.io7m.darco.api.DUsernamePassword`
  `ownerRole()`
  `com.io7m.darco.api.DUsernamePassword`
  `readerRole()`
  `com.io7m.darco.api.DRoles`
  `roles()`
  `Optional<com.io7m.jxe.core.JXEHardenedSAXParsers>`
  `saxParsers()`
  `com.io7m.darco.api.DDatabaseTelemetryType`
  `telemetry()`
  Returns the value of the `telemetry` record component.
  `final String`
  `toString()`
  Returns a string representation of this record class.
  `com.io7m.darco.api.DDatabaseUpgrade`
  `upgrade()`
  `com.io7m.darco.api.DUsernamePassword`
  `workerRole()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### StDatabaseConfiguration

    public StDatabaseConfiguration(StConfiguration configuration, com.io7m.darco.api.DDatabaseTelemetryType telemetry)
    The database configuration.
    Parameters:
      `configuration` - The configuration
      `telemetry` - The telemetry

- ## Method Details

  - ### saxParsers

    public Optional<com.io7m.jxe.core.JXEHardenedSAXParsers> saxParsers()
    Specified by:
      `saxParsers` in interface `com.io7m.darco.api.DDatabaseConfigurationType`

  - ### create

    public com.io7m.darco.api.DDatabaseCreate create()
    Specified by:
      `create` in interface `com.io7m.darco.api.DDatabaseConfigurationType`

  - ### upgrade

    public com.io7m.darco.api.DDatabaseUpgrade upgrade()
    Specified by:
      `upgrade` in interface `com.io7m.darco.api.DDatabaseConfigurationType`

  - ### roles

    public com.io7m.darco.api.DRoles roles()
    Specified by:
      `roles` in interface `com.io7m.darco.api.DDatabaseConfigurationType`

  - ### databaseAddress

    public String databaseAddress()
    Specified by:
      `databaseAddress` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### databasePort

    public int databasePort()
    Specified by:
      `databasePort` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### databaseName

    public String databaseName()
    Specified by:
      `databaseName` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### databaseUseTLS

    public boolean databaseUseTLS()
    Specified by:
      `databaseUseTLS` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### ownerRole

    public com.io7m.darco.api.DUsernamePassword ownerRole()
    Specified by:
      `ownerRole` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### defaultRole

    public com.io7m.darco.api.DUsernamePassword defaultRole()
    Specified by:
      `defaultRole` in interface `com.io7m.darco.api.DDatabaseConfigurationType`
    Specified by:
      `defaultRole` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### workerRole

    public com.io7m.darco.api.DUsernamePassword workerRole()
    Specified by:
      `workerRole` in interface `com.io7m.darco.postgres.DPQDatabaseConfigurationType`

  - ### readerRole

    public com.io7m.darco.api.DUsernamePassword readerRole()
    Returns:
      The reader role

  - ### deviceRole

    public com.io7m.darco.api.DUsernamePassword deviceRole()
    Returns:
      The device role

  - ### 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.

  - ### configuration

    public StConfiguration configuration()
    Returns the value of the `configuration` record component.
    Returns:
      the value of the `configuration` record component

  - ### telemetry

    public com.io7m.darco.api.DDatabaseTelemetryType telemetry()
    Returns the value of the `telemetry` record component.
    Specified by:
      `telemetry` in interface `com.io7m.darco.api.DDatabaseConfigurationType`
    Returns:
      the value of the `telemetry` record component