Examples of AssertionFailure


Examples of org.hibernate.annotations.common.AssertionFailure

    return -1;
  }

  public void postInitialize(Set<Class<?>> indexedClasses) {
    if ( entityState == EntityState.NON_INDEXABLE )
      throw new AssertionFailure( "A non indexed entity is post processed" );
    //this method does not requires synchronization
    Class plainClass = reflectionManager.toClass( beanClass );
    Set<Class<?>> tempMappedSubclasses = new HashSet<Class<?>>();
    //together with the caller this creates a o(2), but I think it's still faster than create the up hierarchy for each class
    for (Class currentClass : indexedClasses) {
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

          bucket.add( entityInfo );
          found = true;
          break; //we stop looping for the right bucket
        }
      }
      if (!found) throw new AssertionFailure( "Could not find root entity for " + entityInfo.clazz );
    }

    //initialize objects by bucket
    for ( Map.Entry<RootEntityMetadata, List<EntityInfo>> entry : entityinfoBuckets.entrySet() ) {
      final RootEntityMetadata key = entry.getKey();
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

    public final boolean useObjectLoader;

    RootEntityMetadata(Class<?> rootEntity, SearchFactoryImplementor searchFactoryImplementor, Session session) {
      this.rootEntity = rootEntity;
      DocumentBuilder<?> provider = searchFactoryImplementor.getDocumentBuilder( rootEntity );
      if ( provider == null) throw new AssertionFailure("Provider not found for class: " + rootEntity);
      this.mappedSubclasses = provider.getMappedSubclasses();
      this.criteria = session.createCriteria( rootEntity );
      this.useObjectLoader = !provider.isSafeFromTupleId();
    }
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

        Analyzer analyzer = AnnotationProcessingHelper.getAnalyzer( member.getAnnotation( org.hibernate.search.annotations.Analyzer.class ), context );
        if ( analyzer == null ) {
          analyzer = propertiesMetadata.analyzer;
        }
        if ( analyzer == null ) {
          throw new AssertionFailure( "Analyzer should not be undefined" );
        }
        addToScopedAnalyzer( fieldName, analyzer, index );
      }
    }
  }
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

                conversionContext,
                objectInitializer
            );
            break;
          default:
            throw new AssertionFailure(
                "Unknown embedded container: "
                    + propertiesMetadata.embeddedContainers.get( i )
            );
        }
      }
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

    return (Serializable) ReflectionHelper.getMemberValue( unproxiedEntity, idGetter );
  }
 
  public String objectToString(String fieldName, Object value, ConversionContext conversionContext) {
    if ( fieldName == null ) {
      throw new AssertionFailure( "Field name should not be null" );
    }
    if ( fieldName.equals( idKeywordName ) ) {
      return objectToString( idBridge, idKeywordName, value, conversionContext );
    }
    else {
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

   */
  public AbstractDocumentBuilder(XClass xClass, ConfigContext context, Similarity similarity,
      ReflectionManager reflectionManager, Set<XClass> optimizationBlackList, InstanceInitializer instanceInitializer) {

    if ( xClass == null ) {
      throw new AssertionFailure( "Unable to build a DocumentBuilderContainedEntity with a null class" );
    }
    final Version luceneVersion = context.getLuceneMatchVersion();

    this.passThroughAnalyzer = new PassThroughAnalyzer( luceneVersion );
    this.instanceInitializer = instanceInitializer;
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

  public void postInitialize(Set<Class<?>> indexedClasses) {
    //we initialize only once because we no longer have a reference to the reflectionManager
    //in theory
    Class<?> plainClass = beanClass;
    if ( entityState == EntityState.NON_INDEXABLE ) {
      throw new AssertionFailure( "A non indexed entity is post processed" );
    }
    Set<Class<?>> tempMappedSubclasses = new HashSet<Class<?>>();
    //together with the caller this creates a o(2), but I think it's still faster than create the up hierarchy for each class
    for ( Class<?> currentClass : indexedClasses ) {
      if ( plainClass != currentClass && plainClass.isAssignableFrom( currentClass ) ) {
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

    Analyzer analyzer = AnnotationProcessingHelper.getAnalyzer( ann.analyzer(), context );
    if ( analyzer == null ) {
      analyzer = propertiesMetadata.analyzer;
    }
    if ( analyzer == null ) {
      throw new AssertionFailure( "Analyzer should not be undefined" );
    }
    addToScopedAnalyzer( fieldName, analyzer, index );
  }
View Full Code Here

Examples of org.hibernate.annotations.common.AssertionFailure

    propertiesMetadata.classBridges.add( spatialBridge );
    propertiesMetadata.classBoosts.add( ann.boost().value() );

    Analyzer analyzer = propertiesMetadata.analyzer;
    if ( analyzer == null ) {
      throw new AssertionFailure( "Analyzer should not be undefined" );
    }
  }
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.