edu.ucsb.nceas.metacat.util

## Class DatabaseUtil

- java.lang.Object
- - edu.ucsb.nceas.metacat.util.DatabaseUtil

-     public class DatabaseUtil
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Map<java.lang.String,java.lang.String>` | `getScriptSuffixes()` Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion".
    `static java.util.TreeSet<DBVersion>` | `getUpgradeVersions()` Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion".
    `static boolean` | `isDatabaseConfigured()` Reports whether database is fully configured.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isDatabaseConfigured

          public static boolean isDatabaseConfigured()
                                              throws MetacatUtilException

      Reports whether database is fully configured.
      Returns:
        a boolean that is true if database is not unconfigured and false otherwise
      Throws:
        `MetacatUtilException`

    - #### getUpgradeVersions

          public static java.util.TreeSet<DBVersion> getUpgradeVersions()
                                                                 throws edu.ucsb.nceas.utilities.PropertyNotFoundException

      Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion". It then creats a DBVersion object for each upgrade version.
      Returns:
        a TreeSet of DBVersion objects holding individual version information
      Throws:
        `edu.ucsb.nceas.utilities.PropertyNotFoundException`

    - #### getScriptSuffixes

          public static java.util.Map<java.lang.String,java.lang.String> getScriptSuffixes()
                                                                                    throws edu.ucsb.nceas.utilities.PropertyNotFoundException

      Gets the available upgrade versions for metacat by getting a list of upgrade script from properties in metacat.properties that start with "database.upgradeVersion". It then creats a DBVersion object for each upgrade version.
      Returns:
        a TreeSet of DBVersion objects holding individual version information
      Throws:
        `edu.ucsb.nceas.utilities.PropertyNotFoundException`

Copyright © 2020 Regents of the University of California. All Rights Reserved.