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

E26041-01

coherence/util/filter/GreaterEqualsFilter.hpp

00001 /*
00002 * GreaterEqualsFilter.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_GREATER_EQUALS_FILTER_HPP
00017 #define COH_GREATER_EQUALS_FILTER_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include "coherence/util/ValueExtractor.hpp"
00022 #include "coherence/util/filter/ComparisonFilter.hpp"
00023 #include "coherence/util/filter/IndexAwareFilter.hpp"
00024 
00025 COH_OPEN_NAMESPACE3(coherence,util,filter)
00026 
00027 
00028 /**
00029 * Filter which compares the result of a method invocation with a value for
00030 * "Greater or Equals" condition. In a case when either result of a method
00031 * invocation or a value to compare are equal to NULL, the <tt>evaluate</tt>
00032 * test yields <tt>false</tt>. This approach is equivalent to the way
00033 * the NULL values are handled by SQL.
00034 *
00035 * @author djl  2008.03.24
00036 */
00037 class COH_EXPORT GreaterEqualsFilter
00038     : public class_spec<GreaterEqualsFilter,
00039         extends<ComparisonFilter>,
00040         implements<IndexAwareFilter> >
00041     {
00042     friend class factory<GreaterEqualsFilter>;
00043 
00044     // ----- constructors ---------------------------------------------------
00045 
00046     protected:
00047         /**
00048         * Default constructor (necessary for the PortableObject interface).
00049         */
00050         GreaterEqualsFilter();
00051 
00052         /**
00053         * Construct a GreaterEqualsFilter for testing "Greater or Equal"
00054         * condition.
00055         *
00056         * @param vValueExtractor  the ValueExtractor to use by this filter
00057         * @param vComparable      the object to compare the result with
00058         */
00059         GreaterEqualsFilter(ValueExtractor::View vValueExtractor,
00060                 Comparable::View vComparable);
00061 
00062     private:
00063         /**
00064         * Blocked copy constructor.
00065         */
00066         GreaterEqualsFilter(const GreaterEqualsFilter&);
00067 
00068 
00069     // ----- ExtractorFilter interface --------------------------------------
00070 
00071     protected:
00072         /**
00073         * {@inheritDoc}
00074         */
00075         virtual bool evaluateExtracted(Object::View vExtracted) const;
00076 
00077 
00078     // ----- IndexAwareFilter interface -------------------------------------
00079 
00080     public:
00081         /**
00082         * {@inheritDoc}
00083         */
00084         virtual size32_t calculateEffectiveness(Map::View vMapIndexes,
00085                 Set::View vSetKeys) const;
00086 
00087         /**
00088         * {@inheritDoc}
00089         */
00090         virtual Filter::View applyIndex(Map::View vMapIndexes,
00091                 Set::Handle hSetKeys) const;
00092     };
00093 
00094 COH_CLOSE_NAMESPACE3
00095 
00096 #endif // COH_LESS_GREATER_EQUALS_HPP
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.