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) 2004-2005 TONBELLER AG
008// Copyright (C) 2006-2012 Pentaho and others
009// All Rights Reserved.
010*/
011package mondrian.rolap;
012
013import mondrian.olap.Evaluator;
014import mondrian.rolap.aggmatcher.AggStar;
015import mondrian.rolap.sql.*;
016
017/**
018 * TupleConstraint which does not restrict the result.
019 */
020public class DefaultTupleConstraint implements TupleConstraint {
021
022    private static final TupleConstraint instance =
023        new DefaultTupleConstraint();
024
025    protected DefaultTupleConstraint() {
026    }
027
028    public void addConstraint(
029        SqlQuery sqlQuery,
030        RolapCube baseCube,
031        AggStar aggStar)
032    {
033    }
034
035    public void addLevelConstraint(
036        SqlQuery sqlQuery,
037        RolapCube baseCube,
038        AggStar aggStar,
039        RolapLevel level)
040    {
041    }
042
043    public MemberChildrenConstraint getMemberChildrenConstraint(
044        RolapMember parent)
045    {
046        return DefaultMemberChildrenConstraint.instance();
047    }
048
049    public String toString() {
050        return "DefaultTupleConstraint";
051    }
052
053    public Object getCacheKey() {
054        // we have no state, so all instances are equal
055        return this;
056    }
057
058    public static TupleConstraint instance() {
059        return instance;
060    }
061
062    public Evaluator getEvaluator() {
063        return null;
064    }
065}
066
067// End DefaultTupleConstraint.java