Package org.hibernate.search.bridge.builtin.impl

Examples of org.hibernate.search.bridge.builtin.impl.NullEncodingTwoWayFieldBridge


*/
public class ClassLoadingStrategySelector {

  public static FieldCacheLoadingType guessAppropriateCollectorType(TwoWayFieldBridge fieldBridge) {
    if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
      NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
      return guessAppropriateCollectorType( encoding.unwrap() );
    }
    else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
      return FieldCacheLoadingType.STRING;
    }
    else if ( fieldBridge instanceof IntegerNumericFieldBridge ) {
View Full Code Here


   * @param fieldBridge the field bridge from which to extract (unwrap) the two way string bridge
   * @return the underlying string bridge or {@code null} if we can't extract it
   */
  public static TwoWayStringBridge getTwoWayStringBridge(TwoWayFieldBridge fieldBridge) {
    if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
      NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
      return getTwoWayStringBridge( encoding.unwrap() );
    }
    else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
      TwoWayString2FieldBridgeAdaptor adaptor = (TwoWayString2FieldBridgeAdaptor) fieldBridge;
      return adaptor.unwrap();
    }
View Full Code Here

        reflectionManager
    );

    String nullToken = determineNullToken( fieldAnnotation, configContext );
    if ( nullToken != null && fieldBridge instanceof TwoWayFieldBridge ) {
      fieldBridge = new NullEncodingTwoWayFieldBridge( (TwoWayFieldBridge) fieldBridge, nullToken );
    }
    Analyzer analyzer = determineAnalyzer( fieldAnnotation, member, configContext );

    // adjust the type analyzer
    analyzer = typeMetadataBuilder.addToScopedAnalyzer(
View Full Code Here

    }
    nullToken = indexNullAs;

    FieldBridge bridge = BridgeFactory.guessType( fieldAnn, numericFieldAnn, member, reflectionManager );
    if ( indexNullAs != null && bridge instanceof TwoWayFieldBridge ) {
      bridge = new NullEncodingTwoWayFieldBridge( (TwoWayFieldBridge) bridge, indexNullAs );
    }
    fieldBridge = bridge;

    // Field > property > entity analyzer
    Analyzer tmpAnalyzer = AnnotationProcessingHelper.getAnalyzer( fieldAnn.analyzer(), context );
View Full Code Here

*/
public class ClassLoadingStrategySelector {

  public static FieldCacheLoadingType guessAppropriateCollectorType(TwoWayFieldBridge fieldBridge) {
    if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
      NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
      return guessAppropriateCollectorType( encoding.unwrap() );
    }
    else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
      return FieldCacheLoadingType.STRING;
    }
    else if ( fieldBridge instanceof IntegerNumericFieldBridge ) {
View Full Code Here

   *
   * @return the underlying string bridge or {@code null} if we can't extract it
   */
  public static TwoWayStringBridge getTwoWayStringBridge(TwoWayFieldBridge fieldBridge) {
    if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
      NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
      return getTwoWayStringBridge( encoding.unwrap() );
    }
    else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
      TwoWayString2FieldBridgeAdaptor adaptor = (TwoWayString2FieldBridgeAdaptor ) fieldBridge;
      return adaptor.unwrap();
    }
View Full Code Here

    }
    propertiesMetadata.fieldNullTokens.add( indexNullAs );

    FieldBridge fieldBridge = BridgeFactory.guessType( fieldAnn, numericFieldAnn, member, reflectionManager );
    if ( indexNullAs != null && fieldBridge instanceof TwoWayFieldBridge ) {
      fieldBridge = new NullEncodingTwoWayFieldBridge( (TwoWayFieldBridge) fieldBridge, indexNullAs );
    }
    propertiesMetadata.fieldBridges.add( fieldBridge );

    // Field > property > entity analyzer
    Analyzer analyzer = getAnalyzer( fieldAnn.analyzer(), context );
View Full Code Here

        reflectionManager
    );

    String nullToken = determineNullToken( fieldAnnotation, configContext );
    if ( nullToken != null && fieldBridge instanceof TwoWayFieldBridge ) {
      fieldBridge = new NullEncodingTwoWayFieldBridge( (TwoWayFieldBridge) fieldBridge, nullToken );
    }
    Analyzer analyzer = determineAnalyzer( fieldAnnotation, member, configContext );

    // adjust the type analyzer
    analyzer = typeMetadataBuilder.addToScopedAnalyzer(
View Full Code Here

        reflectionManager
    );

    String nullToken = determineNullToken( fieldAnnotation, configContext );
    if ( nullToken != null && fieldBridge instanceof TwoWayFieldBridge ) {
      fieldBridge = new NullEncodingTwoWayFieldBridge( (TwoWayFieldBridge) fieldBridge, nullToken );
    }
    Analyzer analyzer = determineAnalyzer( fieldAnnotation, member, configContext );

    // adjust the type analyzer
    analyzer = typeMetadataBuilder.addToScopedAnalyzer(
View Full Code Here

                     return NumericFieldBridge.INT_FIELD_BRIDGE;
                  case STRING:
                  case BYTES:
                  case GROUP:
                  case MESSAGE:
                     return new NullEncodingTwoWayFieldBridge(new TwoWayString2FieldBridgeAdaptor(StringBridge.INSTANCE), NULL_TOKEN);
               }
               return null;
            }
         };
View Full Code Here

TOP

Related Classes of org.hibernate.search.bridge.builtin.impl.NullEncodingTwoWayFieldBridge

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.