Changeset 888 for MetadataBeans/trunk/src/main/java/org/eobjects/metamodel/JdbcDataContextStrategy.java
- Timestamp:
- 02/04/10 21:57:54 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MetadataBeans/trunk/src/main/java/org/eobjects/metamodel/JdbcDataContextStrategy.java
r887 r888 430 430 } 431 431 432 public DataSet executeQuery(Query query) throws Meta ModelException {432 public DataSet executeQuery(Query query) throws MetadataBeansException { 433 433 Statement statement = null; 434 434 ResultSet resultSet = null; … … 484 484 return failoverStrategy.executeQuery(query); 485 485 } else { 486 throw new Meta ModelException("Could not execute query", e);486 throw new MetadataBeansException("Could not execute query", e); 487 487 } 488 488 } … … 551 551 } catch (SQLException e) { 552 552 close(resultSet, statement); 553 throw new Meta ModelException(e);553 throw new MetadataBeansException(e); 554 554 } 555 555 } 556 556 557 557 @Override 558 protected MutableSchema getMainSchema() throws Meta ModelException {558 protected MutableSchema getMainSchema() throws MetadataBeansException { 559 559 return JdbcDataContextStrategy.this 560 560 .getSchemaByName(getMainSchemaName()); … … 562 562 563 563 @Override 564 protected String getMainSchemaName() throws Meta ModelException {564 protected String getMainSchemaName() throws MetadataBeansException { 565 565 return JdbcDataContextStrategy.this.getDefaultSchemaName(); 566 566 } … … 606 606 } catch (SQLException e) { 607 607 _log.error("Error retrieving metadata", e); 608 throw new Meta ModelException(e);608 throw new MetadataBeansException(e); 609 609 } 610 610 … … 639 639 return _dataSource.getConnection(); 640 640 } catch (SQLException e) { 641 throw new Meta ModelException("Could not establish connection", e);641 throw new MetadataBeansException("Could not establish connection", e); 642 642 } 643 643 } … … 735 735 } 736 736 737 public MutableSchema getSchemaByName(String name) throws Meta ModelException {737 public MutableSchema getSchemaByName(String name) throws MetadataBeansException { 738 738 DatabaseMetaData metaData; 739 739 try { 740 740 metaData = getConnection().getMetaData(); 741 741 } catch (SQLException e) { 742 throw new Meta ModelException(e);742 throw new MetadataBeansException(e); 743 743 } 744 744 JdbcSchema schema = new JdbcSchema(name, this); … … 751 751 } 752 752 753 public String[] getSchemaNames() throws Meta ModelException {753 public String[] getSchemaNames() throws MetadataBeansException { 754 754 try { 755 755 DatabaseMetaData metaData = getConnection().getMetaData(); … … 786 786 return result.toArray(new String[result.size()]); 787 787 } catch (SQLException e) { 788 throw new Meta ModelException(e);788 throw new MetadataBeansException(e); 789 789 } 790 790 }
Note: See TracChangeset
for help on using the changeset viewer.
