public Table findTable ( String tableName ) { if ( tableName == null ) { return null ; } if ( tableName . isEmpty ( ) ) { return null ; } for ( Package myPackage : this . packages ) { for ( Table table : myPackage . tables ) { if ( table . originalName . equals ( tableName ) ) { return table ; } } } throw new TableNotFoundException ( "Invalid table reference : " + tableName ) ; }
run through all the tables until it is found