use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsAnyType.
@Test
public void testIsAnyType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isAnyType());
AnyType anyType = new AnyType();
typeFacade = FACADE_FACTORY.createType(anyType);
Assert.assertTrue(typeFacade.isAnyType());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsArrayType.
@Test
public void testIsArrayType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isArrayType());
BagType bagType = new BagType(null, null, false);
typeFacade = FACADE_FACTORY.createType(bagType);
Assert.assertFalse(typeFacade.isArrayType());
ArrayType arrayType = new ArrayType(null, null, String.class, false);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertTrue(typeFacade.isArrayType());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsInstanceOfPrimitiveType.
@Test
public void testIsInstanceOfPrimitiveType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isInstanceOfPrimitiveType());
StringType stringType = new StringType();
typeFacade = FACADE_FACTORY.createType(stringType);
Assert.assertFalse(typeFacade.isInstanceOfPrimitiveType());
IntegerType integerType = new IntegerType();
typeFacade = FACADE_FACTORY.createType(integerType);
Assert.assertTrue(typeFacade.isInstanceOfPrimitiveType());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testGetAssociatedEntityName.
@Test
public void testGetAssociatedEntityName() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertNull(typeFacade.getAssociatedEntityName());
EntityType entityType = new ManyToOneType("foo");
typeFacade = FACADE_FACTORY.createType(entityType);
Assert.assertEquals("foo", typeFacade.getAssociatedEntityName());
}
use of org.hibernate.type.ClassType in project jbosstools-hibernate by jbosstools.
the class TypeFacadeTest method testIsArrayType.
@Test
public void testIsArrayType() {
IType typeFacade = null;
ClassType classType = new ClassType();
typeFacade = FACADE_FACTORY.createType(classType);
Assert.assertFalse(typeFacade.isArrayType());
BagType bagType = new BagType(null, null, null, false);
typeFacade = FACADE_FACTORY.createType(bagType);
Assert.assertFalse(typeFacade.isArrayType());
ArrayType arrayType = new ArrayType(null, null, null, String.class, false);
typeFacade = FACADE_FACTORY.createType(arrayType);
Assert.assertTrue(typeFacade.isArrayType());
}
Aggregations