KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > param > MemberParamProvider


1 /*
2  * Created on 14.12.2004
3  */

4 package com.tonbeller.jpivot.param;
5
6 import java.util.List JavaDoc;
7
8 import com.tonbeller.jpivot.olap.model.Member;
9 import com.tonbeller.wcf.param.SessionParam;
10
11 /**
12  * creates a SessionParam from a member
13  * @see com.tonbeller.jpivot.param.SqlAccess
14  * @see com.tonbeller.wcf.param.SessionParam
15  *
16  */

17 public class MemberParamProvider extends AbstractParamProvider {
18   String JavaDoc paramName;
19
20   /**
21    * creates a SessionParam from a member
22    * @see com.tonbeller.jpivot.param.SqlAccess
23    * @see com.tonbeller.wcf.param.SessionParam
24    *
25    * @param paramName name of the parameter
26    * @return
27    */

28
29   public MemberParamProvider(String JavaDoc paramName) {
30     this.paramName = paramName;
31   }
32
33   protected void addMemberParams(List JavaDoc list, SqlAccess sa, Member member) {
34     SessionParam param = sa.createParameter(member, paramName);
35     if (param != null) // !calculated, !all
36
list.add(param);
37   }
38
39 }
Popular Tags