Package org.hibernate.annotations.common

Examples of org.hibernate.annotations.common.AssertionFailure


      case TOKENIZED:
        return Field.Index.ANALYZED;
      case UN_TOKENIZED:
        return Field.Index.NOT_ANALYZED;
      default:
        throw new AssertionFailure( "Unexpected Index: " + index );
    }
  }
View Full Code Here


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

  public Set<DirectoryProvider<?>> getDirectoryProviders() {
    return this.dirProviderData.keySet();
  }

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

  public Worker getWorker() {
    return worker;
  }

  public void setBackendQueueProcessorFactory(BackendQueueProcessorFactory backendQueueProcessorFactory) {
    throw new AssertionFailure( "ImmutableSearchFactory is immutable: should never be called" );
  }
View Full Code Here

  public final List executeLoad(EntityInfo... entityInfos) {
    if ( entityInfos.length == 0 ) {
      return Collections.EMPTY_LIST;
    }
    if ( entityType == null ) {
      throw new AssertionFailure( "EntityType not defined" );
    }
    if ( criteria == null ) {
      criteria = session.createCriteria( entityType );
    }
View Full Code Here

            termContext.getThreshold(),
            termContext.getPrefixLength()
        );
        break;
      default:
        throw new AssertionFailure( "Unknown approximation: " + termContext.getApproximation() );
    }
    return query;
  }
View Full Code Here

    else {
      try {
        terms = Helper.getAllTermsFromText( fieldName, localText, analyzer );
      }
      catch ( IOException e ) {
        throw new AssertionFailure( "IO exception while reading String stream??", e );
      }
    }
    return terms;
  }
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();
    DocumentBuilderIndexedEntity<?> builder = factory.getDocumentBuilderIndexedEntity( type );
    if ( builder == null ) {
      throw new AssertionFailure( "Class in not indexed: " + type );
    }
    return builder;
  }
View Full Code Here

    }
  }

  public static void assertTrue(boolean condition, String message) {
    if ( !condition ) {
      throw new AssertionFailure( message );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.annotations.common.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.