src/main/java/org/docksidestage/derby/dbflute/allcommon/DBFluteModule.java
/**
     * New DBFlute bean for invoker assistant.
     * @param beanManager The manager of CDI beans. (NotNull)
     * @return The new-created DBFlute bean. (NotNull)
     */
New DBFlute bean for invoker assistant.
@param beanManager The manager of CDI beans.
New DBFlute bean for invoker assistant . @param beanManager The manager of CDI beans .
protected DBFluteBean<org.docksidestage.derby.dbflute.allcommon.ImplementedInvokerAssistant> newDBFluteBeanOfInvokerAssistant(final BeanManager beanManager) {
        return new DBFluteBean<org.docksidestage.derby.dbflute.allcommon.ImplementedInvokerAssistant>(
                beanManager, org.docksidestage.derby.dbflute.allcommon.ImplementedInvokerAssistant.class, InvokerAssistant.class) {
            @Override
            protected void postInject(final org.docksidestage.derby.dbflute.allcommon.ImplementedInvokerAssistant instance) {
                Bean<?> bean = beanManager.resolve(beanManager.getBeans(DataSource.class, createDBFluteAnnotationLiteral()));
                if (bean == null) {
                    bean = beanManager.resolve(beanManager.getBeans(DataSource.class, createDefaultAnnotationLiteral()));
                }
                if (bean == null) {
                    throw new UnsatisfiedResolutionException(String.format(
                            "Unable to resolve a bean for '%s' with qualifiers %s or %s.",
                            DataSource.class.getName(), createDBFluteAnnotationLiteral(), createDefaultAnnotationLiteral()));
                }
                DataSource dataSource = (DataSource) beanManager.getReference(bean, bean.getBeanClass(), beanManager.createCreationalContext(bean));
                instance.setDataSource(dataSource);
            }
        };
    }
protected DBFluteBean < org . docksidestage . derby . dbflute . allcommon . ImplementedInvokerAssistant > newDBFluteBeanOfInvokerAssistant ( final BeanManager beanManager ) { return new DBFluteBean < org . docksidestage . derby . dbflute . allcommon . ImplementedInvokerAssistant > ( beanManager , org . docksidestage . derby . dbflute . allcommon . ImplementedInvokerAssistant . class , InvokerAssistant . class ) { @ Override protected void postInject ( final org . docksidestage . derby . dbflute . allcommon . ImplementedInvokerAssistant instance ) { Bean < ? > bean = beanManager . resolve ( beanManager . getBeans ( DataSource . class , createDBFluteAnnotationLiteral ( ) ) ) ; if ( bean == null ) { bean = beanManager . resolve ( beanManager . getBeans ( DataSource . class , createDefaultAnnotationLiteral ( ) ) ) ; } if ( bean == null ) { throw new UnsatisfiedResolutionException ( String . format ( "Unable to resolve a bean for '%s' with qualifiers %s or %s." , DataSource . class . getName ( ) , createDBFluteAnnotationLiteral ( ) , createDefaultAnnotationLiteral ( ) ) ) ; } DataSource dataSource = ( DataSource ) beanManager . getReference ( bean , bean . getBeanClass ( ) , beanManager . createCreationalContext ( bean ) ) ; instance . setDataSource ( dataSource ) ; } } ; }
New DBFlute bean for invoker assistant.
New DBFlute bean for invoker assistant .