use generic Class<?> in TransactionAttributeSource signature
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2006 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -51,9 +51,8 @@ public class CompositeTransactionAttributeSource implements TransactionAttribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) {
|
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||||
for (int i = 0; i < this.transactionAttributeSources.length; i++) {
|
for (TransactionAttributeSource tas : this.transactionAttributeSources) {
|
||||||
TransactionAttributeSource tas = this.transactionAttributeSources[i];
|
|
||||||
TransactionAttribute ta = tas.getTransactionAttribute(method, targetClass);
|
TransactionAttribute ta = tas.getTransactionAttribute(method, targetClass);
|
||||||
if (ta != null) {
|
if (ta != null) {
|
||||||
return ta;
|
return ta;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2006 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -49,7 +49,7 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) {
|
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||||
return this.transactionAttribute;
|
return this.transactionAttribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -137,7 +137,7 @@ public class MethodMapTransactionAttributeSource
|
|||||||
* @param mappedName mapped method name
|
* @param mappedName mapped method name
|
||||||
* @param attr attribute associated with the method
|
* @param attr attribute associated with the method
|
||||||
*/
|
*/
|
||||||
public void addTransactionalMethod(Class clazz, String mappedName, TransactionAttribute attr) {
|
public void addTransactionalMethod(Class<?> clazz, String mappedName, TransactionAttribute attr) {
|
||||||
Assert.notNull(clazz, "Class must not be null");
|
Assert.notNull(clazz, "Class must not be null");
|
||||||
Assert.notNull(mappedName, "Mapped name must not be null");
|
Assert.notNull(mappedName, "Mapped name must not be null");
|
||||||
String name = clazz.getName() + '.' + mappedName;
|
String name = clazz.getName() + '.' + mappedName;
|
||||||
@@ -204,7 +204,7 @@ public class MethodMapTransactionAttributeSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) {
|
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||||
if (this.eagerlyInitialized) {
|
if (this.eagerlyInitialized) {
|
||||||
return this.transactionAttributeMap.get(method);
|
return this.transactionAttributeMap.get(method);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2010 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -97,7 +97,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TransactionAttribute getTransactionAttribute(Method method, Class targetClass) {
|
public TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass) {
|
||||||
// look for direct name match
|
// look for direct name match
|
||||||
String methodName = method.getName();
|
String methodName = method.getName();
|
||||||
TransactionAttribute attr = this.nameMap.get(methodName);
|
TransactionAttribute attr = this.nameMap.get(methodName);
|
||||||
|
|||||||
Reference in New Issue
Block a user