TransactionAttributeSource implementation that
allows attributes to be matched by registered name.
isMatch, MethodMapTransactionAttributeSource
| Modifier and Type | Field and Description |
|---|---|
| private StringValueResolver | |
| protected static final Log | logger
Logger available to subclasses. |
| private final Map | nameMap
Keys are method names; values are TransactionAttributes. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addTransactionalMethod(String
the name of the method methodName, TransactionAttribute attribute associated with the method attr)Add an attribute for a transactional method. |
| public void | afterPropertiesSet()
Implements org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| 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. Return the transaction attribute for the given method,
or |
| public int | |
| protected boolean | |
| public void | setEmbeddedValueResolver(StringValueResolver resolver)
Implements org. Set the StringValueResolver to use for resolving embedded definition values. |
| public void | setNameMap(Map<String, TransactionAttribute> nameMap)
Set a name/attribute map, consisting of method names
(e.g. "myMethod") and |
| public void | setProperties(Properties transactionAttributes)
Parse the given properties into a name/attribute map. |
| public String |
| embeddedValueResolver | back to summary |
|---|---|
| private StringValueResolver embeddedValueResolver
| |
| logger | back to summary |
|---|---|
| protected static final Log logger Logger available to subclasses. Static for optimal serialization. | |
| nameMap | back to summary |
|---|---|
| private final Map<String, TransactionAttribute> nameMap Keys are method names; values are TransactionAttributes. | |
| NameMatchTransactionAttributeSource | back to summary |
|---|---|
| public NameMatchTransactionAttributeSource() | |
| addTransactionalMethod | back to summary |
|---|---|
| public void addTransactionalMethod(String methodName, TransactionAttribute attr) Add an attribute for a transactional method. Method names can be exact matches, or of the pattern "xxx*", "*xxx", or "*xxx*" for matching multiple methods.
| |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
| |
| 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 this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isMatch | back to summary |
|---|---|
| protected boolean isMatch(String methodName, String mappedName) Determine if the given method name matches the mapped name. The default implementation checks for "xxx*", "*xxx", and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.
| |
| setEmbeddedValueResolver | back to summary |
|---|---|
| public void setEmbeddedValueResolver(StringValueResolver resolver) Implements org. Doc from org. Set the StringValueResolver to use for resolving embedded definition values.
| |
| setNameMap | back to summary |
|---|---|
| public void setNameMap(Map<String, TransactionAttribute> nameMap) Set a name/attribute map, consisting of method names
(e.g. "myMethod") and
| |
| setProperties | back to summary |
|---|---|
| public void setProperties(Properties transactionAttributes) Parse the given properties into a name/attribute map. Expects method names as keys and String attributes definitions as values,
parsable into
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |