Class ModelMetaData


  • public class ModelMetaData
    extends java.lang.Object
    The whole metadata for the connected database.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelMetaData​(Backend backend, java.sql.DatabaseMetaData[] metaData, java.lang.String[] schemas)
      Creates a database meta instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addTableMetaData​(TableMetaData tableMetaData)
      Adds a table to this model.
      If schemas are set, only tables belonging to one of given schemas will be appended.
      Backend getBackend()
      Gets the backend.
      java.sql.DatabaseMetaData[] getMetaData()
      Gets the JDBC-connection's meta data.
      May be more than one if different schemas and schema-option was given in BackendInfo.
      java.util.Properties getProperties()
      Gets the migration properties.
      Used to remember settings of the migration process.
      java.lang.String[] getSchemas()
      Gets the valid schemas.
      java.util.Collection<TableMetaData> getTables()
      Gets the tables of this model.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ModelMetaData

        public ModelMetaData​(Backend backend,
                             java.sql.DatabaseMetaData[] metaData,
                             java.lang.String[] schemas)
        Creates a database meta instance.
        Parameters:
        backend - the backend
        metaData - the connections meta data
        schemas - optional schemas, null if no schema check
    • Method Detail

      • getProperties

        public java.util.Properties getProperties()
        Gets the migration properties.
        Used to remember settings of the migration process.
        Returns:
        the properties
      • addTableMetaData

        public boolean addTableMetaData​(TableMetaData tableMetaData)
        Adds a table to this model.
        If schemas are set, only tables belonging to one of given schemas will be appended.
        Parameters:
        tableMetaData - the table
        Returns:
        true if added, false if wrong schema
      • getTables

        public java.util.Collection<TableMetaData> getTables()
        Gets the tables of this model.
        Returns:
        the tables
      • getBackend

        public Backend getBackend()
        Gets the backend.
        Returns:
        the backend
      • getSchemas

        public java.lang.String[] getSchemas()
        Gets the valid schemas.
        Returns:
        the optional schemas, null if no schema check
      • getMetaData

        public java.sql.DatabaseMetaData[] getMetaData()
        Gets the JDBC-connection's meta data.
        May be more than one if different schemas and schema-option was given in BackendInfo.
        Returns:
        the meta data
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object