Package org.hibernate.search.exception

Examples of org.hibernate.search.exception.AssertionFailure


    }
    else if ( rangeContext.getTo() != null ) {
      rangeContext.setExcludeTo( true );
    }
    else {
      throw new AssertionFailure( "Both from and to clause of a range query are null" );
    }
    return this;
  }
View Full Code Here


    return (DocumentBuilderContainedEntity<T>) documentBuildersContainedEntities.get( entityType );
  }

  @Override
  public void addClasses(Class<?>... classes) {
    throw new AssertionFailure( "Cannot add classes to an " + ImmutableSearchFactory.class.getName() );
  }
View Full Code Here

        throw new SearchException( error.delete( length - 1, length ).toString() );
      }
      return termsFromText.size() == 0 ? null : termsFromText.get( 0 );
    }
    catch (IOException e) {
      throw new AssertionFailure("IO exception while reading String stream??", e);
    }
  }
View Full Code Here

  static DocumentBuilderIndexedEntity<?> getDocumentBuilder(QueryBuildingContext queryContext) {
    final SearchFactoryImplementor factory = queryContext.getFactory();
    final Class<?> type = queryContext.getEntityType();
    EntityIndexBinding indexBinding = factory.getIndexBinding( type );
    if ( indexBinding == null ) {
      throw new AssertionFailure( "Class is not indexed: " + type );
    }
    return indexBinding.getDocumentBuilder();
  }
View Full Code Here

                Work<T> work = new Work<T>(value, extractedId, WorkType.DELETE);
                entityWork = new PerEntityWork( work );
                entityById.put( extractedId, entityWork );
                break;
              default:
                throw new AssertionFailure( "Unknown action type: " + operation );
            }
            // recursion starts
            documentBuilder.appendContainedInWorkForInstance( value, WorkPlan.this, depth );
          }
          // else nothing to do as it's being processed already
View Full Code Here

  }

  public Query createQuery() {
    Query finalQuery = wrappedQuery;
    if ( wrappedQuery == null ) {
      throw new AssertionFailure( "wrapped query not set" );
    }
    finalQuery.setBoost( boost * finalQuery.getBoost() );
    if ( filter != null ) {
      finalQuery = new FilteredQuery(finalQuery, filter);
    }
View Full Code Here

      case WITH_POSITIONS:
        return Field.TermVector.WITH_POSITIONS;
      case WITH_POSITION_OFFSETS:
        return Field.TermVector.WITH_POSITIONS_OFFSETS;
      default:
        throw new AssertionFailure( "Unexpected TermVector: " + vector );
    }
  }
View Full Code Here

    }
    return fieldName;
  }

  private static String raiseAssertionOnIncorrectAnnotation(Annotation fieldAnn) {
    throw new AssertionFailure( "Cannot instances other than @Field and @Spatial. Found: " + fieldAnn.getClass() );
  }
View Full Code Here

    return subQueue;
  }

  public List<LuceneWork> getSealedQueue() {
    if ( sealedQueue == null ) {
      throw new AssertionFailure( "Access a WorkQueue which has not been sealed" );
    }
    this.sealedAndUnchanged = false;
    return sealedQueue;
  }
View Full Code Here

      return;
    }

    final ServiceProviderWrapper wrapper = managedProviders.get( serviceProviderClass );
    if ( wrapper == null ) {
      throw new AssertionFailure( "Unable to find service related to " + serviceProviderClass);
    }

    wrapper.stopVirtual();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.exception.AssertionFailure

Copyright © 2018 www.massapicom. 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.