Search in sources :

Example 76 with ITable

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

the class TableFacadeTest method testGetSubselect.

@Test
public void testGetSubselect() {
    Table table = new Table();
    ITable tableFacade = FACADE_FACTORY.createTable(table);
    Assert.assertNull(tableFacade.getSubselect());
    table.setSubselect("foo");
    Assert.assertEquals("foo", tableFacade.getSubselect());
}
Also used : Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Test(org.junit.Test)

Example 77 with ITable

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

the class TableFacadeTest method testGetName.

@Test
public void testGetName() {
    Table table = new Table();
    ITable tableFacade = FACADE_FACTORY.createTable(table);
    Assert.assertNull(tableFacade.getName());
    table.setName("foo");
    Assert.assertEquals("foo", tableFacade.getName());
}
Also used : Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Test(org.junit.Test)

Example 78 with ITable

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

the class TableFacadeTest method testIsPhysicalTable.

@Test
public void testIsPhysicalTable() {
    Table table = new Table();
    ITable tableFacade = FACADE_FACTORY.createTable(table);
    table.setSubselect("foo");
    Assert.assertFalse(tableFacade.isPhysicalTable());
    table.setSubselect(null);
    Assert.assertTrue(tableFacade.isPhysicalTable());
}
Also used : Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Test(org.junit.Test)

Example 79 with ITable

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

the class TableFacadeTest method testGetSchema.

@Test
public void testGetSchema() {
    Table table = new Table();
    ITable tableFacade = FACADE_FACTORY.createTable(table);
    Assert.assertNull(tableFacade.getSchema());
    table.setSchema("foo");
    Assert.assertEquals("foo", tableFacade.getSchema());
}
Also used : Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Test(org.junit.Test)

Example 80 with ITable

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

the class TableFacadeTest method testIsAbstract.

@Test
public void testIsAbstract() {
    Table table = new Table();
    ITable tableFacade = FACADE_FACTORY.createTable(table);
    table.setAbstract(true);
    Assert.assertTrue(tableFacade.isAbstract());
    table.setAbstract(false);
    Assert.assertFalse(tableFacade.isAbstract());
}
Also used : Table(org.hibernate.mapping.Table) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) Test(org.junit.Test)

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