Search in sources :

Example 1 with PrimitiveArray

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

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    Assert.assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    Assert.assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 2 with PrimitiveArray

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

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    Assert.assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    Assert.assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 3 with PrimitiveArray

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

the class ServiceImplTest method testNewPrimitiveArray.

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

Example 4 with PrimitiveArray

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

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    Assert.assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    Assert.assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 5 with PrimitiveArray

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

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    Assert.assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    Assert.assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Aggregations

PrimitiveArray (org.hibernate.mapping.PrimitiveArray)14 Test (org.junit.Test)13 SimpleValue (org.hibernate.mapping.SimpleValue)9 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)4 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)4 IValue (org.jboss.tools.hibernate.runtime.spi.IValue)4 Array (org.hibernate.mapping.Array)2 Bag (org.hibernate.mapping.Bag)2 IdentifierBag (org.hibernate.mapping.IdentifierBag)2 Set (org.hibernate.mapping.Set)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 AssertionFailure (org.hibernate.AssertionFailure)1 MetadataSources (org.hibernate.boot.MetadataSources)1 PluralAttributeSourceArray (org.hibernate.boot.model.source.spi.PluralAttributeSourceArray)1 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)1 Any (org.hibernate.mapping.Any)1 Collection (org.hibernate.mapping.Collection)1