public void open ( ) throws DBException { if ( m_pDatabase == null ) { PhysicalDatabaseParent pDBParent = null ; Environment env = ( Environment ) this . getDatabaseOwner ( ) . getEnvironment ( ) ; if ( env != null ) pDBParent = ( PhysicalDatabaseParent ) env . getPDatabaseParent ( mapDBParentProperties , true ) ; String databaseName = this . getDatabaseName ( true ) ; if ( databaseName . endsWith ( BaseDatabase . SHARED_SUFFIX ) ) databaseName = databaseName . substring ( 0 , databaseName . length ( ) - BaseDatabase . SHARED_SUFFIX . length ( ) ) ; else if ( databaseName . endsWith ( BaseDatabase . USER_SUFFIX ) ) databaseName = databaseName . substring ( 0 , databaseName . length ( ) - BaseDatabase . USER_SUFFIX . length ( ) ) ; char strPDatabaseType = this . getPDatabaseType ( ) ; m_pDatabase = pDBParent . getPDatabase ( databaseName , strPDatabaseType , false ) ; if ( m_pDatabase == null ) m_pDatabase = this . makePDatabase ( pDBParent , databaseName ) ; m_pDatabase . addPDatabaseOwner ( this ) ; } m_pDatabase . open ( ) ; super . open ( ) ; // Do any inherited }
Open the database . If this is the first time a raw data database is created .