Package adams.db

Class MetaDataUtils


  • public class MetaDataUtils
    extends Object
    Utility class for database meta-data.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • LOGGER

        protected static Logger LOGGER
        for logging.
      • JDBC_VALUES

        public static String[] JDBC_VALUES
    • Constructor Detail

      • MetaDataUtils

        public MetaDataUtils()
    • Method Detail

      • addRow

        protected static void addRow​(SpreadSheet sheet,
                                     String key,
                                     Object value)
        Adds a row to the sheet with the given key and value.
        Parameters:
        sheet - the sheet to add the value to
        key - the key of the value
        value - the value to add
      • addRow

        protected static void addRow​(DatabaseMetaData metadata,
                                     SpreadSheet sheet,
                                     String key)
        Adds a row to the sheet with the given key. Obtains the value using the associated method name in the meta-data
        Parameters:
        metadata - the meta-data to use
        sheet - the sheet to add the value to
        key - the key of the value
      • typesRequireTable

        public static MetaDataType[] typesRequireTable()
        Returns the metadata types that require a table.
        Returns:
        the types