Search in sources :

Example 26 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 27 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)

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