Search in sources :

Example 1 with AbstractDatabaseCollectorFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade in project jbosstools-hibernate by jbosstools.

the class DatabaseCollectorFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    databaseCollector = new DefaultDatabaseCollector(new JDBCMetaDataDialect()) {

        @Override
        public Iterator<Entry<String, List<Table>>> getQualifierEntries() {
            methodName = "getQualifierEntries";
            HashMap<String, List<Table>> map = new HashMap<String, List<Table>>();
            ArrayList<Table> list = new ArrayList<Table>();
            list.add(new Table("foo"));
            list.add(new Table("bar"));
            map.put("one", list);
            list = new ArrayList<Table>();
            list.add(new Table("fubar"));
            map.put("two", list);
            return map.entrySet().iterator();
        }
    };
    databaseCollectorFacade = new AbstractDatabaseCollectorFacade(FACADE_FACTORY, databaseCollector) {
    };
}
Also used : JDBCMetaDataDialect(org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) AbstractDatabaseCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade) HashMap(java.util.HashMap) DefaultDatabaseCollector(org.hibernate.cfg.reveng.DefaultDatabaseCollector) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Example 2 with AbstractDatabaseCollectorFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade in project jbosstools-hibernate by jbosstools.

the class DatabaseCollectorFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    databaseCollector = new DefaultDatabaseCollector(new JDBCMetaDataDialect()) {

        @Override
        public Iterator<Entry<String, List<Table>>> getQualifierEntries() {
            methodName = "getQualifierEntries";
            HashMap<String, List<Table>> map = new HashMap<String, List<Table>>();
            ArrayList<Table> list = new ArrayList<Table>();
            list.add(new Table("foo"));
            list.add(new Table("bar"));
            map.put("one", list);
            list = new ArrayList<Table>();
            list.add(new Table("fubar"));
            map.put("two", list);
            return map.entrySet().iterator();
        }
    };
    databaseCollectorFacade = new AbstractDatabaseCollectorFacade(FACADE_FACTORY, databaseCollector) {
    };
}
Also used : JDBCMetaDataDialect(org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) AbstractDatabaseCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade) HashMap(java.util.HashMap) DefaultDatabaseCollector(org.hibernate.cfg.reveng.DefaultDatabaseCollector) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Example 3 with AbstractDatabaseCollectorFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade in project jbosstools-hibernate by jbosstools.

the class DatabaseCollectorFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    databaseCollector = new DefaultDatabaseCollector(new JDBCMetaDataDialect()) {

        @Override
        public Iterator<Entry<String, List<Table>>> getQualifierEntries() {
            methodName = "getQualifierEntries";
            HashMap<String, List<Table>> map = new HashMap<String, List<Table>>();
            ArrayList<Table> list = new ArrayList<Table>();
            list.add(new Table("foo"));
            list.add(new Table("bar"));
            map.put("one", list);
            list = new ArrayList<Table>();
            list.add(new Table("fubar"));
            map.put("two", list);
            return map.entrySet().iterator();
        }
    };
    databaseCollectorFacade = new AbstractDatabaseCollectorFacade(FACADE_FACTORY, databaseCollector) {
    };
}
Also used : JDBCMetaDataDialect(org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) AbstractDatabaseCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade) HashMap(java.util.HashMap) DefaultDatabaseCollector(org.hibernate.cfg.reveng.DefaultDatabaseCollector) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Example 4 with AbstractDatabaseCollectorFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade in project jbosstools-hibernate by jbosstools.

the class DatabaseCollectorFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    databaseCollector = new DefaultDatabaseCollector(new JDBCMetaDataDialect()) {

        @Override
        public Iterator<Entry<String, List<Table>>> getQualifierEntries() {
            methodName = "getQualifierEntries";
            HashMap<String, List<Table>> map = new HashMap<String, List<Table>>();
            ArrayList<Table> list = new ArrayList<Table>();
            list.add(new Table("foo"));
            list.add(new Table("bar"));
            map.put("one", list);
            list = new ArrayList<Table>();
            list.add(new Table("fubar"));
            map.put("two", list);
            return map.entrySet().iterator();
        }
    };
    databaseCollectorFacade = new AbstractDatabaseCollectorFacade(FACADE_FACTORY, databaseCollector) {
    };
}
Also used : JDBCMetaDataDialect(org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) AbstractDatabaseCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade) HashMap(java.util.HashMap) DefaultDatabaseCollector(org.hibernate.cfg.reveng.DefaultDatabaseCollector) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Example 5 with AbstractDatabaseCollectorFacade

use of org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade in project jbosstools-hibernate by jbosstools.

the class DatabaseCollectorFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    databaseCollector = new DefaultDatabaseCollector(new JDBCMetaDataDialect()) {

        @Override
        public Iterator<Entry<String, List<Table>>> getQualifierEntries() {
            methodName = "getQualifierEntries";
            HashMap<String, List<Table>> map = new HashMap<String, List<Table>>();
            ArrayList<Table> list = new ArrayList<Table>();
            list.add(new Table("foo"));
            list.add(new Table("bar"));
            map.put("one", list);
            list = new ArrayList<Table>();
            list.add(new Table("fubar"));
            map.put("two", list);
            return map.entrySet().iterator();
        }
    };
    databaseCollectorFacade = new AbstractDatabaseCollectorFacade(FACADE_FACTORY, databaseCollector) {
    };
}
Also used : JDBCMetaDataDialect(org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) AbstractDatabaseCollectorFacade(org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade) HashMap(java.util.HashMap) DefaultDatabaseCollector(org.hibernate.cfg.reveng.DefaultDatabaseCollector) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)8 HashMap (java.util.HashMap)8 Iterator (java.util.Iterator)8 List (java.util.List)8 DefaultDatabaseCollector (org.hibernate.cfg.reveng.DefaultDatabaseCollector)8 JDBCMetaDataDialect (org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect)8 Table (org.hibernate.mapping.Table)8 AbstractDatabaseCollectorFacade (org.jboss.tools.hibernate.runtime.common.AbstractDatabaseCollectorFacade)8 ITable (org.jboss.tools.hibernate.runtime.spi.ITable)8 Before (org.junit.Before)8