Package org.eobjects.metamodel

Examples of org.eobjects.metamodel.DataContext.refreshSchemas()


    DataContextProvider dcp = datastore.getDataContextProvider();
    DataContext dc = dcp.getDataContext();

    // It is likely that schemas are cached, and since it is likely a new
    // table, we refresh the schema.
    dc.refreshSchemas();

    Table table = dc.getDefaultSchema().getTableByName(_tableName);
    dcp.close();
    return table;
  }
View Full Code Here


    // make table name safe
    tableName = DatastoreOutputUtils.safeName(tableName);

    synchronized (DatastoreOutputWriter.class) {
      final DataContext dc = DataContextFactory.createJdbcDataContext(_connection);
      dc.refreshSchemas();
      final String[] tableNames = dc.getDefaultSchema().getTableNames();

      if (truncateExisting) {
        _tableName = tableName;
View Full Code Here

    assertEquals(9, datastoreCount.get());

    assertNotNull(_datastore);
    DataContextProvider dataContextProvider = _datastore.getDataContextProvider();
    DataContext dc = dataContextProvider.getDataContext();
    dc.refreshSchemas();
    String[] tableNames = dc.getDefaultSchema().getTableNames();
    Arrays.sort(tableNames);

    assertEquals("[TAB_1, TAB_2, TAB_3, TAB_4, TAB_5, TAB_6, TAB_7, TAB_8, TAB_9]", Arrays.toString(tableNames));
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.