Package org.beangle.db.jdbc.meta

Examples of org.beangle.db.jdbc.meta.MetadataLoader


    List<String> schemas = CollectUtils.newArrayList();
    ResultSet rs = meta.getSchemas();
    while (rs.next()) {
      schemas.add(rs.getString(1));
    }
    MetadataLoader loader = new MetadataLoader((Dialect) Class.forName(dsbean.getProvider().getDialect())
        .newInstance(), meta);
    Set<Table> tables = CollectUtils.newHashSet();
    if (!schemas.isEmpty()) {
      String schema = get("schema");
      if (StringUtils.isNotEmpty(schema)) {
        queryConext.setSchema(schema);
      }
      if (StringUtils.isEmpty(schema)) {
        schema = queryConext.getSchema();
        if (StringUtils.isEmpty(schema)) {
          schema = schemas.get(0);
        }
      }
      put("schema", schema);
      tables = loader.loadTables(null, schema, false);
    }
    put("schemas", schemas);
    put("tables", tables);
  }
View Full Code Here

TOP

Related Classes of org.beangle.db.jdbc.meta.MetadataLoader

Copyright © 2018 www.massapicom. 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.