if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
final CollectionBinder result; if ( property.isArray() ) { if ( property.getElementClass().isPrimitive() ) { result = new PrimitiveArrayBinder();
if ( property.isArray() ) { returnedClassOrElement = property.getElementClass(); isArray = true;
&& !inferredData.getProperty().isArray() ) { column.setNullable( false );
if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
XClass returnedClassOrElement = returnedClass; boolean isArray = false; if ( property.isArray() ) { returnedClassOrElement = property.getElementClass(); isArray = true;
) { CollectionBinder result; if ( property.isArray() ) { if ( property.getElementClass().isPrimitive() ) { result = new PrimitiveArrayBinder();
&& !inferredData.getProperty().isArray() ) { column.setNullable( false );
if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
if ( !p.isCollection() && !p.isArray() ) { throw new AnnotationException( "@ManyToAny used on a non collection non array property: " + p.getName() );
final CollectionBinder result; if ( property.isArray() ) { if ( property.getElementClass().isPrimitive() ) { result = new PrimitiveArrayBinder();
&& !inferredData.getProperty().isArray() ) { column.setNullable( false );
&& !inferredData.getProperty().isArray() ) { column.setNullable( false );
public void testCanBeASimpleType() { List<XProperty> declaredProperties = dadAsSeenFromSon.getDeclaredProperties( "field" ); XProperty p = getPropertyNamed_from( "fieldProperty", declaredProperties ); assertTrue( factory.equals( p.getType(), String.class ) ); assertTrue( factory.equals( p.getElementClass(), String.class ) ); assertTrue( factory.equals( p.getClassOrElementClass(), String.class ) ); assertNull( p.getCollectionClass() ); assertFalse( p.isArray() ); assertFalse( p.isCollection() ); }
&& !inferredData.getProperty().isArray() ) { column.setNullable( false );
public void testResolveInterfaceType() { List<XProperty> declaredProperties = dadAsSeenFromSon.getDeclaredProperties( "property" ); XProperty p = getPropertyNamed_from( "language", declaredProperties ); assertTrue( factory.equals( p.getType(), String.class ) ); assertTrue( factory.equals( p.getElementClass(), String.class ) ); assertTrue( factory.equals( p.getClassOrElementClass(), String.class ) ); assertNull( p.getCollectionClass() ); assertNull( p.getMapKey() ); assertFalse( p.isArray() ); assertFalse( p.isCollection() ); }
public void testCanBeAnArray() { List<XProperty> declaredProperties = dadAsSeenFromSon.getDeclaredProperties( "property" ); XProperty p = getPropertyNamed_from( "arrayProperty", declaredProperties ); assertTrue( factory.equals( p.getType(), String[].class ) ); assertTrue( factory.equals( p.getElementClass(), String.class ) ); assertTrue( factory.equals( p.getClassOrElementClass(), String.class ) ); assertNull( p.getCollectionClass() ); assertNull( p.getMapKey() ); assertTrue( p.isArray() ); assertFalse( p.isCollection() ); }
public void testCanBeAnArrayOfPrimitives() { List<XProperty> declaredProperties = dadAsSeenFromSon.getDeclaredProperties( "property" ); XProperty p = getPropertyNamed_from( "primitiveArrayProperty", declaredProperties ); assertTrue( factory.equals( p.getType(), int[].class ) ); assertTrue( factory.equals( p.getElementClass(), int.class ) ); assertTrue( factory.equals( p.getClassOrElementClass(), int.class ) ); assertNull( p.getCollectionClass() ); assertNull( p.getMapKey() ); assertTrue( p.isArray() ); assertFalse( p.isCollection() ); }
public void testCanBeACollection() { List<XProperty> declaredProperties = dadAsSeenFromSon.getDeclaredProperties( "property" ); XProperty p = getPropertyNamed_from( "collectionProperty", declaredProperties ); assertTrue( factory.equals( p.getType(), Map.class ) ); assertTrue( factory.equals( p.getElementClass(), String.class ) ); assertTrue( factory.equals( p.getClassOrElementClass(), Map.class ) ); assertTrue( factory.equals( p.getMapKey(), Double.class ) ); assertEquals( Map.class, p.getCollectionClass() ); assertFalse( p.isArray() ); assertTrue( p.isCollection() ); }