Class DatabaseFactory


  • public final class DatabaseFactory
    extends java.lang.Object
    Creates Databases
    Author:
    Andrew Varley
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.Map<java.lang.String,​Database> databases  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Database getDatabase​(java.lang.String instance)
      Returns a connection to the named database
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • databases

        protected static java.util.Map<java.lang.String,​Database> databases
    • Method Detail

      • getDatabase

        public static Database getDatabase​(java.lang.String instance)
                                    throws java.sql.SQLException,
                                           java.lang.ClassNotFoundException
        Returns a connection to the named database
        Parameters:
        instance - the name of the database
        Returns:
        a connection to that database
        Throws:
        java.sql.SQLException - if there is a problem with the underlying database
        java.lang.ClassNotFoundException - if the class that the instance uses cannot be found