Get the table that holds this type of database.
@param iDatabaseType The DB Type.
@return The database table.
193814
public Hashtable<String,Database> getDatabaseList(int iDatabaseType)
    {
        String strDbPrefix = this.getDatabasePrefix(iDatabaseType);
        iDatabaseType = iDatabaseType & DBConstants.TABLE_MASK;
        if ((iDatabaseType & DBConstants.TABLE_TYPE_MASK) == DBConstants.REMOTE)
            if (this.getProperty(DBParams.LOCAL) != null)
                if (this.getProperty(DBParams.LOCAL).equals(this.getProperty(DBParams.REMOTE)))
                    iDatabaseType = (iDatabaseType & ~DBConstants.TABLE_TYPE_MASK) | DBConstants.LOCAL;  // Local and Remote use the same database
        if ((iDatabaseType & DBConstants.TABLE_TYPE_MASK) == DBConstants.TABLE)
            if (this.getProperty(DBParams.LOCAL) != null)
                if (this.getProperty(DBParams.LOCAL).equals(this.getProperty(DBParams.TABLE)))
                    iDatabaseType = (iDatabaseType & ~DBConstants.TABLE_TYPE_MASK) | DBConstants.LOCAL;  // Local and Table use the same database
        if (iDatabaseType == DBConstants.SCREEN)
            iDatabaseType = (iDatabaseType & ~DBConstants.TABLE_TYPE_MASK) | DBConstants.LOCAL;  // Local and Screen use the same database
        if ("Mapped".equalsIgnoreCase(strDbPrefix))
            iDatabaseType = DBConstants.INTERNAL_MAPPED;
        
        if (m_htDatabaseList[iDatabaseType] == null)
            m_htDatabaseList[iDatabaseType] = new Hashtable<String,Database>();
        return m_htDatabaseList[iDatabaseType];
    }
594307
Integer getDatabasePageSize(Class<? extends Storable> type) {
        if (mDatabasePageSizes == null) {
            return null;
        }
        Integer size = mDatabasePageSizes.get(type);
        if (size == null && type != null) {
            size = mDatabasePageSizes.get(null);
        }
        return size;
    }
173101
public DatabaseObject getExample(final Database database, final String tableName) {
      final Schema schema = new Schema(getCatalogName(), getSchemaName());
      final DatabaseObject example;

      // For GeoDB, the index is another table.
      if (database instanceof DerbyDatabase || database instanceof H2Database) {
         final String correctedTableName = database.correctObjectName(getHatboxTableName(),
               Table.class);
         example = new Table().setName(correctedTableName).setSchema(schema);
      } else {
         example = getIndexExample(database, schema, tableName);
      }
      return example;
   }
290219
public static DatabaseStructureType getDatabaseType(WorkspaceEntry wsConfig) throws RepositoryConfigurationException
   {
      try
      {
         if (wsConfig.getContainer().getParameterBoolean("multi-db"))
         {
            return JDBCDataContainerConfig.DatabaseStructureType.MULTI;
         }
         else
         {
            return JDBCDataContainerConfig.DatabaseStructureType.SINGLE;
         }
      }
      catch (Exception e)
      {
         String dbStructureType =
            wsConfig.getContainer().getParameterValue(JDBCWorkspaceDataContainer.DB_STRUCTURE_TYPE).toUpperCase();
         return JDBCDataContainerConfig.DatabaseStructureType.valueOf(dbStructureType);
      }
   }
193069
public List<TableType> getTableTypes() throws SQLException {
        final List<TableType> list = new ArrayList<>();
        try (ResultSet results = databaseMetadata.getTableTypes()) {
            if (results != null) {
                bind(results, TableType.class, list);
            }
        }
        return list;
    }
1314810
protected String determineDatabaseType() throws HandlerException {
        String dbName = null;
        try (Connection conn = getConnection()) {
            dbName = conn.getMetaData().getDatabaseProductName();
        } catch (SQLException e) {
            throw new HandlerException("Exception occured while getting DB Name",
                    DatabaseAuditHandler.class, e);
        }
        return dbName;
    }
1139807
public static Table getTable(DatabaseMetaData metadata, String tableName) throws Exception {
        return new Table(
            tableName,
            getPrimaryKey(metadata, tableName),
            getForeignKeys(metadata, tableName),
            getExportedKeys(metadata, tableName),
            getColumns(metadata, tableName)
        );
    }
531038
public static DatabaseType createDatabaseType(String databaseUrl) {
		String dbTypePart = extractDbType(databaseUrl);
		for (DatabaseType databaseType : databaseTypes) {
			if (databaseType.isDatabaseUrlThisType(databaseUrl, dbTypePart)) {
				return databaseType;
			}
		}
		throw new IllegalArgumentException("Unknown database-type url part '" + dbTypePart + "' in: " + databaseUrl);
	}
40155
public FastTrackTable getTable(FastTrackTableType type)
   {
      FastTrackTable result = m_tables.get(type);
      if (result == null)
      {
         result = EMPTY_TABLE;
      }
      return result;
   }
76104
protected Table getTableFromDB(String tableName) {
        Table table = m_db.getTables().getExact(tableName);
        return table;
    }
325398
public Object getHandle(int iHandleType) throws DBException
    {
        if (iHandleType == DBConstants.OBJECT_ID_HANDLE)
            iHandleType = DBConstants.FULL_OBJECT_HANDLE; // Get the source table also
        if (this.getCurrentTable() == null)
            return null;
        Object object = this.getCurrentTable().getHandle(iHandleType);
        if (iHandleType == DBConstants.DATA_SOURCE_HANDLE)
            object = new FullDataSource(this.getCurrentTable(), object);
        return object;
    }
752929
func GetDatabaseType(db string) (DATABASE, error) {
	if mongoStr == db {
		return MONGODB, nil
	} else if mysqlStr == db {
		return MYSQL, nil
	} else {
		return INVALID, errors.New("Undefined Database Type")
	}
}
1107355
Integer getColJDBCDataType(int i) {
        return ValuePool.getInt(
            table.getColumn(i).getDataType().getJDBCTypeCode());
    }
422393
public BaseDatabase makeDatabase(int iDatabaseType)
    {
        BaseDatabase database = null;
        String strDbPrefix = this.getDatabasePrefix(iDatabaseType);

        if (strDbPrefix != null) if (strDbPrefix.indexOf('.') == -1)
            strDbPrefix = DBConstants.ROOT_PACKAGE + "base.db." + strDbPrefix.toLowerCase() + "." + strDbPrefix + "Database";
        database = (BaseDatabase)ClassServiceUtility.getClassService().makeObjectFromClassName(strDbPrefix);
        if (database == null)
            database = new BaseDatabase();  // default
        return database;
    }
641482
public static Database getDatabase(DataSource dataSource) {
		if (dataSource == null) {
			return Database.DEFAULT;
		}
		try {
			String url = JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
			DatabaseDriver driver = DatabaseDriver.fromJdbcUrl(url);
			Database database = LOOKUP.get(driver);
			if (database != null) {
				return database;
			}
		}
		catch (MetaDataAccessException ex) {
			logger.warn("Unable to determine jdbc url from datasource", ex);
		}
		return Database.DEFAULT;
	}
920428
@Override
    public Type<?> getIdType()
    {
        if (idAttribute != null && !isIdClass)
        {
            return idAttribute.getType();
        }

        return getSupertype().getIdType();
    }
157135
public function getDb()
    {
        if (!$this->db) {
            $this->db = $this->source;

            if (!$this->db instanceof AbstractDatabaseDriver) {
                $this->db = Ioc::getDatabase();
            }
        }

        return $this->db;
    }