001 /* 002 // This software is subject to the terms of the Common Public License 003 // Agreement, available at the following URL: 004 // http://www.opensource.org/licenses/cpl.html. 005 // Copyright (C) 2004-2005 TONBELLER AG 006 // All Rights Reserved. 007 // You must accept the terms of that agreement to use this software. 008 */ 009 package mondrian.rolap; 010 011 import mondrian.olap.Evaluator; 012 import mondrian.rolap.sql.TupleConstraint; 013 import mondrian.rolap.sql.MemberChildrenConstraint; 014 import mondrian.rolap.sql.SqlQuery; 015 import mondrian.rolap.aggmatcher.AggStar; 016 017 /** 018 * TupleConstraint which does not restrict the result. 019 * 020 * @version $Id: //open/mondrian/src/main/mondrian/rolap/DefaultTupleConstraint.java#11 $ 021 */ 022 public class DefaultTupleConstraint implements TupleConstraint { 023 024 private static final TupleConstraint instance = new DefaultTupleConstraint(); 025 026 /** we have no state, so all instances are equal */ 027 private static final Object cacheKey = new Object(); 028 029 protected DefaultTupleConstraint() { 030 } 031 032 public void addConstraint(SqlQuery sqlQuery, RolapCube baseCube) { 033 } 034 035 public void addLevelConstraint( 036 SqlQuery query, 037 RolapCube baseCube, 038 AggStar aggStar, 039 RolapLevel level) { 040 } 041 042 public MemberChildrenConstraint getMemberChildrenConstraint(RolapMember parent) { 043 return DefaultMemberChildrenConstraint.instance(); 044 } 045 046 public String toString() { 047 return "DefaultTupleConstraint"; 048 } 049 050 public Object getCacheKey() { 051 return cacheKey; 052 } 053 054 public static TupleConstraint instance() { 055 return instance; 056 } 057 058 public Evaluator getEvaluator() { 059 return null; 060 } 061 062 } 063 064 // End DefaultTupleConstraint.java