public String getDatabaseName(boolean bPhysicalName)
    {
        String strDbName = m_strDbName;
        if (bPhysicalName)
        {
            if ((this.getDatabaseType() & DBConstants.SYSTEM_DATABASE) != DBConstants.SYSTEM_DATABASE)
            {
                if ((this.getProperty(strDbName + DBSHARED_PARAM_SUFFIX) != null)
                    && (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
                    && ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA))
                        strDbName = this.getProperty(strDbName + DBSHARED_PARAM_SUFFIX);	// Special processing - db name supplied
                else if ((this.getProperty(strDbName + DBUSER_PARAM_SUFFIX) != null)
                    && (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
                    && ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA))
                        strDbName = this.getProperty(strDbName + DBUSER_PARAM_SUFFIX);	// Special processing - db name supplied
                else
                {
	                if (this.getProperty(DBConstants.DB_USER_PREFIX) != null)
	                    if (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
	                        if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
	                    		strDbName = Utility.addToPath(this.getProperty(DBConstants.DB_USER_PREFIX), strDbName, DB_NAME_SEPARATOR);    // User prefix - Only for user data
	                if (Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)) != null)
	                    if (!m_strDbName.equalsIgnoreCase(this.getProperty(SQLParams.INTERNAL_DB_NAME)))
	                    {
	                        if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
	                        	strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);	 // System suffix
	                        else if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
	                        {  // The shared database name is never changed, EXCEPT if the mode is set. Then there are a few exceptions
	                            if ((this.getProperty(DBConstants.MODE) == null) || (this.getProperty(DBConstants.MODE).length() == 0) || (this.getProperty(DBConstants.MODE).equalsIgnoreCase(RUN_MODE)))
                                {  // Default = Regular (run) mode
                                    if ((DEV_DATABASE.equalsIgnoreCase(m_strDbName)) || (MAIN_DATABASE.equalsIgnoreCase(m_strDbName)))
                                        strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);  // Add System suffix
                                }
                                else
                                {   // Development mode
                                    if (this.getProperty(DBConstants.MODE).length() >= 3)
	                                    if (this.getProperty(DBConstants.MODE).substring(0, 3).equalsIgnoreCase(DEVELOPMENT_MODE))
	                                {
	                                    if (DEV_DATABASE.equalsIgnoreCase(m_strDbName))
                                            strDbName = Utility.addToPath(strDbName, Utility.getSystemSuffix(this.getProperty(DBConstants.SYSTEM_NAME), this.getProperty(DBConstants.DEFAULT_SYSTEM_NAME)), DB_NAME_SEPARATOR);  // System suffix	                                        
	                                    if (MAIN_DATABASE.equalsIgnoreCase(m_strDbName))
	                                        strDbName = Utility.addToPath(strDbName, DEV_MAIN_SUFFIX, DB_NAME_SEPARATOR);  // Development menus
	                                }
                                }
	                        }
	                    }
                }
//x                if (this.getLocale() != null) //**THIS IS DONE IN makeDBLocale**
//x                	if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
//x                		if (this.getLocale() != this.getProperty(DBConstants.SYSTEM_NAME))
//x                			strDbName = strDbName + '_' + this.getLocale();
                if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.USER_DATA)
                    strDbName = Utility.addToPath(strDbName, USER_SUFFIX, DB_NAME_SEPARATOR);
                else if ((this.getDatabaseType() & DBConstants.TABLE_DATA_TYPE_MASK) == DBConstants.SHARED_DATA)
                    strDbName = Utility.addToPath(strDbName, SHARED_SUFFIX, DB_NAME_SEPARATOR);
            }
        }
        return strDbName;
    }
