KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright (c) 1971-2003 TONBELLER AG, Bensheim.
3  * All rights reserved.
4  */

5 package com.tonbeller.jpivot.param;
6
7 import java.util.ArrayList JavaDoc;
8 import java.util.Collections JavaDoc;
9 import java.util.List JavaDoc;
10
11 import com.tonbeller.jpivot.olap.model.Member;
12 import com.tonbeller.jpivot.olap.model.OlapException;
13 import com.tonbeller.jpivot.olap.model.OlapModel;
14
15 public abstract class AbstractParamProvider implements ParameterProvider {
16
17   public List JavaDoc createSessionParams(OlapModel model, Member member) throws OlapException {
18     SqlAccess sa = (SqlAccess) model.getExtension(SqlAccess.ID);
19     if (sa == null)
20       return Collections.EMPTY_LIST;
21     List JavaDoc list = new ArrayList JavaDoc();
22     addMemberParams(list, sa, member);
23     return list;
24   }
25
26   protected abstract void addMemberParams(List JavaDoc list, SqlAccess sa, Member member);
27 }
28
Popular Tags