Search in sources :

Example 1 with PrimaryKey

use of org.hibernate.mapping.PrimaryKey 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 PrimaryKey

use of org.hibernate.mapping.PrimaryKey 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 3 with PrimaryKey

use of org.hibernate.mapping.PrimaryKey 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 4 with PrimaryKey

use of org.hibernate.mapping.PrimaryKey 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 5 with PrimaryKey

use of org.hibernate.mapping.PrimaryKey in project jbosstools-hibernate by jbosstools.

the class FacadeFactoryTest method testCreatePrimaryKey.

@Test
public void testCreatePrimaryKey() {
    PrimaryKey primaryKey = new PrimaryKey();
    IPrimaryKey facade = facadeFactory.createPrimaryKey(primaryKey);
    Assert.assertSame(primaryKey, ((IFacade) facade).getTarget());
}
Also used : PrimaryKey(org.hibernate.mapping.PrimaryKey) IPrimaryKey(org.jboss.tools.hibernate.runtime.spi.IPrimaryKey) IPrimaryKey(org.jboss.tools.hibernate.runtime.spi.IPrimaryKey) Test(org.junit.Test)

Aggregations

PrimaryKey (org.hibernate.mapping.PrimaryKey)36 Table (org.hibernate.mapping.Table)27 IPrimaryKey (org.jboss.tools.hibernate.runtime.spi.IPrimaryKey)24 ITable (org.jboss.tools.hibernate.runtime.spi.ITable)24 Test (org.junit.Test)24 Column (org.hibernate.mapping.Column)12 SimpleValue (org.hibernate.mapping.SimpleValue)9 RootClass (org.hibernate.mapping.RootClass)8 IColumn (org.jboss.tools.hibernate.runtime.spi.IColumn)8 IHQLQueryPlan (org.jboss.tools.hibernate.runtime.spi.IHQLQueryPlan)8 HQLQueryPlan (org.hibernate.engine.query.spi.HQLQueryPlan)6 Filter (org.hibernate.Filter)5 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)5 TableFilter (org.hibernate.cfg.reveng.TableFilter)5 ITableFilter (org.jboss.tools.hibernate.runtime.spi.ITableFilter)5 InvocationHandler (java.lang.reflect.InvocationHandler)4 Method (java.lang.reflect.Method)4 ArrayList (java.util.ArrayList)4 MetadataSources (org.hibernate.boot.MetadataSources)4 StandardServiceRegistry (org.hibernate.boot.registry.StandardServiceRegistry)4