public Set < ? extends Table > getExportedTables ( ) throws SQLException { synchronized ( getExportedTablesLock ) { if ( getExportedTablesCache == null ) { Set < Table > newExportedTables = new LinkedHashSet <> ( ) ; Catalog catalog = schema . getCatalog ( ) ; DatabaseMetaData metaData = catalog . getMetaData ( ) ; try ( ResultSet results = schema . getCatalog ( ) . getMetaData ( ) . getMetaData ( ) . getExportedKeys ( schema . getCatalog ( ) . getName ( ) , schema . getName ( ) , name ) ) { while ( results . next ( ) ) { String fkCat = results . getString ( "FKTABLE_CAT" ) ; Catalog fkCatalog = fkCat == null ? catalog : metaData . getCatalog ( fkCat ) ; newExportedTables . add ( fkCatalog . getSchema ( results . getString ( "FKTABLE_SCHEM" ) ) . getTable ( results . getString ( "FKTABLE_NAME" ) ) ) ; } } getExportedTablesCache = AoCollections . optimalUnmodifiableSet ( newExportedTables ) ; } return getExportedTablesCache ; } }
Gets the set of tables that depend on this table .