Package com.io7m.cardant.database.api
Record Class CADatabaseConfiguration
java.lang.Object
java.lang.Record
com.io7m.cardant.database.api.CADatabaseConfiguration
- Record Components:
ownerRoleName- The name of the role that owns the database; used for database setup and migrationsownerRolePassword- The password of the role that owns the databaseworkerRolePassword- The password of the worker role used for normal database operationreaderRolePassword- The password of the role used for read-only database accessaddress- The database addressport- The database TCP/IP portdatabaseName- The database namecreate- The creation specificationupgrade- The upgrade specificationlanguage- The language used for databases (such as 'english')clock- A clock for time retrievalsstrings- The string resourcestypePackageSerializers- The type package serializers
public record CADatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, CADatabaseCreate create, CADatabaseUpgrade upgrade, String language, Clock clock, CAStrings strings, CATypePackageSerializerFactoryType typePackageSerializers)
extends Record
The server database configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionCADatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, CADatabaseCreate create, CADatabaseUpgrade upgrade, String language, Clock clock, CAStrings strings, CATypePackageSerializerFactoryType typePackageSerializers) The server database configuration. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.clock()Returns the value of theclockrecord component.create()Returns the value of thecreaterecord component.Returns the value of thedatabaseNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.Returns the value of theownerRoleNamerecord component.Returns the value of theownerRolePasswordrecord component.intport()Returns the value of theportrecord component.Returns the value of thereaderRolePasswordrecord component.strings()Returns the value of thestringsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetypePackageSerializersrecord component.upgrade()Returns the value of theupgraderecord component.Returns the value of theworkerRolePasswordrecord component.
-
Constructor Details
-
CADatabaseConfiguration
public CADatabaseConfiguration(String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, CADatabaseCreate create, CADatabaseUpgrade upgrade, String language, Clock clock, CAStrings strings, CATypePackageSerializerFactoryType typePackageSerializers) The server database configuration.- Parameters:
ownerRoleName- The name of the role that owns the database; used for database setup and migrationsownerRolePassword- The password of the role that owns the databaseworkerRolePassword- The password of the worker role used for normal database operationreaderRolePassword- The password of the role used for read-only database accessaddress- The database addressport- The database TCP/IP portdatabaseName- The database namecreate- The creation specificationupgrade- The upgrade specificationlanguage- The language used for databases (such as 'english')clock- A clock for time retrievalsstrings- The string resourcestypePackageSerializers- The type package serializers
-
-
Method Details
-
withoutUpgradeOrCreate
- Returns:
- This database configuration without database creation or upgrades enabled
-
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 '=='. -
ownerRoleName
Returns the value of theownerRoleNamerecord component.- Returns:
- the value of the
ownerRoleNamerecord component
-
ownerRolePassword
Returns the value of theownerRolePasswordrecord component.- Returns:
- the value of the
ownerRolePasswordrecord component
-
workerRolePassword
Returns the value of theworkerRolePasswordrecord component.- Returns:
- the value of the
workerRolePasswordrecord component
-
readerRolePassword
Returns the value of thereaderRolePasswordrecord component.- Returns:
- the value of the
readerRolePasswordrecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
databaseName
Returns the value of thedatabaseNamerecord component.- Returns:
- the value of the
databaseNamerecord component
-
create
Returns the value of thecreaterecord component.- Returns:
- the value of the
createrecord component
-
upgrade
Returns the value of theupgraderecord component.- Returns:
- the value of the
upgraderecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
clock
Returns the value of theclockrecord component.- Returns:
- the value of the
clockrecord component
-
strings
Returns the value of thestringsrecord component.- Returns:
- the value of the
stringsrecord component
-
typePackageSerializers
Returns the value of thetypePackageSerializersrecord component.- Returns:
- the value of the
typePackageSerializersrecord component
-