use of org.hibernate.mapping.PrimaryKey in project jbosstools-hibernate by jbosstools.
the class TableFacadeTest method testGetPrimaryKey.
@Test
public void testGetPrimaryKey() {
Table table = new Table();
PrimaryKey primaryKey = new PrimaryKey(table);
ITable tableFacade = FACADE_FACTORY.createTable(table);
assertNull(tableFacade.getPrimaryKey());
table.setPrimaryKey(primaryKey);
IPrimaryKey primaryKeyFacade = tableFacade.getPrimaryKey();
assertSame(primaryKey, ((IFacade) primaryKeyFacade).getTarget());
}
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);
}
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);
}
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);
}
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());
}
Aggregations