public List<T> getAllAttributes(MethodIntf methodIntf, Method method) { assert methodIntf != null : "methodIntf is null"; Method classMethod = resolveRealMethod(method); String[] methodParams = MethodInfoHelper.getCanonicalParameterTypes(classMethod); final String methodName = classMethod.getName(); final String className = classMethod.getDeclaringClass().getName(); final List<T> ret = new ArrayList<T>(); ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null) ret.add(attr); attr = get(get(perViewStyle2, methodIntf), methodName); if (attr != null) ret.add(attr); attr = get(perViewStyle1, methodIntf); if (attr != null) ret.add(attr); attr = get(get(get(style3, className), methodName), methodParamsKey); if (attr != null) ret.add(attr); attr = get(style2, methodName); if (attr != null) ret.add(attr); attr = get(style1, className); if (attr != null) ret.add(attr); return ret; }
public T getAttributeStyle3(MethodIntf methodIntf, final String className, String methodName, String... methodParams) { ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); if (methodIntf == null) return style3.pick(className).pick(methodName).get(methodParamsKey); else return perViewStyle3.pick(methodIntf).pick(methodName).get(methodParamsKey); }
/** * Style 3 (13.3.7.2.1 @3) * * @param methodIntf the method-intf the annotations apply to or null if EJB class itself * @param transactionAttribute * @param methodName * @param methodParams */ public void setAttribute(MethodIntf methodIntf, T transactionAttribute, final String className, String methodName, String... methodParams) { ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); if (methodIntf == null) style3.pick(className).pick(methodName).put(methodParamsKey, transactionAttribute); else perViewStyle3.pick(methodIntf).pick(methodName).put(methodParamsKey, transactionAttribute); }
public List<T> getAllAttributes(MethodIntf methodIntf, String className, String methodName, String... methodParams) { assert methodIntf != null : "methodIntf is null"; assert methodName != null : "methodName is null"; assert methodParams != null : "methodParams is null"; final List<T> ret = new ArrayList<T>(); ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null) ret.add(attr); attr = get(get(perViewStyle2, methodIntf), methodName); if (attr != null) ret.add(attr); attr = get(perViewStyle1, methodIntf); if (attr != null) ret.add(attr); attr = get(get(get(style3, className), methodName), methodParamsKey); if (attr != null) ret.add(attr); attr = get(style2, methodName); if (attr != null) ret.add(attr); attr = get(style1, className); if (attr != null) ret.add(attr); return ret; }
public T getAttribute(MethodIntf methodIntf, String className, String methodName, String... methodParams) { assert methodIntf != null : "methodIntf is null"; assert methodName != null : "methodName is null"; assert methodParams != null : "methodParams is null"; ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null) return attr; attr = get(get(perViewStyle2, methodIntf), methodName); if (attr != null) return attr; attr = get(perViewStyle1, methodIntf); if (attr != null) return attr; attr = get(get(get(style3, className), methodName), methodParamsKey); if (attr != null) return attr; attr = get(style2, methodName); if (attr != null) return attr; attr = get(style1, className); if (attr != null) return attr; return defaultAttribute; }
public T getViewAttribute(MethodIntf methodIntf, String methodName, String... methodParams) { assert methodIntf != null : "methodIntf is null"; assert methodName != null : "methodName is null"; assert methodParams != null : "methodParams is null"; ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null) return attr; attr = get(get(perViewStyle2, methodIntf), methodName); if (attr != null) return attr; attr = get(perViewStyle1, methodIntf); if (attr != null) return attr; return null; }
/** * Style 3 (13.3.7.2.1 @3) * * @param methodIntf the method-intf the annotations apply to or null if EJB class itself * @param transactionAttribute * @param methodName * @param methodParams */ public void setAttribute(MethodIntf methodIntf, T transactionAttribute, final String className, String methodName, String... methodParams) { ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); if (methodIntf == null) style3.pick(className).pick(methodName).put(methodParamsKey, transactionAttribute); else perViewStyle3.pick(methodIntf).pick(methodName).put(methodParamsKey, transactionAttribute); }
public T getAttributeStyle3(MethodIntf methodIntf, final String className, String methodName, String... methodParams) { ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); if (methodIntf == null) return style3.pick(className).pick(methodName).get(methodParamsKey); else return perViewStyle3.pick(methodIntf).pick(methodName).get(methodParamsKey); }
final String className = classMethod.getDeclaringClass().getName(); ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null)
final String className = classMethod.getDeclaringClass().getName(); ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null)
public T getViewAttribute(MethodIntf methodIntf, final Method method) { assert methodIntf != null : "methodIntf is null"; Method classMethod = resolveRealMethod(method); String[] methodParams = MethodInfoHelper.getCanonicalParameterTypes(classMethod); final String methodName = classMethod.getName(); ArrayKey methodParamsKey = new ArrayKey((Object[]) methodParams); T attr = get(get(get(perViewStyle3, methodIntf), methodName), methodParamsKey); if (attr != null) return attr; attr = get(get(perViewStyle2, methodIntf), methodName); if (attr != null) return attr; attr = get(perViewStyle1, methodIntf); if (attr != null) return attr; return null; }