Search in sources :

Example 1 with ITable

use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.

the class ServiceImpl method newTable.

@Override
public ITable newTable(String name) {
    Table target = new Table(name);
    target.setPrimaryKey(new PrimaryKey());
    return facadeFactory.createTable(target);
}
Also used : ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Table(org.hibernate.mapping.Table) PrimaryKey(org.hibernate.mapping.PrimaryKey)

Example 2 with ITable

use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.

the class ConfigurationFacadeImpl method initializeTableMappings.

@Override
protected void initializeTableMappings() {
    HashSet<ITable> tableMappings = new HashSet<ITable>();
    Iterator<Table> origin = getMetadata().collectTableMappings().iterator();
    while (origin.hasNext()) {
        ITable table = getFacadeFactory().createTable(origin.next());
        tableMappings.add(table);
    }
    setTableMappings(tableMappings);
}
Also used : ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) HashSet(java.util.HashSet)

Example 3 with ITable

use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.

the class ServiceImpl method newTable.

@Override
public ITable newTable(String name) {
    Table target = new Table(name);
    target.setPrimaryKey(new PrimaryKey(target));
    return facadeFactory.createTable(target);
}
Also used : ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Table(org.hibernate.mapping.Table) PrimaryKey(org.hibernate.mapping.PrimaryKey)

Example 4 with ITable

use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.

the class ConfigurationFacadeImpl method initializeTableMappings.

@Override
protected void initializeTableMappings() {
    HashSet<ITable> tableMappings = new HashSet<ITable>();
    Iterator<Table> origin = getMetadata().collectTableMappings().iterator();
    while (origin.hasNext()) {
        ITable table = getFacadeFactory().createTable(origin.next());
        tableMappings.add(table);
    }
    setTableMappings(tableMappings);
}
Also used : ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) HashSet(java.util.HashSet)

Example 5 with ITable

use of org.jboss.tools.hibernate.runtime.spi.ITable in project jbosstools-hibernate by jbosstools.

the class ServiceImpl method newTable.

@Override
public ITable newTable(String name) {
    Table target = new Table(name);
    target.setPrimaryKey(new PrimaryKey());
    return facadeFactory.createTable(target);
}
Also used : ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Table(org.hibernate.mapping.Table) PrimaryKey(org.hibernate.mapping.PrimaryKey)

Aggregations

ITable (org.jboss.tools.hibernate.runtime.spi.ITable)209 Table (org.hibernate.mapping.Table)180 Test (org.junit.Test)173 IColumn (org.jboss.tools.hibernate.runtime.spi.IColumn)26 SimpleValue (org.hibernate.mapping.SimpleValue)24 Method (java.lang.reflect.Method)17 IValue (org.jboss.tools.hibernate.runtime.spi.IValue)17 Column (org.hibernate.mapping.Column)16 PrimaryKey (org.hibernate.mapping.PrimaryKey)16 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)14 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)12 IPrimaryKey (org.jboss.tools.hibernate.runtime.spi.IPrimaryKey)11 Connection (java.sql.Connection)8 Statement (java.sql.Statement)8 Collection (org.hibernate.mapping.Collection)8 KeyValue (org.hibernate.mapping.KeyValue)8 Set (org.hibernate.mapping.Set)8 ArrayList (java.util.ArrayList)7 JDBCMetaDataConfiguration (org.hibernate.cfg.JDBCMetaDataConfiguration)7 IProperty (org.jboss.tools.hibernate.runtime.spi.IProperty)7