public String getDatabaseName ( boolean bPhysicalName ) { String strDbName = m_strDbName ; if ( bPhysicalName ) { if ( ( this . getDatabaseType ( ) & DBConstants . SYSTEM_DATABASE ) != DBConstants . SYSTEM_DATABASE ) { if ( ( this . getProperty ( strDbName + DBSHARED_PARAM_SUFFIX ) != null ) && ( ! m_strDbName . equalsIgnoreCase ( this . getProperty ( SQLParams . INTERNAL_DB_NAME ) ) ) && ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . SHARED_DATA ) ) strDbName = this . getProperty ( strDbName + DBSHARED_PARAM_SUFFIX ) ; else if ( ( this . getProperty ( strDbName + DBUSER_PARAM_SUFFIX ) != null ) && ( ! m_strDbName . equalsIgnoreCase ( this . getProperty ( SQLParams . INTERNAL_DB_NAME ) ) ) && ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . USER_DATA ) ) strDbName = this . getProperty ( strDbName + DBUSER_PARAM_SUFFIX ) ; else { if ( this . getProperty ( DBConstants . DB_USER_PREFIX ) != null ) if ( ! m_strDbName . equalsIgnoreCase ( this . getProperty ( SQLParams . INTERNAL_DB_NAME ) ) ) if ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . USER_DATA ) strDbName = Utility . addToPath ( this . getProperty ( DBConstants . DB_USER_PREFIX ) , strDbName , DB_NAME_SEPARATOR ) ; if ( Utility . getSystemSuffix ( this . getProperty ( DBConstants . SYSTEM_NAME ) , this . getProperty ( DBConstants . DEFAULT_SYSTEM_NAME ) ) != null ) if ( ! m_strDbName . equalsIgnoreCase ( this . getProperty ( SQLParams . INTERNAL_DB_NAME ) ) ) { if ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . USER_DATA ) strDbName = Utility . addToPath ( strDbName , Utility . getSystemSuffix ( this . getProperty ( DBConstants . SYSTEM_NAME ) , this . getProperty ( DBConstants . DEFAULT_SYSTEM_NAME ) ) , DB_NAME_SEPARATOR ) ; else if ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . SHARED_DATA ) { if ( ( this . getProperty ( DBConstants . MODE ) == null ) || ( this . getProperty ( DBConstants . MODE ) . length ( ) == 0 ) || ( this . getProperty ( DBConstants . MODE ) . equalsIgnoreCase ( RUN_MODE ) ) ) { if ( ( DEV_DATABASE . equalsIgnoreCase ( m_strDbName ) ) || ( MAIN_DATABASE . equalsIgnoreCase ( m_strDbName ) ) ) strDbName = Utility . addToPath ( strDbName , Utility . getSystemSuffix ( this . getProperty ( DBConstants . SYSTEM_NAME ) , this . getProperty ( DBConstants . DEFAULT_SYSTEM_NAME ) ) , DB_NAME_SEPARATOR ) ; } else { if ( this . getProperty ( DBConstants . MODE ) . length ( ) >= 3 ) if ( this . getProperty ( DBConstants . MODE ) . substring ( 0 , 3 ) . equalsIgnoreCase ( DEVELOPMENT_MODE ) ) { if ( DEV_DATABASE . equalsIgnoreCase ( m_strDbName ) ) strDbName = Utility . addToPath ( strDbName , Utility . getSystemSuffix ( this . getProperty ( DBConstants . SYSTEM_NAME ) , this . getProperty ( DBConstants . DEFAULT_SYSTEM_NAME ) ) , DB_NAME_SEPARATOR ) ; if ( MAIN_DATABASE . equalsIgnoreCase ( m_strDbName ) ) strDbName = Utility . addToPath ( strDbName , DEV_MAIN_SUFFIX , DB_NAME_SEPARATOR ) ; } } } } } if ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . USER_DATA ) strDbName = Utility . addToPath ( strDbName , USER_SUFFIX , DB_NAME_SEPARATOR ) ; else if ( ( this . getDatabaseType ( ) & DBConstants . TABLE_DATA_TYPE_MASK ) == DBConstants . SHARED_DATA ) strDbName = Utility . addToPath ( strDbName , SHARED_SUFFIX , DB_NAME_SEPARATOR ) ; } } return strDbName ; }
Get the Database Name.
@param bPhysicalName Return the full physical name of the database
@return The db name.