Load the data driver
@throws Exception
161324
public function LoadDriver()
	{

		if ($this->_driver == null)
		{
			require_once("verysimple/IO/Includer.php");
			
			// the driver was not explicitly provided so we will try to create one from
			// the connection setting based on the database types that we do know about
			switch($this->ConnectionSetting->Type)
			{
				case "mysql":
					include_once("verysimple/DB/DataDriver/MySQL.php");
					$this->_driver  = new DataDriverMySQL();
					break;
				case "mysqli":
					include_once("verysimple/DB/DataDriver/MySQLi.php");
					$this->_driver  = new DataDriverMySQLi();
					break;
				case "sqlite":
					include_once("verysimple/DB/DataDriver/SQLite.php");
					$this->_driver  = new DataDriverSQLite();
					break;
				default:
					try
					{
						Includer::IncludeFile("verysimple/DB/DataDriver/".$this->ConnectionSetting->Type.".php");
						$classname = "DataDriver" . $this->ConnectionSetting->Type;
						$this->_driver  = new $classname();
					}
					catch (IncludeException $ex)
					{
						throw new Exception('Unknown DataDriver "' . $this->ConnectionSetting->Type . '" specified in connection settings');
					}
					break;
			}
		
			DataAdapter::$DRIVER_INSTANCE = $this->_driver;
		
		}
	}
263310
public static final void loadAndRegister(File driverJarFile,
                                             String driverClassName)
            throws Exception {
        loadAndRegister(new URL("jar:" + driverJarFile.toURI() + "!/"),
                        driverClassName);
    }
355281
@Override
  public final synchronized void init() throws Exception {
    FactoryBldAccServices<ResultSet> factoryBldAccServices =
      new FactoryBldAccServices<ResultSet>();
    factoryBldAccServices.setFactoryAppBeans(this);
    setFactoryBldServices(factoryBldAccServices);
    FactoryAccServices<ResultSet> factoryAccServices =
      new FactoryAccServices<ResultSet>();
    factoryAccServices.setFactoryAppBeans(this);
    factoryAccServices.setFactoryBldAccServices(factoryBldAccServices);
    factoryBldAccServices.setFactoryAccServices(factoryAccServices);
    setFactoryOverBeans(factoryAccServices);
    FactoryAccReplicatorXmlHttps<ResultSet> factoryReplicatorXmlHttps =
      new FactoryAccReplicatorXmlHttps<ResultSet>();
    factoryReplicatorXmlHttps.setFactoryAppBeans(this);
    setFactoryReplicatorXmlHttps(factoryReplicatorXmlHttps);
    FactoryAccDatabaseWriterXml<ResultSet> factoryDatabaseWriterXml =
      new FactoryAccDatabaseWriterXml<ResultSet>();
    factoryDatabaseWriterXml.setFactoryAppBeans(this);
    setFactoryDatabaseWriterXml(factoryDatabaseWriterXml);
  }
1134374
protected function _load()
    {
        $file = new File($this->_file, "r");

        $data = @parse_ini_string($file->read(), true);
        if ($data === false) {
            throw new Exception\ParserErrorException(
                "Error parsing configuration file {$this->_file}"
            );
        }
        $this->_data = $data;
    }
116430
public static function load() {
        $configFile = MODULES_DIR . DS . RouteController::$currentModule . '/Config/config.php';

        if (!file_exists($configFile)) {
            $configFile = BASE_DIR . '/config/config.php';
            if (!file_exists($configFile)) {
                throw new \Exception(ExceptionMessages::CONFIG_FILE_NOT_FOUND);
            }
        }

        if (empty(self::$configs)) {
            self::$configs = require_once $configFile;
        }
    }
275580
private function load()
    {

        $this->initialize();
        $this->dataConnector->loadResourceLinkShareKey($this);
        if (!is_null($this->id)) {
            $this->length = strlen($this->id);
        }
        if (!is_null($this->expires)) {
            $this->life = ($this->expires - time()) / 60 / 60;
        }

    }
641579
protected function loadPresets()
    {
        if (!isset($this->presets)) {
            $this->presets = json_decode(
                $this->driverComposite->getFileContent($this->settings['repositoryUrl'], $this->settings['filePath']),
                true
            );
            if (empty($this->presets)) {
                throw new Exception('Could not load presets', 1407782202);
            }
        }
        return $this->presets;
    }
98338
protected function load()
    {
        if (!isset($_SESSION[$this->sessionKey])) {
            return;
        }
        $data = json_decode($_SESSION[$this->sessionKey], true);
        if (is_array($data)) {
            foreach ($data as $cookie) {
                $this->setCookie(new SetCookie($cookie));
            }
        } elseif (strlen($data)) {
            throw new \RuntimeException("Invalid cookie data");
        }
    }
147637
@Override
    public String getConnectionInfo() throws Exception
    {
        Connection connection = ds.getConnection();

        String info =  String.format("Connected to database: %s using driver: %s as user :%s",
                             connection.getMetaData().getDatabaseProductName(),
                             connection.getMetaData().getDriverName(),
                             connection.getMetaData().getUserName());

        connection.close();

        return info;
    }
430490
public function load()
  {
    $m = $this->getManager();
    if (!$pk = $this->getPrimaryKey()) {
      Exception::ThrowError(Exception::PK_NOT_SET, __CLASS__);
    }

    $q = $m->getQueryBuilder()
      ->select($this->getTable())
      ->where(array($pk => $this->get($pk)));

    $this->vars = $m->query($q)->fetch(\PDO::FETCH_ASSOC);

    return $this;
  }
