Search in sources :

Example 21 with List

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

the class ValueFacadeTest method testSetIndex.

@Test
public void testSetIndex() {
    List valueTarget = new List(null, null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertNull(valueTarget.getIndex());
    SimpleValue indexTarget = new SimpleValue(null);
    IValue indexFacade = FACADE_FACTORY.createValue(indexTarget);
    valueFacade.setIndex(indexFacade);
    Assert.assertSame(indexTarget, valueTarget.getIndex());
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) List(org.hibernate.mapping.List) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 22 with List

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

the class ValueFacadeTest method testGetIndex.

@Test
public void testGetIndex() {
    List valueTarget = new List(null, null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertNull(valueFacade.getIndex());
    SimpleValue indexValue = new SimpleValue(null);
    valueTarget.setIndex(indexValue);
    Assert.assertSame(indexValue, ((IFacade) valueFacade.getIndex()).getTarget());
}
Also used : List(org.hibernate.mapping.List) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 23 with List

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

the class ValueFacadeTest method testIsList.

@Test
public void testIsList() {
    valueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertFalse(valueFacade.isList());
    valueTarget = new List(null, null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertTrue(valueFacade.isList());
}
Also used : List(org.hibernate.mapping.List) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 24 with List

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

the class ValueFacadeTest method testSetIndex.

@Test
public void testSetIndex() {
    List valueTarget = new List(null, null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertNull(valueTarget.getIndex());
    SimpleValue indexTarget = new SimpleValue(null);
    IValue indexFacade = FACADE_FACTORY.createValue(indexTarget);
    valueFacade.setIndex(indexFacade);
    Assert.assertSame(indexTarget, valueTarget.getIndex());
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) List(org.hibernate.mapping.List) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 25 with List

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

the class ValueFacadeTest method testIsList.

@Test
public void testIsList() {
    valueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertFalse(valueFacade.isList());
    valueTarget = new List(null, null);
    valueFacade = FACADE_FACTORY.createValue(valueTarget);
    Assert.assertTrue(valueFacade.isList());
}
Also used : List(org.hibernate.mapping.List) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Aggregations

List (org.hibernate.mapping.List)27 SimpleValue (org.hibernate.mapping.SimpleValue)26 Test (org.junit.Test)25 IValue (org.jboss.tools.hibernate.runtime.spi.IValue)8 Component (org.hibernate.mapping.Component)2 OneToMany (org.hibernate.mapping.OneToMany)2 AnnotationException (org.hibernate.AnnotationException)1 MetadataSources (org.hibernate.boot.MetadataSources)1 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)1 PropertyHolder (org.hibernate.cfg.PropertyHolder)1 ClassAuditingData (org.hibernate.envers.configuration.internal.metadata.reader.ClassAuditingData)1 ComponentAuditingData (org.hibernate.envers.configuration.internal.metadata.reader.ComponentAuditingData)1 PropertyAuditingData (org.hibernate.envers.configuration.internal.metadata.reader.PropertyAuditingData)1 Any (org.hibernate.mapping.Any)1 Array (org.hibernate.mapping.Array)1 Bag (org.hibernate.mapping.Bag)1 Collection (org.hibernate.mapping.Collection)1 DependantValue (org.hibernate.mapping.DependantValue)1 IdentifierBag (org.hibernate.mapping.IdentifierBag)1 IndexBackref (org.hibernate.mapping.IndexBackref)1