001    /*
002    // $Id: //open/mondrian-release/3.2/src/main/mondrian/olap/MatchType.java#1 $
003    // This software is subject to the terms of the Eclipse Public License v1.0
004    // Agreement, available at the following URL:
005    // http://www.eclipse.org/legal/epl-v10.html.
006    // Copyright (C) 2003-2009 Julian Hyde
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    //
010    // jhyde, Feb 21, 2003
011    */
012    package mondrian.olap;
013    
014    /**
015     * <code>MatchType</code> enumerates the allowable match modes when
016     * searching for a member based on its unique name.
017     *
018     * @author Zelaine Fong
019     * @version $Id: //open/mondrian-release/3.2/src/main/mondrian/olap/MatchType.java#1 $
020     */
021    public enum MatchType {
022        /** Match the unique name exactly, do not query database for members */
023        EXACT_SCHEMA,
024        /** Match the unique name exactly */
025        EXACT,
026        /** If no exact match, return the preceding member */
027        BEFORE,
028        /** If no exact match, return the next member */
029        AFTER;
030    
031        /**
032         * Return true if either Exact or Exact Schema value
033         * is selected.
034         *
035         * @return true if exact
036         */
037        public boolean isExact() {
038            return this == EXACT || this == EXACT_SCHEMA;
039        }
040    }
041    
042    // End MatchType.java