Package com.io7m.idstore.server.api
Record Class IdServerDatabaseConfiguration
java.lang.Object
java.lang.Record
com.io7m.idstore.server.api.IdServerDatabaseConfiguration
- Record Components:
user- The database userpassword- The database passwordaddress- The database addresscreate- true if the database should be createddatabaseName- The database namekind- The underlying SQL database kindport- The database portupgrade-trueif the database schema should be upgraded
- All Implemented Interfaces:
IdServerJSONConfigurationElementType
public record IdServerDatabaseConfiguration(IdServerDatabaseKind kind, String user, String password, String address, int port, String databaseName, boolean create, boolean upgrade)
extends Record
implements IdServerJSONConfigurationElementType
Configuration for the database.
-
Constructor Summary
ConstructorsConstructorDescriptionIdServerDatabaseConfiguration(IdServerDatabaseKind kind, String user, String password, 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.password()Returns the value of thepasswordrecord component.intport()Returns the value of theportrecord component.final StringtoString()Returns a string representation of this record class.booleanupgrade()Returns the value of theupgraderecord component.user()Returns the value of theuserrecord component.
-
Constructor Details
-
IdServerDatabaseConfiguration
public IdServerDatabaseConfiguration(IdServerDatabaseKind kind, String user, String password, String address, int port, String databaseName, boolean create, boolean upgrade) Configuration for the database.- Parameters:
user- The database userpassword- The database passwordaddress- The database addresscreate- true if the database should be createddatabaseName- The database namekind- The underlying SQL database kindport- The database portupgrade-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
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord 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
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
-