Examples of toXClass()


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

  }

  public void testMultipleAnalyzerDiscriminatorDefinitions() throws Exception {
    SearchConfigurationFromHibernateCore searchConfig = new SearchConfigurationFromHibernateCore( cfg );
    ReflectionManager reflectionManager = searchConfig.getReflectionManager();
    XClass xclass = reflectionManager.toXClass( BlogEntry.class );
    InitContext context = new InitContext( searchConfig );
    try {
      new DocumentBuilderContainedEntity( xclass, context, reflectionManager );
      fail();
    }
View Full Code Here

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

  public XClass getIdentifierTypeIfComponent() {
    final ReflectionManager reflectionManager = mappings.getReflectionManager();
    if ( reflectionManager.equals( identifierType, void.class ) ) {
      IdClass idClass = clazz.getAnnotation( IdClass.class );
      if (idClass != null) {
        identifierType =  reflectionManager.toXClass( idClass.value() );
      }
      else {
        //find @EmbeddedId
        getElementsToProcess();
      }
View Full Code Here

Examples of org.hibernate.annotations.common.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.annotations.common.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
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      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.annotations.common.reflection.ReflectionManager.toXClass()

  }

  public void testMultipleAnalyzerDiscriminatorDefinitions() throws Exception {
    SearchConfigurationFromHibernateCore searchConfig = new SearchConfigurationFromHibernateCore( cfg );
    ReflectionManager reflectionManager = searchConfig.getReflectionManager();
    XClass xclass = reflectionManager.toXClass( BlogEntry.class );
    InitContext context = new InitContext( searchConfig );
    try {
      new DocumentBuilderContainedEntity( xclass, context, reflectionManager );
      fail();
    }
View Full Code Here

Examples of org.hibernate.annotations.common.reflection.ReflectionManager.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.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
    Class<?> aClass = cfg.getClassMapping( clazz.getName() );
    XClass rootIndex = null;
    do {
      XClass currentClazz = reflectionManager.toXClass( aClass );
      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.annotations.common.reflection.ReflectionManager.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.ReflectionManager.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.ReflectionManager.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
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.