Package org.hibernate.cfg.reveng

Examples of org.hibernate.cfg.reveng.SchemaSelection


    // BIG HACK - should probably utilize the table cache before going to the jdbcreader :(
    if(key instanceof String) {
      String[] strings = StringHelper.split(".", (String) key);
      if(strings.length==1) {
        tableSelector.clearSchemaSelections();
        tableSelector.addSchemaSelection( new SchemaSelection(null,null, strings[0]) );
        List list = reader.readDatabaseSchema( dbc, null, null );
        return !list.isEmpty();
      } else if(strings.length==3) {
        tableSelector.clearSchemaSelections();
        tableSelector.addSchemaSelection( new SchemaSelection(strings[0],strings[1], strings[2]) );
        List list = reader.readDatabaseSchema( dbc, null, null );
        return !list.isEmpty();
      } else if (strings.length==2) {
        tableSelector.clearSchemaSelections();
        tableSelector.addSchemaSelection( new SchemaSelection(null,strings[0], strings[1]) );
        List list = reader.readDatabaseSchema( dbc, null, null );
        return !list.isEmpty();
      }
    }
    return false;
View Full Code Here


    }
  }

  private void setSchemaSelection(Table table) {
    tableSelector.clearSchemaSelections();
    tableSelector.addSchemaSelection( new SchemaSelection( table
        .getCatalog(), table.getSchema(), table.getName() ) );

  }
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.reveng.SchemaSelection

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.