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-2009 Pentaho and others
009// All Rights Reserved.
010*/
011package mondrian.rolap.sql;
012
013/**
014 * Restricts the members that are fetched by SqlMemberSource.
015 *
016 * @see mondrian.rolap.SqlMemberSource
017 *
018 * @author av
019 * @since Nov 2, 2005
020 */
021public interface SqlConstraint {
022
023   /**
024    * Returns a key that becomes part of the key for caching the
025    * result of the SQL query. So SqlConstraint instances that
026    * produce the same SQL resultset must return equal keys
027    * in terms of equal() and hashCode().
028    * @return valid key or null to prevent the result from being cached
029    */
030    Object getCacheKey();
031}
032
033// End SqlConstraint.java