private function createDataDbMap()
    {
        if ($this->getDataDbMap() === null) {
            return;
        }

        // Produce the sql -> database map
        $datadbmap = new Properties();

        // Check to see if the sqldbmap has already been created.
        if ($this->getDataDbMap()->exists()) {
            $datadbmap->load($this->getDataDbMap());
        }

        foreach ($this->getDataModels() as $dataModel) { // there is really one 1 db per datamodel
            foreach ($dataModel->getDatabases() as $database) {

                // if database name is specified, then we only want to dump that one db.
                if (empty($this->databaseName) || ($this->databaseName && $database->getName() == $this->databaseName)) {
                    $outFile = $this->getMappedFile($dataModel->getName());
                    $datadbmap->setProperty($outFile->getName(), $database->getName());
                }
            }
        }

        try {
            $datadbmap->store($this->getDataDbMap(), "Data XML file -> Database map");
        } catch (IOException $e) {
            throw new IOException("Unable to store properties: " . $e->getMessage());
        }
    }
private function createDataDbMap()
    {
        if ($this->getDataDbMap() === null) {
            return;
        }

        // Produce the sql -> database map
        $datadbmap = new Properties();

        // Check to see if the sqldbmap has already been created.
        if ($this->getDataDbMap()->exists()) {
            $datadbmap->load($this->getDataDbMap());
        }

        foreach ($this->getDataModels() as $dataModel) { // there is really one 1 db per datamodel
            foreach ($dataModel->getDatabases() as $database) {

                // if database name is specified, then we only want to dump that one db.
                if (empty($this->databaseName) || ($this->databaseName && $database->getName() == $this->databaseName)) {
                    $outFile = $this->getMappedFile($dataModel->getName());
                    $datadbmap->setProperty($outFile->getName(), $database->getName());
                }
            }
        }

        try {
            $datadbmap->store($this->getDataDbMap(), "Data XML file -> Database map");
        } catch (IOException $e) {
            throw new IOException("Unable to store properties: " . $e->getMessage());
        }
    }
private function createDataDbMap ( ) { if ( $ this -> getDataDbMap ( ) === null ) { return ; } // Produce the sql -> database map $ datadbmap = new Properties ( ) ; // Check to see if the sqldbmap has already been created. if ( $ this -> getDataDbMap ( ) -> exists ( ) ) { $ datadbmap -> load ( $ this -> getDataDbMap ( ) ) ; } foreach ( $ this -> getDataModels ( ) as $ dataModel ) { // there is really one 1 db per datamodel foreach ( $ dataModel -> getDatabases ( ) as $ database ) { // if database name is specified, then we only want to dump that one db. if ( empty ( $ this -> databaseName ) || ( $ this -> databaseName && $ database -> getName ( ) == $ this -> databaseName ) ) { $ outFile = $ this -> getMappedFile ( $ dataModel -> getName ( ) ) ; $ datadbmap -> setProperty ( $ outFile -> getName ( ) , $ database -> getName ( ) ) ; } } } try { $ datadbmap -> store ( $ this -> getDataDbMap ( ) , "Data XML file -> Database map" ) ; } catch ( IOException $ e ) { throw new IOException ( "Unable to store properties: " . $ e -> getMessage ( ) ) ; } }
Create the data XML -> database map.

This is necessary because there is currently no other method of knowing which
data XML files correspond to which database.  This map allows us to convert multiple
data XML files into SQL.

@throws IOException - if unable to store properties
Create the data XML - > database map .