Examples of toXClass()


Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

public class UnorderedIdScanTest {

  @Test
  public void naturalSortAnnotationsRead() {
    ReflectionManager reflectionManager = new JavaReflectionManager();
    XClass mappedXClass = reflectionManager.toXClass( PersonWithBrokenSocialSecurityNumber.class );
    tryCreatingDocumentBuilder( mappedXClass, reflectionManager );
    //No assertions needed: we just verify the previous statements won't throw an exception
  }

  @Test
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

  }

  @Test
  public void invertedSortAnnotationsRead() {
    JavaReflectionManager reflectionManager = new TrickedJavaReflectionManager( PersonWithBrokenSocialSecurityNumber.class );
    XClass mappedXClass = reflectionManager.toXClass( PersonWithBrokenSocialSecurityNumber.class );
    XClass reverted = new DeclaredMethodsReverter( mappedXClass );
    tryCreatingDocumentBuilder( reverted, reflectionManager );
    //No assertions needed: we just verify the previous statements won't throw an exception
  }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

  public void testIsSearchEnabled() throws Exception {
    ReflectionManager reflectionManager = new JavaReflectionManager();

    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( A.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( B.class ) )
    );
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( A.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( B.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( C.class ) )
    );
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( B.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( C.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( D.class ) )
    );
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( C.class ) )
    );
    assertTrue(
        "Should be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( D.class ) )
    );

    assertFalse(
        "Should not be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( E.class ) )
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( D.class ) )
    );

    assertFalse(
        "Should not be a search enabled class",
        ReflectionHelper.containsSearchAnnotations( reflectionManager.toXClass( E.class ) )
    );
  }

  public class A {
    @Field
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.java.JavaReflectionManager.toXClass()

    public J<Object[]> thisOneUsedToCauseProblems;
  }
 
  public void testANN612IssueIsFixed() throws Exception {
    JavaReflectionManager factory = new JavaReflectionManager();
    XClass clazz = factory.toXClass( C.class );
    List<XProperty> properties = clazz.getDeclaredProperties( XClass.ACCESS_FIELD );
    for( XProperty property : properties )
      assertTrue( property.isTypeResolved() );
  }
}
View Full Code Here

Examples of org.hibernate.reflection.ReflectionManager.toXClass()

    //if none extract the name from the most generic (superclass > subclass) @Indexed class in the hierarchy
    //FIXME I'm inclined to get rid of the default value
    PersistentClass pc = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( pc.getMappedClass() );
      Indexed indexAnn = currentClazz.getAnnotation( Indexed.class );
      if ( indexAnn != null ) {
        if ( indexAnn.index().length() != 0 ) {
          return indexAnn.index();
        }
View Full Code Here

Examples of org.hibernate.reflection.java.JavaXFactory.toXClass()

* @author Emmanuel Bernard
*/
public class DeepGenericsInheritance extends TestCase {
  public void test2StepsGenerics() throws Exception {
    JavaXFactory factory = new JavaXFactory();
    XClass subclass2 = factory.toXClass( Subclass2.class );
    XClass dummySubclass = factory.toXClass( DummySubclass.class );
    XClass superclass = subclass2.getSuperclass();
    XClass supersuperclass = superclass.getSuperclass();
    assertTrue( supersuperclass.getDeclaredProperties( "field" ).get( 1 ).isTypeResolved() );
    assertEquals( dummySubclass, supersuperclass.getDeclaredProperties( "field" ).get( 1 ).getType() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.