1153252
public void load(Map<String, Object> data) throws PersistenceException {
        logger.debug("enter - load(Map)");
        try {
            for( String key : data.keySet() ) {
                Class<?> cls = persistent.getClass();
                Object val = data.get(key);
                Field f = null;
                
                while( f == null ) {
                    try {
                        f = cls.getDeclaredField(key);
                    }
                    catch( NoSuchFieldException ignore ) {
                        // ignore
                    }
                    if( f == null ) {
                        cls = cls.getSuperclass();
                        if( cls == null || cls.getName().equals(Object.class.getName()) ) {
                            break;
                        }
                    }
                }
                if( f == null ) {
                    logger.debug("No such field: " + key);
                    continue;
                }
                try {
                    f.setAccessible(true);
                    f.set(persistent, val);
                }
                catch( IllegalAccessException e ) {
                    String msg = "Error setting value for " + key + ":\n";
                    
                    if( val == null ) {
                        msg = msg + " (null)";
                    }
                    else {
                        msg = msg + " (" + val + ":" +
                            val.getClass().getName() + ")";
                    }
                    msg = msg + ":\n" + e.getClass().getName() + ":\n";
                    throw new PersistenceException(msg + e.getMessage());
                }
                catch( IllegalArgumentException e ) {
                    String msg = "Error setting value for " + key;

                    if( val == null ) {
                        msg = msg + " (null)";
                    }
                    else {
                        msg = msg + " (" + val + ":" +
                            val.getClass().getName() + ")";
                    }
                    msg = msg + ":\n" + e.getClass().getName() + ":\n";
                    throw new PersistenceException(msg + e.getMessage());
                }
            }
        }
        finally {
            logger.debug("exit - load(Map)");
        }
    }
456122
private function loadInstallationMap()
	{
		if (file_exists($this->mapFile)) {
			if (!is_readable($this->mapFile) || is_dir($this->mapFile)) {
				throw new \Exception(sprintf(
					'Cannot read map file at %s', $this->mapFile
				));
			}

			$this->installationMap = json_decode(file_get_contents($this->mapFile), TRUE);

			if ($this->installationMap === NULL) {
				throw new \Exception(sprintf(
					'Broken map file at %s', $this->mapFile
				));
			}
		}
	}
136155
public void start() throws Exception {
		server = new Server();
		ServerConnector connector = new ServerConnector(server);
		if (serverAddress != null) {
			connector.setHost(serverAddress.getHostAddress());
		}
		connector.setPort(serverPort);
		server.addConnector(connector);
		server.setHandler(new JmxWebHandler());
		server.start();
	}
1296015
public void connect() throws Exception {
        // connection must be null if the connection failed
        URLConnection newConnection = location.openConnection();
        newConnection.connect();
        connection = newConnection;
        
        InputStream bytesIn = connection.getInputStream();
        CharsetDecoder decoder = UTF_8.newDecoder();
        textIn = new BufferedReader(new InputStreamReader(bytesIn, decoder));
    }
611620
public function load($data_folder = '')
  {
    $loader = new DataLoader();
    $this->data = $loader->load($data_folder, '/config.json');
    if (!$this->validator->validate($this->data)) {
      throw new \Exception('Config.json fail.');
    }
  }
86830
public static void main(String[] args) throws Exception {
        if (args.length == 6) {
            DriverShim.loadAndRegister(new File(args[0]), args[1]);
            Connection conn =
                    DriverManager.getConnection(args[2], args[3], args[4]);
            String tbl = args[5];
            PreparedStatement st = conn.prepareStatement("SELECT COUNT(*) FROM ?");
            st.setString(1, tbl);
            ResultSet rs = st.executeQuery();
            rs.next();
            System.out.println("The " + tbl + " table has " + rs.getInt(1)
                    + " rows.");
            rs.close();
            st.close();
            conn.close();
        } else {
            System.out.println("Usage: java -cp . DriverShim someDriver.jar"
                    + " org.SomeDriver jdbcURL name pwd tbl");
            System.exit(1);
        }
    }
106627
public void start() throws Exception{
		if(cleanupDirectory){
			CleanUp.start(conf);
		}
		IDatabaseDev db = (IDatabaseDev) em.getDB();//TODO make sure DB platform can be used for development
		ModelDefinitionProvider provider = new ModelDefinitionProvider(db, conf.dbUser, null, conf.includeSchema);
		ModelDef[] origModelList = provider.getTableDefinitions();
		
		new ModelMetaDataGenerator().start(origModelList, conf);
		//TODO: proper support for explicit ModelDefinitions
		ModelDef[] withExplecitList = overrideModelDefFromExplicit(origModelList, explicitMeta);
		ModelDef[] modelList = correctModelList(withExplecitList);
		
		new DAOClassGenerator().start(modelList, conf, true, false);
		new BeanGenerator().start(modelList, conf);
		new MapperGenerator().start(modelList, conf);

		ModelDef[] modelListOwned = setModelOwners(modelList, tableGroups);
		ModelDef[] modelListChilded = setDirectChildren(modelListOwned);

		new ColumnNameGenerator().start(modelListChilded, conf);
		new TableNameGenerator().start(modelListChilded, conf);
		new SchemaTableGenerator().start(modelListChilded, conf);
		new TableColumnGenerator().start(modelListChilded, conf);
		//new ModelMetaDataGenerator().start(modelListChilded, conf);
		
		new DAOInstanceFactoryGenerator().start(modelListChilded, conf);
		new ModelToDAOConversionGenerator().start(modelListChilded, conf);
	}