Interface DatabaseConfiguration


  • public interface DatabaseConfiguration

    A database configuration of a Model Manager database.

    A database configuration is created whenever a Model Manager database is added in the COMSOL Desktop — both for a local and a server database. To connect to a Model Manager server database via the Model Manager API, the database configuration must contain both the username and the password of the user account. The password itself is stored in the database configuration in an encrypted format.

    Use one of the plain value-returning methods to query for a specific data value of the database configuration. Use the optimized get() method to return all data values of the database configuration using a single query operation.

    • Method Detail

      • databaseConfigurationKey

        DatabaseConfigurationKey databaseConfigurationKey()
        Get the identifying key of the configuration.
        Returns:
        The identifying key of the configuration.
      • label

        java.lang.String label()
        Query the current label of the configuration.
        Returns:
        The current label of the configuration.
      • databaseKey

        DatabaseKey databaseKey()
        Query the identifying key of the configured Model Manager database. Returns null if the configuration has never been used to connect to the database.
        Returns:
        The identifying key of the configured Model Manager database, or null if the configuration has never been used to connect to the database.
      • databaseAlias

        java.lang.String databaseAlias()
        Query the alias set for the configured Model Manager database. Returns null if an alias has not been set for the database.
        Returns:
        An alias set for the configured Model Manager database, or null if an alias has not been set for the database.
      • get

        GetDatabaseConfigurationResult get()

        Get all of the current configuration values for the database configuration.

        The data values held by the returned instance are collectively retrieved already when this method is invoked. Using this method therefore offers better performance over the sibling query methods on this interface whenever multiple data values need to be retrieved for the configuration.

        Returns:
        The current configuration values for the database configuration.