001/*
002// This software is subject to the terms of the Eclipse Public License v1.0
003// Agreement, available at the following URL:
004// http://www.eclipse.org/legal/epl-v10.html.
005// You must accept the terms of that agreement to use this software.
006//
007// Copyright (C) 2008-2008 TASecurity Group Spain
008// Copyright (C) 2008-2012 Pentaho and others
009// All Rights Reserved.
010*/
011package mondrian.rolap;
012
013import mondrian.rolap.sql.MemberChildrenConstraint;
014import mondrian.rolap.sql.TupleConstraint;
015import mondrian.spi.DataSourceChangeListener;
016
017import java.util.List;
018
019/**
020 * Encapsulation of member caching for no caching.
021 *
022 * @author Luis F. Canals (lcanals@tasecurity.net)
023 * @version 1.0
024 */
025public class MemberNoCacheHelper extends MemberCacheHelper {
026    DataSourceChangeListener changeListener;
027
028    public MemberNoCacheHelper() {
029        super(null);
030    }
031
032    // implement MemberCache
033    public RolapMember getMember(
034        Object key,
035        boolean mustCheckCacheStatus)
036    {
037        return null;
038    }
039
040
041    // implement MemberCache
042    public Object putMember(Object key, RolapMember value) {
043        return value;
044    }
045
046    // implement MemberCache
047    public Object makeKey(RolapMember parent, Object key) {
048        return new MemberKey(parent, key);
049    }
050
051    // implement MemberCache
052    // synchronization: Must synchronize, because modifies mapKeyToMember
053    public synchronized RolapMember getMember(Object key) {
054        return getMember(key, true);
055    }
056
057    public void checkCacheStatus() {
058    }
059
060    public void putLevelMembersInCache(
061        RolapLevel level,
062        TupleConstraint constraint,
063        List<RolapMember> members)
064    {
065    }
066
067    public List<RolapMember> getChildrenFromCache(
068        RolapMember member,
069        MemberChildrenConstraint constraint)
070    {
071        return null;
072    }
073
074    public void putChildren(
075        RolapMember member,
076        MemberChildrenConstraint constraint,
077        List<RolapMember> children)
078    {
079    }
080
081    public List<RolapMember> getLevelMembersFromCache(
082        RolapLevel level,
083        TupleConstraint constraint)
084    {
085        return null;
086    }
087
088    public DataSourceChangeListener getChangeListener() {
089        return changeListener;
090    }
091
092    public void setChangeListener(DataSourceChangeListener listener) {
093        changeListener = listener;
094    }
095
096    public boolean isMutable() {
097        return true;
098    }
099
100    public RolapMember removeMember(Object key) {
101        return null;
102    }
103
104    public RolapMember removeMemberAndDescendants(Object key) {
105        return null;
106    }
107}
108
109// End MemberNoCacheHelper.java