Search in sources :

Example 91 with IValue

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

the class ColumnFacadeTest method testGetValue.

public void testGetValue() throws Exception {
    Value targetValue = null;
    column.setValue(targetValue);
    Assert.assertNull(columnFacade.getValue());
    targetValue = new SimpleValue();
    column.setValue(targetValue);
    IValue value = columnFacade.getValue();
    Assert.assertNotNull(value);
    Assert.assertSame(targetValue, ((IFacade) value).getTarget());
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) SimpleValue(org.hibernate.mapping.SimpleValue) IValue(org.jboss.tools.hibernate.runtime.spi.IValue) Value(org.hibernate.mapping.Value) SimpleValue(org.hibernate.mapping.SimpleValue)

Example 92 with IValue

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

the class ServiceImplTest method testNewArray.

@Test
public void testNewArray() {
    IPersistentClass persistentClass = service.newRootClass();
    IValue array = service.newArray(persistentClass);
    Assert.assertNotNull(array);
    Object target = ((IFacade) array).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof Array);
}
Also used : Array(org.hibernate.mapping.Array) PrimitiveArray(org.hibernate.mapping.PrimitiveArray) IValue(org.jboss.tools.hibernate.runtime.spi.IValue) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.Test)

Example 93 with IValue

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

the class ServiceImplTest method testNewManyToOne.

@Test
public void testNewManyToOne() {
    ITable table = service.newTable("foo");
    IValue manyToOne = service.newManyToOne(table);
    Assert.assertNotNull(manyToOne);
    Object target = ((IFacade) manyToOne).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof ManyToOne);
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) ITable(org.jboss.tools.hibernate.runtime.spi.ITable) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) ManyToOne(org.hibernate.mapping.ManyToOne) Test(org.junit.Test)

Example 94 with IValue

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

the class ServiceImplTest method testNewList.

@Test
public void testNewList() {
    IPersistentClass persistentClass = service.newRootClass();
    IValue list = service.newList(persistentClass);
    Assert.assertNotNull(list);
    Object target = ((IFacade) list).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof org.hibernate.mapping.List);
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.Test)

Example 95 with IValue

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

the class ServiceImplTest method testNewMap.

@Test
public void testNewMap() {
    IPersistentClass persistentClass = service.newRootClass();
    IValue map = service.newMap(persistentClass);
    Assert.assertNotNull(map);
    Object target = ((IFacade) map).getTarget();
    Assert.assertNotNull(target);
    Assert.assertTrue(target instanceof Map);
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) Map(org.hibernate.mapping.Map) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.Test)

Aggregations

IValue (org.jboss.tools.hibernate.runtime.spi.IValue)144 Test (org.junit.Test)105 SimpleValue (org.hibernate.mapping.SimpleValue)68 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)59 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)40 Bag (org.hibernate.mapping.Bag)20 Set (org.hibernate.mapping.Set)20 IProperty (org.jboss.tools.hibernate.runtime.spi.IProperty)20 ITable (org.jboss.tools.hibernate.runtime.spi.ITable)17 IdentifierBag (org.hibernate.mapping.IdentifierBag)16 KeyValue (org.hibernate.mapping.KeyValue)16 RootClass (org.hibernate.mapping.RootClass)16 Value (org.hibernate.mapping.Value)16 IConfiguration (org.jboss.tools.hibernate.runtime.spi.IConfiguration)13 Collection (org.hibernate.mapping.Collection)8 Component (org.hibernate.mapping.Component)8 List (org.hibernate.mapping.List)8 PersistentClass (org.hibernate.mapping.PersistentClass)8 PrimitiveArray (org.hibernate.mapping.PrimitiveArray)8 Table (org.hibernate.mapping.Table)8