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) 2003-2005 Julian Hyde
008// Copyright (C) 2005-2011 Pentaho
009// All Rights Reserved.
010*/
011package mondrian.olap;
012
013/**
014 * <code>MatchType</code> enumerates the allowable match modes when
015 * searching for a member based on its unique name.
016 *
017 * @author Zelaine Fong
018 */
019public enum MatchType {
020    /** Match the unique name exactly, do not query database for members */
021    EXACT_SCHEMA,
022    /** Match the unique name exactly */
023    EXACT,
024    /** If no exact match, return the preceding member */
025    BEFORE,
026    /** If no exact match, return the next member */
027    AFTER,
028    /** Return the first child */
029    FIRST,
030    /** Return the last child */
031    LAST;
032
033    /**
034     * Return true if either Exact or Exact Schema value
035     * is selected.
036     *
037     * @return true if exact
038     */
039    public boolean isExact() {
040        return this == EXACT || this == EXACT_SCHEMA;
041    }
042}
043
044// End MatchType.java