public class BambooSpringUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
autowireComponent(org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory,
T o)
Autowires the supplied objects and returns it for easy chaining.
|
static <T> T |
autowireComponent(T object)
Autowires the supplied objects and returns it for easy chaining.
|
static org.springframework.transaction.support.TransactionTemplate |
clone(org.springframework.transaction.support.TransactionTemplate transactionTemplate,
Boolean requiresNewTx,
Boolean readOnly)
Clones the supplied template, with the supplied parameters modified (or kept as-is, if null)
|
static <T> T |
createCompleteComponent(Class<T> objectClass)
Creates a new Spring bean of the given class.
|
static org.springframework.transaction.support.TransactionTemplate |
readOnly(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
If the supplied template creates readonly transactions, returns it.
|
static org.springframework.transaction.support.TransactionTemplate |
readOnlyClone(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Clones the supplied template.
|
static org.springframework.transaction.support.TransactionTemplate |
requiresNew(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
If the supplied template creates is set to REQUIRES_NEW, returns it.
|
static org.springframework.transaction.support.TransactionTemplate |
requiresNewClone(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Clones the supplied template.
|
static Object |
unwrapIfProxy(Object bean) |
@NotNull public static org.springframework.transaction.support.TransactionTemplate readOnly(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate)
@NotNull public static org.springframework.transaction.support.TransactionTemplate readOnlyClone(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate)
@NotNull public static org.springframework.transaction.support.TransactionTemplate requiresNew(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate)
@NotNull public static org.springframework.transaction.support.TransactionTemplate requiresNewClone(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate)
@NotNull public static org.springframework.transaction.support.TransactionTemplate clone(@NotNull org.springframework.transaction.support.TransactionTemplate transactionTemplate, @Nullable Boolean requiresNewTx, @Nullable Boolean readOnly)
public static Object unwrapIfProxy(@NotNull Object bean) throws Exception
Exception
public static <T> T autowireComponent(T object)
public static <T> T autowireComponent(@NotNull org.springframework.beans.factory.config.AutowireCapableBeanFactory beanFactory, @NotNull T o)
@NotNull public static <T> T createCompleteComponent(@NotNull Class<T> objectClass)
T
- type of the componentobjectClass
- class of the object to be created as a Spring componentCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.