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

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


      Object instance = impl.newInstance();
      if ( FieldBridge.class.isAssignableFrom( impl ) ) {
        bridge = (FieldBridge) instance;
      }
      else if ( TwoWayStringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
View Full Code Here


    if ( fieldBridge instanceof NullEncodingTwoWayFieldBridge ) {
      NullEncodingTwoWayFieldBridge encoding = (NullEncodingTwoWayFieldBridge) fieldBridge;
      return getTwoWayStringBridge( encoding.unwrap() );
    }
    else if ( fieldBridge instanceof TwoWayString2FieldBridgeAdaptor ) {
      TwoWayString2FieldBridgeAdaptor adaptor = (TwoWayString2FieldBridgeAdaptor) fieldBridge;
      return adaptor.unwrap();
    }
    else {
      return null;
    }
  }
View Full Code Here

      providedIdFieldBridge = BridgeFactory.extractTwoWayType( provided.bridge(), clazz, reflectionManager );
      providedIdFieldName = provided.name();
      idProvided = true;
    }
    else if ( context.isProvidedIdImplicit() ) {
      providedIdFieldBridge = new TwoWayString2FieldBridgeAdaptor( org.hibernate.search.bridge.builtin.StringBridge.INSTANCE );
      providedIdFieldName = ProvidedId.defaultFieldName;
      idProvided = true;
    }

    if ( idProvided ) {
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

          Object instance = impl.newInstance();
          if ( FieldBridge.class.isAssignableFrom( impl ) ) {
            bridge = (FieldBridge) instance;
          }
          else if ( org.hibernate.search.bridge.TwoWayStringBridge.class.isAssignableFrom( impl ) ) {
            bridge = new TwoWayString2FieldBridgeAdaptor(
                (org.hibernate.search.bridge.TwoWayStringBridge) instance
            );
          }
          else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
            bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
View Full Code Here

      if ( bridge == null && returnType.isEnum() ) {
        //we return one enum type bridge instance per property as it is customized per ReturnType
        @SuppressWarnings("unchecked")
        final EnumBridge enumBridge = new EnumBridge();
        populateReturnType( reflectionManager.toClass( member.getType() ), EnumBridge.class, enumBridge );
        bridge = new TwoWayString2FieldBridgeAdaptor( enumBridge );
      }
    }
    //TODO add classname
    if ( bridge == null ) {
      throw new SearchException( "Unable to guess FieldBridge for " + member.getName() );
View Full Code Here

      Object instance = impl.newInstance();
      if ( FieldBridge.class.isAssignableFrom( impl ) ) {
        bridge = (FieldBridge) instance;
      }
      else if ( TwoWayStringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
View Full Code Here

          Object instance = impl.newInstance();
          if ( FieldBridge.class.isAssignableFrom( impl ) ) {
            bridge = (FieldBridge) instance;
          }
          else if ( org.hibernate.search.bridge.TwoWayStringBridge.class.isAssignableFrom( impl ) ) {
            bridge = new TwoWayString2FieldBridgeAdaptor(
                (org.hibernate.search.bridge.TwoWayStringBridge) instance
            );
          }
          else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
            bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
View Full Code Here

      if ( bridge == null && returnType.isEnum() ) {
        //we return one enum type bridge instance per property as it is customized per ReturnType
        @SuppressWarnings("unchecked")
        final EnumBridge enumBridge = new EnumBridge();
        populateReturnType( reflectionManager.toClass( member.getType() ), EnumBridge.class, enumBridge );
        bridge = new TwoWayString2FieldBridgeAdaptor( enumBridge );
      }
      if ( bridge == null && isAnnotatedWithIndexEmbedded( member )) {
        bridge = guessEmbeddedFieldBridge( member, reflectionManager );
      }
    }
View Full Code Here

      Object instance = impl.newInstance();
      if ( FieldBridge.class.isAssignableFrom( impl ) ) {
        bridge = (FieldBridge) instance;
      }
      else if ( TwoWayStringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
View Full Code Here

TOP

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

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.