@Test public void return_type_method() { ReturnTypeService delegate = newTestService(); HibernateSessionManager manager = newMock(HibernateSessionManager.class); HibernateTransactionDecorator decorator = newHibernateSessionManagerDecorator(manager); ReturnTypeService interceptor = decorator.build(ReturnTypeService.class, delegate, "foo.Bar"); delegate.returnTypeMethod(); manager.commit(); replay(); Assert.assertEquals(interceptor.returnTypeMethod(), "Foo"); verify(); }
@Override public <T> T build(Class<T> serviceInterface, T delegate, String serviceId) { assert serviceInterface != null; assert delegate != null; assert InternalUtils.isNonBlank(serviceId); String description = String.format("<Hibernate Transaction interceptor for %s(%s)>", serviceId, serviceInterface.getName()); AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, description); advisor.addTransactionCommitAdvice(builder); return builder.build(); }
HibernateTransactionDecoratorImpl implements HibernateTransactionDecorator { @Override public <T> T build(Class<T> serviceInterface, T delegate, String serviceId) { assert serviceInterface != null; assert delegate != null; assert InternalUtils.isNonBlank(serviceId); String description = String.format("<Hibernate Transaction interceptor for %s(%s)>", serviceId, serviceInterface.getName()); AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, description); advisor.addTransactionCommitAdvice(builder); return builder.build(); } }
HibernateTransactionDecoratorImpl implements HibernateTransactionDecorator { @Override public <T> T build(Class<T> serviceInterface, T delegate, String serviceId) { assert serviceInterface != null; assert delegate != null; assert InternalUtils.isNonBlank(serviceId); String description = String.format("<Hibernate Transaction interceptor for %s(%s)>", serviceId, serviceInterface.getName()); AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, description); advisor.addTransactionCommitAdvice(builder); return builder.build(); } HibernateTransactionDecoratorImpl(AspectDecorator aspectDecorator, HibernateTransactionAdvisor advisor); }
HibernateTransactionDecoratorImpl implements HibernateTransactionDecorator { @Override public <T> T build(Class<T> serviceInterface, T delegate, String serviceId) { assert serviceInterface != null; assert delegate != null; assert InternalUtils.isNonBlank(serviceId); String description = String.format("<Hibernate Transaction interceptor for %s(%s)>", serviceId, serviceInterface.getName()); AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, description); advisor.addTransactionCommitAdvice(builder); return builder.build(); } HibernateTransactionDecoratorImpl(AspectDecorator aspectDecorator, HibernateTransactionAdvisor advisor); @Override T build(Class<T> serviceInterface, T delegate, String serviceId); }
HibernateTransactionDecoratorImpl implements HibernateTransactionDecorator { @Override public <T> T build(Class<T> serviceInterface, T delegate, String serviceId) { assert serviceInterface != null; assert delegate != null; assert InternalUtils.isNonBlank(serviceId); String description = String.format("<Hibernate Transaction interceptor for %s(%s)>", serviceId, serviceInterface.getName()); AspectInterceptorBuilder<T> builder = aspectDecorator.createBuilder(serviceInterface, delegate, description); advisor.addTransactionCommitAdvice(builder); return builder.build(); } HibernateTransactionDecoratorImpl(AspectDecorator aspectDecorator, HibernateTransactionAdvisor advisor); @Override T build(Class<T> serviceInterface, T delegate, String serviceId);  }