Package org.hibernate.search.annotations

Examples of org.hibernate.search.annotations.CacheFromIndex


      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
      }
      this.fieldCacheUsage = Collections.unmodifiableSet( enabledTypes );
View Full Code Here


      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
      }
      this.fieldCacheUsage = Collections.unmodifiableSet( enabledTypes );
View Full Code Here

      throw log.noDocumentIdFoundException( clazz.getName() );
    }

    idFieldName = idPropertyMetadata.getFieldMetadata().iterator().next().getName();

    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException(
            "CacheFromIndex configured with conflicting parameters:" +
                " if FieldCacheType.NOTHING is enabled, no other options can be added"
        );
View Full Code Here

      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      for ( org.hibernate.search.annotations.FieldCacheType t : fieldCacheOptions.value() ) {
        enabledTypes.add( t );
      }
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
View Full Code Here

      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<FieldCacheType> enabledTypes = EnumSet.noneOf( FieldCacheType.class );
      for (FieldCacheType t : fieldCacheOptions.value() ) {
        enabledTypes.add( t );
      }
      if ( enabledTypes.size() != 1 && enabledTypes.contains( FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
View Full Code Here

      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
      }
      this.fieldCacheUsage = Collections.unmodifiableSet( enabledTypes );
View Full Code Here

      throw log.noDocumentIdFoundException( clazz.getName() );
    }

    idFieldName = idPropertyMetadata.getFieldMetadata().iterator().next().getName();

    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException(
            "CacheFromIndex configured with conflicting parameters:" +
                " if FieldCacheType.NOTHING is enabled, no other options can be added"
        );
View Full Code Here

      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
      }
      this.fieldCacheUsage = Collections.unmodifiableSet( enabledTypes );
View Full Code Here

      throw log.noDocumentIdFoundException( clazz.getName() );
    }

    idFieldName = idPropertyMetadata.getFieldMetadata().iterator().next().getName();

    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException(
            "CacheFromIndex configured with conflicting parameters:" +
                " if FieldCacheType.NOTHING is enabled, no other options can be added"
        );
View Full Code Here

      idProvided = true;
    }
    if ( idKeywordName == null ) {
      throw new SearchException( "No document id in: " + clazz );
    }
    CacheFromIndex fieldCacheOptions = clazz.getAnnotation( CacheFromIndex.class );
    if ( fieldCacheOptions == null ) {
      this.fieldCacheUsage = Collections.unmodifiableSet( EnumSet.of( org.hibernate.search.annotations.FieldCacheType.CLASS ) );
    }
    else {
      EnumSet<org.hibernate.search.annotations.FieldCacheType> enabledTypes = EnumSet.noneOf( org.hibernate.search.annotations.FieldCacheType.class );
      Collections.addAll( enabledTypes, fieldCacheOptions.value() );
      if ( enabledTypes.size() != 1 && enabledTypes.contains( org.hibernate.search.annotations.FieldCacheType.NOTHING ) ) {
        throw new SearchException( "CacheFromIndex configured with conflicting parameters:" +
            " if FieldCacheType.NOTHING is enabled, no other options can be added" );
      }
      this.fieldCacheUsage = Collections.unmodifiableSet( enabledTypes );
View Full Code Here

TOP

Related Classes of org.hibernate.search.annotations.CacheFromIndex

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.