Package com.io7m.idstore.server.api
Record Class IdServerDatabaseConfiguration
java.lang.Object
java.lang.Record
com.io7m.idstore.server.api.IdServerDatabaseConfiguration
- Record Components:
kind- The underlying SQL database kindownerRoleName- The name of the role that owns the database; used for database createOrUpdateInitialAdmin 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 namecreate- true if the database should be createdupgrade-trueif the database schema should be upgraded
- All Implemented Interfaces:
IdServerJSONConfigurationElementType
public record IdServerDatabaseConfiguration(IdServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, boolean create, boolean upgrade)
extends Record
implements IdServerJSONConfigurationElementType
Configuration for the database.
-
Constructor Summary
ConstructorsConstructorDescriptionIdServerDatabaseConfiguration(IdServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, 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 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
-
IdServerDatabaseConfiguration
public IdServerDatabaseConfiguration(IdServerDatabaseKind kind, String ownerRoleName, String ownerRolePassword, String workerRolePassword, Optional<String> readerRolePassword, String address, int port, String databaseName, 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 createOrUpdateInitialAdmin 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 namecreate- true if the database should be createdupgrade-trueif the database schema should be upgraded
-
-
Method Details
-
toString
-
hashCode
-
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
-
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
-
port
-
databaseName
Returns the value of thedatabaseNamerecord component.- Returns:
- the value of the
databaseNamerecord component
-
create
-
upgrade
-