Package com.io7m.cardant.server.api
Record Class CAServerDatabaseConfiguration
java.lang.Object
java.lang.Record
com.io7m.cardant.server.api.CAServerDatabaseConfiguration
- Record Components:
kind- The underlying SQL database kindownerRoleName- 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 portdatabaseName- The database namedatabaseLanguage- The language used for database search indexescreate- true if the database should be createdupgrade-trueif the database schema should be upgraded
public record CAServerDatabaseConfiguration(CAServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, String databaseLanguage, boolean create, boolean upgrade)
extends Record
Configuration for the database.
-
Constructor Summary
ConstructorsConstructorDescriptionCAServerDatabaseConfiguration(CAServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, String databaseLanguage, boolean create, boolean upgrade) Configuration for the database. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.booleancreate()Returns the value of thecreaterecord component.Returns the value of thedatabaseLanguagerecord 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.kind()Returns the value of thekindrecord 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.final StringtoString()Returns a string representation of this record class.booleanupgrade()Returns the value of theupgraderecord component.Returns the value of theworkerRolePasswordrecord component.
-
Constructor Details
-
CAServerDatabaseConfiguration
public CAServerDatabaseConfiguration(CAServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, String databaseLanguage, boolean create, boolean upgrade) Configuration for the database.- Parameters:
kind- The underlying SQL database kindownerRoleName- 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 portdatabaseName- The database namedatabaseLanguage- The language used for database search indexescreate- true if the database should be createdupgrade-trueif the database schema should be upgraded
-
-
Method Details
-
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 '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
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
-
databaseLanguage
Returns the value of thedatabaseLanguagerecord component.- Returns:
- the value of the
databaseLanguagerecord component
-
create
public boolean create()Returns the value of thecreaterecord component.- Returns:
- the value of the
createrecord component
-
upgrade
public boolean upgrade()Returns the value of theupgraderecord component.- Returns:
- the value of the
upgraderecord component
-