Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

coherence/util/filter/BetweenFilter.hpp

00001 /*
00002 * BetweenFilter.hpp
00003 *
00004 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_BETWEEN_FILTER_HPP
00017 #define COH_BETWEEN_FILTER_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/ValueExtractor.hpp"
00022 #include "coherence/util/filter/AndFilter.hpp"
00023 
00024 COH_OPEN_NAMESPACE3(coherence,util,filter)
00025 
00026 
00027 /**
00028 * Filter which compares the result of a method invocation with a value for
00029 * "Between" condition.  We use the standard ISO/IEC 9075:1992 semantic,
00030 * according to which "X between Y and Z" is equivalent to "X >= Y && X <= Z".
00031 * In a case when either result of a method invocation or a value to compare
00032 * are equal to null, the <tt>evaluate</tt> test yields <tt>false</tt>.
00033 * This approach is equivalent to the way the NULL values are handled by SQL.
00034 *
00035 * @author djl  2008.04.07
00036 */
00037 class COH_EXPORT BetweenFilter
00038     : public class_spec<BetweenFilter,
00039         extends<AndFilter> >
00040     {
00041     friend class factory<BetweenFilter>;
00042 
00043     // ----- constructors ---------------------------------------------------
00044 
00045     protected:
00046         /**
00047         * Default constructor (necessary for the PortableObject interface).
00048         */
00049         BetweenFilter();
00050 
00051         /**
00052         * Construct a BetweenFilter for testing "Between" condition.
00053         *
00054         * @param vExtractor  the ValueExtractor to use by this filter
00055         * @param vFrom      the object to compare the "Greater or Equals"
00056         *                   boundary with
00057         * @param vTo        the object to compare the "Less or Equals" boundary
00058         *                   with
00059         */
00060         BetweenFilter(ValueExtractor::View vExtractor, Comparable::View vFrom,
00061                 Comparable::View vTo);
00062 
00063     private:
00064         /**
00065         * Blocked copy constructor.
00066         */
00067         BetweenFilter(const BetweenFilter&);
00068     };
00069 
00070 COH_CLOSE_NAMESPACE3
00071 
00072 #endif // COH_BETWEEN_FILTER_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.