01: /*
02: * Copyright (c) 2006 Your Corporation. All Rights Reserved.
03: */
04:
05: package com.technoetic.xplanner.db;
06:
07: import java.util.ArrayList;
08: import java.util.List;
09: import java.util.Map;
10:
11: /**
12: * User: mprokopowicz
13: * Date: Apr 1, 2006
14: * Time: 9:16:06 PM
15: */
16: public class MethodCacheInvalidateForSelectedArgumentsInterceptor
17: extends MethodCacheInvalidateInterceptor {
18:
19: int[] argumentIndexes;
20:
21: public void setArgumentIndexes(int[] argumentIndexes) {
22: this .argumentIndexes = argumentIndexes;
23: }
24:
25: public MethodCacheInvalidateForSelectedArgumentsInterceptor(
26: Map cacheMap) {
27: super (cacheMap);
28: }
29:
30: public List getMethodCacheKey(Object args[]) {
31: List cacheKey = new ArrayList();
32: for (int i = 0; i < argumentIndexes.length; i++) {
33: int argumentIndex = argumentIndexes[i];
34: cacheKey.add(args[argumentIndex]);
35: }
36: return cacheKey;
37: }
38: }
|