@Override public BeanHolder<T> getBean(BeanProvider beanProvider) { return BeanHolder.of( instance ); }
@Override public BeanHolder<T> getBean(BeanProvider beanProvider) { return BeanHolder.of( instance ); }
@Override public BeanHolder<PropertyBridge> build(BridgeBuildContext buildContext) { if ( fieldName == null || fieldName.isEmpty() ) { throw new IllegalArgumentException( "fieldName is a mandatory parameter" ); } return BeanHolder.of( new MultiKeywordStringBridge( this ) ); } }
@Override public BeanHolder<? extends GeoPointBridge> build(BridgeBuildContext buildContext) { return BeanHolder.of( new GeoPointBridge( fieldName, projectable, markerSet ) ); } }
@Override public BeanHolder<? extends GeoPointBridge> build(BridgeBuildContext buildContext) { return BeanHolder.of( new GeoPointBridge( fieldName, projectable, markerSet ) ); } }
@Override public <T> BeanHolder<T> resolve(Class<T> typeReference) { return BeanHolder.of( resolveNoClosingNecessary( typeReference ) ); }
@Override public <T> BeanHolder<T> resolve(Class<T> typeReference, String implementationFullyQualifiedClassName) { return BeanHolder.of( resolveNoClosingNecessary( typeReference, implementationFullyQualifiedClassName ) ); }
@Override public <T> BeanHolder<T> resolve(Class<T> typeReference) { return BeanHolder.of( resolveNoClosingNecessary( typeReference ) ); }
@Override public <T> BeanHolder<T> resolve(Class<T> typeReference, String implementationFullyQualifiedClassName) { return BeanHolder.of( resolveNoClosingNecessary( typeReference, implementationFullyQualifiedClassName ) ); }
@Override public void configure(BeanConfigurationContext context) { context.define( BackendFactory.class, "lucene", factoryCreationContext -> BeanHolder.of( new LuceneBackendFactory() ) ); } }
@Override public void configure(BeanConfigurationContext context) { context.define( BackendFactory.class, "elasticsearch", factoryCreationContext -> BeanHolder.of( new ElasticsearchBackendFactory() ) ); } }
@Override public void configure(BeanConfigurationContext context) { context.define( BackendFactory.class, "elasticsearch", factoryCreationContext -> BeanHolder.of( new ElasticsearchBackendFactory() ) ); } }
public BridgeResolver(TypePatternMatcherFactory typePatternMatcherFactory) { // TODO add an extension point to override these maps, or at least to add defaults for other types // TODO add defaults for other types (byte, char, Characeter, Double, double, boolean, Boolean, ...) TypePatternMatcher concreteEnumPattern = typePatternMatcherFactory.createRawSuperTypeMatcher( Enum.class ) .and( typePatternMatcherFactory.createExactRawTypeMatcher( Enum.class ).negate() ); addIdentifierBridgeForExactRawType( Integer.class, ignored -> BeanHolder.of( new DefaultIntegerIdentifierBridge() ) ); addIdentifierBridgeForExactRawType( Long.class, ignored -> BeanHolder.of( new DefaultLongIdentifierBridge() ) ); addIdentifierBridgeForTypePattern( concreteEnumPattern, ignored -> BeanHolder.of( new DefaultEnumIdentifierBridge<>() ) ); addValueBridgeForExactRawType( Integer.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Integer.class ) ) ); addValueBridgeForExactRawType( Long.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Long.class ) ) ); addValueBridgeForExactRawType( Boolean.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Boolean.class ) ) ); addValueBridgeForExactRawType( String.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( String.class ) ) ); addValueBridgeForExactRawType( LocalDate.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( LocalDate.class ) ) ); addValueBridgeForExactRawType( Instant.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Instant.class ) ) ); addValueBridgeForExactRawType( Date.class, ignored -> BeanHolder.of( new DefaultJavaUtilDateValueBridge() ) ); addValueBridgeForTypePattern( concreteEnumPattern, ignored -> BeanHolder.of( new DefaultEnumValueBridge<>() ) ); }
public BridgeResolver(TypePatternMatcherFactory typePatternMatcherFactory) { // TODO add an extension point to override these maps, or at least to add defaults for other types // TODO add defaults for other types (byte, char, Characeter, Double, double, boolean, Boolean, ...) TypePatternMatcher concreteEnumPattern = typePatternMatcherFactory.createRawSuperTypeMatcher( Enum.class ) .and( typePatternMatcherFactory.createExactRawTypeMatcher( Enum.class ).negate() ); addIdentifierBridgeForExactRawType( Integer.class, ignored -> BeanHolder.of( new DefaultIntegerIdentifierBridge() ) ); addIdentifierBridgeForExactRawType( Long.class, ignored -> BeanHolder.of( new DefaultLongIdentifierBridge() ) ); addIdentifierBridgeForTypePattern( concreteEnumPattern, ignored -> BeanHolder.of( new DefaultEnumIdentifierBridge<>() ) ); addValueBridgeForExactRawType( Integer.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Integer.class ) ) ); addValueBridgeForExactRawType( Long.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Long.class ) ) ); addValueBridgeForExactRawType( Boolean.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Boolean.class ) ) ); addValueBridgeForExactRawType( String.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( String.class ) ) ); addValueBridgeForExactRawType( LocalDate.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( LocalDate.class ) ) ); addValueBridgeForExactRawType( Instant.class, ignored -> BeanHolder.of( new PassThroughValueBridge<>( Instant.class ) ) ); addValueBridgeForExactRawType( Date.class, ignored -> BeanHolder.of( new DefaultJavaUtilDateValueBridge() ) ); addValueBridgeForTypePattern( concreteEnumPattern, ignored -> BeanHolder.of( new DefaultEnumValueBridge<>() ) ); }
beanHolders.add( reference.getBean( this ) ); return BeanHolder.of( beanHolders );
beanHolders.add( reference.getBean( this ) ); return BeanHolder.of( beanHolders );