TransactionAttributeSource implementation that
allows attributes to be stored per method in a Map.
isMatch, NameMatchTransactionAttributeSource
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private boolean | |
| private StringValueResolver | |
| private boolean | |
| protected final Log | logger
Logger available to subclasses. |
| private Map | methodMap
Map from method name to attribute value. |
| private final Map | methodNameMap
Map from Method to name pattern used for registration. |
| private final Map | transactionAttributeMap
Map from Method to TransactionAttribute. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addTransactionalMethod(String
class and method name, separated by a dot name, TransactionAttribute attribute associated with the method attr)Add an attribute for a transactional method. |
| public void | addTransactionalMethod(Class<?>
target interface or class clazz, String mapped method name mappedName, TransactionAttribute attribute associated with the method attr)Add an attribute for a transactional method. |
| public void | addTransactionalMethod(Method
the method method, TransactionAttribute attribute associated with the method attr)Add an attribute for a transactional method. |
| public void | afterPropertiesSet()
Implements org. "methodMap", if any.
|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public TransactionAttribute | getTransactionAttribute(Method
the method to introspect method, Class<?> the target class (may be targetClass)null,
in which case the declaring class of the method must be used)Implements org. null if the method is non-transactional.
|
| public int | |
| protected void | initMethodMap(Map<String, TransactionAttribute>
a Map from method names to methodMap)TransactionAttribute instancesInitialize the specified |
| protected boolean | |
| public void | setBeanClassLoader(ClassLoader
the owning class loader beanClassLoader)Implements org. class loader to
a bean instance.
|
| public void | setEmbeddedValueResolver(StringValueResolver resolver)
Implements org. |
| public void | setMethodMap(Map<String, TransactionAttribute>
said methodMap)Map from method name to attribute valueSet a name/attribute map, consisting of "FQCN.method" method names
(e.g. "com.mycompany.mycode.MyClass.myMethod") and
|
| public String |
| beanClassLoader | back to summary |
|---|---|
| private ClassLoader beanClassLoader
| |
| eagerlyInitialized | back to summary |
|---|---|
| private boolean eagerlyInitialized | |
| embeddedValueResolver | back to summary |
|---|---|
| private StringValueResolver embeddedValueResolver
| |
| initialized | back to summary |
|---|---|
| private boolean initialized | |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| methodMap | back to summary |
|---|---|
| private Map<String, TransactionAttribute> methodMap Map from method name to attribute value. | |
| methodNameMap | back to summary |
|---|---|
| private final Map<Method, String> methodNameMap Map from Method to name pattern used for registration. | |
| transactionAttributeMap | back to summary |
|---|---|
| private final Map<Method, TransactionAttribute> transactionAttributeMap Map from Method to TransactionAttribute. | |
| MethodMapTransactionAttributeSource | back to summary |
|---|---|
| public MethodMapTransactionAttributeSource() | |
| addTransactionalMethod | back to summary |
|---|---|
| public void addTransactionalMethod(String name, TransactionAttribute attr) Add an attribute for a transactional method. Method names can end or start with "*" for matching multiple methods.
| |
| addTransactionalMethod | back to summary |
|---|---|
| public void addTransactionalMethod(Class<?> clazz, String mappedName, TransactionAttribute attr) Add an attribute for a transactional method. Method names can end or start with "*" for matching multiple methods.
| |
| addTransactionalMethod | back to summary |
|---|---|
| public void addTransactionalMethod(Method method, TransactionAttribute attr) Add an attribute for a transactional method.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Eagerly initializes the specified
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getTransactionAttribute | back to summary |
|---|---|
| public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) Implements org. Doc from org. Return the transaction attribute for the given method,
or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| initMethodMap | back to summary |
|---|---|
| protected void initMethodMap(Map<String, TransactionAttribute> methodMap) Initialize the specified
| |
| isMatch | back to summary |
|---|---|
| protected boolean isMatch(String methodName, String mappedName) Return if the given method name matches the mapped name. The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
| |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader beanClassLoader) Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setEmbeddedValueResolver | back to summary |
|---|---|
| public void setEmbeddedValueResolver(StringValueResolver resolver) Implements org. Doc from org. Set the StringValueResolver to use for resolving embedded definition values.
| |
| setMethodMap | back to summary |
|---|---|
| public void setMethodMap(Map<String, TransactionAttribute> methodMap) Set a name/attribute map, consisting of "FQCN.method" method names
(e.g. "com.mycompany.mycode.MyClass.myMethod") and
Intended for configuration via setter injection, typically within
a Spring bean factory. Relies on
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |