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

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


            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

      indexedEntityBridges.put( "id", new TwoWayString2FieldBridgeAdaptor( new StringBridge() ) );
      indexedEntityBridges.put( "name", new NullEncodingTwoWayFieldBridge( new TwoWayString2FieldBridgeAdaptor( new StringBridge() ), "_null_" ) );
      indexedEntityBridges.put( "position", NumericFieldBridge.LONG_FIELD_BRIDGE );
      indexedEntityBridges.put( "title", new TwoWayString2FieldBridgeAdaptor( new StringBridge() ) );
      indexedEntityBridges.put( "author", new NullEncodingFieldBridge( new String2FieldBridgeAdaptor( DefaultStringBridge.INSTANCE ), "_null_" ) );
      indexedEntityBridges.put( "author.name", new TwoWayString2FieldBridgeAdaptor( new StringBridge() ) );

      bridgesByType.put( "IndexedEntity", indexedEntityBridges );
    }
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( 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

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

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

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

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

    ConnectedTermMatchingContext termMatchingContext = (ConnectedTermMatchingContext) monthQb
        .keyword()
        .onField( MonthClassBridge.FIELD_NAME_1 );

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

    assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );
    transaction.commit();
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.