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

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


    final ConnectedTermMatchingContext field1Context = (ConnectedTermMatchingContext) monthQb
        .keyword()
        .onField( MonthClassBridge.FIELD_NAME_1 );

    final ConnectedTermMatchingContext field2Context = (ConnectedTermMatchingContext) field1Context
          .withFieldBridge( new String2FieldBridgeAdaptor( new RomanNumberFieldBridge() ) )
        .andField( MonthClassBridge.FIELD_NAME_2 );

    Query query = field2Context
          .withFieldBridge( new String2FieldBridgeAdaptor( new RomanNumberFieldBridge() ) )
          .matching( 2 )
        .createQuery();

    assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
    transaction.commit();
View Full Code Here


*/
public class MovieBridgeProvider implements BridgeProvider {
  @Override
  public FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext) {
    if ( bridgeProviderContext.getReturnType().equals( Movie.class ) ) {
      return new String2FieldBridgeAdaptor( new StringBridge() {

        @Override
        public String objectToString(Object object) {
          return ( (Movie) object ).toString();
        }
View Full Code Here

            bridge = new TwoWayString2FieldBridgeAdaptor(
                (org.hibernate.search.bridge.TwoWayStringBridge) instance
            );
          }
          else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( bridgeType ) ) {
            bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
          }
          else {
            throw LOG.noFieldBridgeInterfaceImplementedByClassBridge( bridgeType.getName() );
          }
        }
View Full Code Here

        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
      }
      else {
        throw LOG.noFieldBridgeInterfaceImplementedByFieldBridge( impl.getName(), appliedOnName );
      }
      if ( bridgeAnn.params().length > 0 && ParameterizedBridge.class.isAssignableFrom( impl ) ) {
View Full Code Here

            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 );
          }
          else {
            throw LOG.noFieldBridgeInterfaceImplementedByClassBridge( impl.getName() );
          }
          if ( cb.params().length > 0 && ParameterizedBridge.class.isAssignableFrom( impl ) ) {
View Full Code Here

        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
      }
      else {
        throw LOG.noFieldBridgeInterfaceImplementedByFieldBridge( impl.getName(), appliedOnName );
      }
      if ( bridgeAnn.params().length > 0 && ParameterizedBridge.class.isAssignableFrom( impl ) ) {
View Full Code Here

            bridge = new TwoWayString2FieldBridgeAdaptor(
                (org.hibernate.search.bridge.TwoWayStringBridge) instance
            );
          }
          else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( bridgeType ) ) {
            bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
          }
          else {
            throw LOG.noFieldBridgeInterfaceImplementedByClassBridge( bridgeType.getName() );
          }
        }
View Full Code Here

        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
      }
      else {
        throw LOG.noFieldBridgeInterfaceImplementedByFieldBridge( impl.getName(), appliedOnName );
      }
      if ( bridgeAnn.params().length > 0 && ParameterizedBridge.class.isAssignableFrom( impl ) ) {
View Full Code Here

            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 );
          }
          else {
            throw new SearchException(
                "@ClassBridge implementation implements none of the field bridge interfaces: "
                    + impl
View Full Code Here

        bridge = new TwoWayString2FieldBridgeAdaptor(
            (TwoWayStringBridge) instance
        );
      }
      else if ( org.hibernate.search.bridge.StringBridge.class.isAssignableFrom( impl ) ) {
        bridge = new String2FieldBridgeAdaptor( (org.hibernate.search.bridge.StringBridge) instance );
      }
      else {
        throw new SearchException(
            "@FieldBridge implementation implements none of the field bridge interfaces: "
                + impl + " in " + appliedOnName
View Full Code Here

TOP

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

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.