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


      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

    if ( providedId != null ) {
      providedIdFieldBridge = bridgeFactory.extractTwoWayType( providedId.bridge(), clazz, reflectionManager );
      providedIdFieldName = providedId.name();
    }
    else {
      providedIdFieldBridge = new TwoWayString2FieldBridgeAdaptor( org.hibernate.search.bridge.builtin.StringBridge.INSTANCE );
      providedIdFieldName = ProvidedId.defaultFieldName;
    }

    DocumentFieldMetadata fieldMetadata =
        new DocumentFieldMetadata.Builder(
View Full Code Here

  private final Map<String, BuiltinMapBridge> numericMapBridges;
  private final Map<String, BuiltinArrayBridge> numericArrayBridges;
  private final Map<String, BuiltinIterableBridge> numericIterableBridges;

  public BridgeFactory(ServiceManager serviceManager) {
    CHARACTER = new TwoWayString2FieldBridgeAdaptor( new CharacterBridge() );
    DOUBLE = new TwoWayString2FieldBridgeAdaptor( new DoubleBridge() );
    FLOAT = new TwoWayString2FieldBridgeAdaptor( new FloatBridge() );
    SHORT = new TwoWayString2FieldBridgeAdaptor( new ShortBridge() );
    INTEGER = new TwoWayString2FieldBridgeAdaptor( new IntegerBridge() );
    LONG = new TwoWayString2FieldBridgeAdaptor( new LongBridge() );
    BIG_INTEGER = new TwoWayString2FieldBridgeAdaptor( new BigIntegerBridge() );
    BIG_DECIMAL = new TwoWayString2FieldBridgeAdaptor( new BigDecimalBridge() );
    STRING = new TwoWayString2FieldBridgeAdaptor( new StringBridge() );
    BOOLEAN = new TwoWayString2FieldBridgeAdaptor( new BooleanBridge() );
    CLAZZ = new TwoWayString2FieldBridgeAdaptor( new org.hibernate.search.bridge.builtin.ClassBridge(serviceManager) );
    Url = new TwoWayString2FieldBridgeAdaptor( new UrlBridge() );
    Uri = new TwoWayString2FieldBridgeAdaptor( new UriBridge() );
    UUID = new TwoWayString2FieldBridgeAdaptor( new UUIDBridge() );

    DATE_YEAR = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_YEAR );
    DATE_MONTH = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_MONTH );
    DATE_DAY = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_DAY );
    DATE_HOUR = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_HOUR );
    DATE_MINUTE = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_MINUTE );
    DATE_SECOND = new TwoWayString2FieldBridgeAdaptor( DateBridge.DATE_SECOND );

    ITERABLE_DATE_YEAR = new BuiltinIterableBridge( DATE_YEAR );
    ITERABLE_DATE_MONTH = new BuiltinIterableBridge( DATE_MONTH );
    ITERABLE_DATE_DAY = new BuiltinIterableBridge( DATE_DAY );
    ITERABLE_DATE_HOUR = new BuiltinIterableBridge( DATE_HOUR );
    ITERABLE_DATE_MINUTE = new BuiltinIterableBridge( DATE_MINUTE );
    ITERABLE_DATE_SECOND = new BuiltinIterableBridge( DATE_SECOND );

    MAP_DATE_YEAR = new BuiltinMapBridge( DATE_YEAR );
    MAP_DATE_MONTH = new BuiltinMapBridge( DATE_MONTH );
    MAP_DATE_DAY = new BuiltinMapBridge( DATE_DAY );
    MAP_DATE_HOUR = new BuiltinMapBridge( DATE_HOUR );
    MAP_DATE_MINUTE = new BuiltinMapBridge( DATE_MINUTE );
    MAP_DATE_SECOND = new BuiltinMapBridge( DATE_SECOND );

    ARRAY_DATE_YEAR = new BuiltinArrayBridge( DATE_YEAR );
    ARRAY_DATE_MONTH = new BuiltinArrayBridge( DATE_MONTH );
    ARRAY_DATE_DAY = new BuiltinArrayBridge( DATE_DAY );
    ARRAY_DATE_HOUR = new BuiltinArrayBridge( DATE_HOUR );
    ARRAY_DATE_MINUTE = new BuiltinArrayBridge( DATE_MINUTE );
    ARRAY_DATE_SECOND = new BuiltinArrayBridge( DATE_SECOND );

    CALENDAR_YEAR = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_YEAR );
    CALENDAR_MONTH = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_MONTH );
    CALENDAR_DAY = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_DAY );
    CALENDAR_HOUR = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_HOUR );
    CALENDAR_MINUTE = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_MINUTE );
    CALENDAR_SECOND = new TwoWayString2FieldBridgeAdaptor( CalendarBridge.CALENDAR_SECOND );

    ITERABLE_CALENDAR_YEAR = new BuiltinIterableBridge( CALENDAR_YEAR );
    ITERABLE_CALENDAR_MONTH = new BuiltinIterableBridge( CALENDAR_MONTH );
    ITERABLE_CALENDAR_DAY = new BuiltinIterableBridge( CALENDAR_DAY );
    ITERABLE_CALENDAR_HOUR = new BuiltinIterableBridge( CALENDAR_HOUR );
    ITERABLE_CALENDAR_MINUTE = new BuiltinIterableBridge( CALENDAR_MINUTE );
    ITERABLE_CALENDAR_SECOND = new BuiltinIterableBridge( CALENDAR_SECOND );

    MAP_CALENDAR_YEAR = new BuiltinMapBridge( CALENDAR_YEAR );
    MAP_CALENDAR_MONTH = new BuiltinMapBridge( CALENDAR_MONTH );
    MAP_CALENDAR_DAY = new BuiltinMapBridge( CALENDAR_DAY );
    MAP_CALENDAR_HOUR = new BuiltinMapBridge( CALENDAR_HOUR );
    MAP_CALENDAR_MINUTE = new BuiltinMapBridge( CALENDAR_MINUTE );
    MAP_CALENDAR_SECOND = new BuiltinMapBridge( CALENDAR_SECOND );

    ARRAY_CALENDAR_YEAR = new BuiltinArrayBridge( CALENDAR_YEAR );
    ARRAY_CALENDAR_MONTH = new BuiltinArrayBridge( CALENDAR_MONTH );
    ARRAY_CALENDAR_DAY = new BuiltinArrayBridge( CALENDAR_DAY );
    ARRAY_CALENDAR_HOUR = new BuiltinArrayBridge( CALENDAR_HOUR );
    ARRAY_CALENDAR_MINUTE = new BuiltinArrayBridge( CALENDAR_MINUTE );
    ARRAY_CALENDAR_SECOND = new BuiltinArrayBridge( CALENDAR_SECOND );

    ITERABLE_BRIDGE = new BuiltinIterableBridge();
    ITERABLE_BRIDGE_DOUBLE = new BuiltinIterableBridge( NumericFieldBridge.DOUBLE_FIELD_BRIDGE );
    ITERABLE_BRIDGE_FLOAT = new BuiltinIterableBridge( NumericFieldBridge.FLOAT_FIELD_BRIDGE );
    ITERABLE_BRIDGE_INT = new BuiltinIterableBridge( NumericFieldBridge.INT_FIELD_BRIDGE );
    ITERABLE_BRIDGE_LONG = new BuiltinIterableBridge( NumericFieldBridge.LONG_FIELD_BRIDGE );

    ARRAY_BRIDGE = new BuiltinArrayBridge();
    ARRAY_BRIDGE_DOUBLE = new BuiltinArrayBridge( NumericFieldBridge.DOUBLE_FIELD_BRIDGE );
    ARRAY_BRIDGE_FLOAT = new BuiltinArrayBridge( NumericFieldBridge.FLOAT_FIELD_BRIDGE );
    ARRAY_BRIDGE_INT = new BuiltinArrayBridge( NumericFieldBridge.INT_FIELD_BRIDGE );
    ARRAY_BRIDGE_LONG = new BuiltinArrayBridge( NumericFieldBridge.LONG_FIELD_BRIDGE );

    MAP_BRIDGE = new BuiltinMapBridge();
    MAP_BRIDGE_DOUBLE = new BuiltinMapBridge( NumericFieldBridge.DOUBLE_FIELD_BRIDGE );
    MAP_BRIDGE_FLOAT = new BuiltinMapBridge( NumericFieldBridge.FLOAT_FIELD_BRIDGE );
    MAP_BRIDGE_INT = new BuiltinMapBridge( NumericFieldBridge.INT_FIELD_BRIDGE );
    MAP_BRIDGE_LONG = new BuiltinMapBridge( NumericFieldBridge.LONG_FIELD_BRIDGE );

    DATE_MILLISECOND = new TwoWayString2FieldBridgeAdaptor(DateBridge.DATE_MILLISECOND );

    ARRAY_DATE_MILLISECOND = new BuiltinArrayBridge( DATE_MILLISECOND );
    ITERABLE_DATE_MILLISECOND = new BuiltinIterableBridge( DATE_MILLISECOND );
    MAP_DATE_MILLISECOND = new BuiltinMapBridge( DATE_MILLISECOND );

    CALENDAR_MILLISECOND = new TwoWayString2FieldBridgeAdaptor(CalendarBridge.CALENDAR_MILLISECOND );

    ARRAY_CALENDAR_MILLISECOND = new BuiltinArrayBridge( CALENDAR_MILLISECOND );
    ITERABLE_CALENDAR_MILLISECOND = new BuiltinIterableBridge( CALENDAR_MILLISECOND );
    MAP_CALENDAR_MILLISECOND = new BuiltinMapBridge( CALENDAR_MILLISECOND );
View Full Code Here

          Object instance = bridgeType.newInstance();
          if ( FieldBridge.class.isAssignableFrom( bridgeType ) ) {
            bridge = (FieldBridge) instance;
          }
          else if ( org.hibernate.search.bridge.TwoWayStringBridge.class.isAssignableFrom( bridgeType ) ) {
            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 );
View Full Code Here

      bridge = builtInBridges.get( returnType.getName() );
      if ( bridge == null && returnType.isEnum() ) {
        //we return one enum type bridge instance per property as it is customized per ReturnType
        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.