(file) Return to CQLSelectStatementRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / CQL

  1 martin 1.15 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.16 //
  3 martin 1.15 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.16 //
 10 martin 1.15 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.16 //
 17 martin 1.15 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.16 //
 20 martin 1.15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.16 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.15 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.16 //
 28 martin 1.15 //////////////////////////////////////////////////////////////////////////
 29 chuck  1.2  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_CQLSelectStatementRep_h
 33             #define Pegasus_CQLSelectStatementRep_h
 34             
 35             #include <Pegasus/Query/QueryCommon/SelectStatementRep.h>
 36             #include <Pegasus/Query/QueryCommon/QueryChainedIdentifier.h>
 37             #include <Pegasus/CQL/CQLChainedIdentifier.h>
 38             #include <Pegasus/CQL/Linkage.h>
 39             
 40             PEGASUS_NAMESPACE_BEGIN
 41             
 42             struct PropertyNode;
 43             
 44 mike   1.10 class CQLSelectStatementRep : public SelectStatementRep
 45 chuck  1.2  {
 46               public:
 47             
 48 chuck  1.3      CQLSelectStatementRep();
 49             
 50 kumpf  1.12     CQLSelectStatementRep(
 51                     const String& inQlang,
 52                     const String& inQuery,
 53                     const QueryContext& inCtx);
 54             
 55                 CQLSelectStatementRep(
 56                     const String& inQlang,
 57                     const String& inQuery);
 58 chuck  1.2  
 59                 CQLSelectStatementRep(const CQLSelectStatementRep& rep);
 60             
 61                 ~CQLSelectStatementRep();
 62             
 63                 CQLSelectStatementRep& operator=(const CQLSelectStatementRep& cqlss);
 64             
 65 chuck  1.3      Boolean evaluate(const CIMInstance& inCI);
 66             
 67 kumpf  1.11     void applyProjection(
 68                     CIMInstance& inCI,
 69 david.dillard 1.7          Boolean allowMissing);
 70 chuck         1.3  
 71 david.dillard 1.7      void validate();
 72 chuck         1.2  
 73 kumpf         1.11     Array<CIMObjectPath> getClassPathList() const;
 74 chuck         1.2  
 75                        CIMPropertyList getPropertyList(const CIMObjectPath& inClassName);
 76                    
 77                        CIMPropertyList getSelectPropertyList(const CIMObjectPath& inClassName);
 78                    
 79                        CIMPropertyList getWherePropertyList(const CIMObjectPath& inClassName);
 80                    
 81                        Array<CQLChainedIdentifier> getSelectChainedIdentifiers();
 82                    
 83                        Array<CQLChainedIdentifier> getWhereChainedIdentifiers();
 84                    
 85 chuck         1.3      void appendClassPath(const CQLIdentifier& inIdentifier);
 86                    
 87 david.dillard 1.7      void setPredicate(const CQLPredicate& inPredicate);
 88 chuck         1.2  
 89                        CQLPredicate getPredicate() const;
 90                    
 91 kumpf         1.13     void insertClassPathAlias(
 92                            const CQLIdentifier& inIdentifier,
 93                            const String& inAlias);
 94 chuck         1.3  
 95 chuck         1.2      void appendSelectIdentifier(const CQLChainedIdentifier& x);
 96                    
 97                        void applyContext();
 98                    
 99                        void normalizeToDOC();
100                    
101 kumpf         1.11     String toString() const;
102 chuck         1.2  
103                        void setHasWhereClause();
104                    
105 kumpf         1.11     Boolean hasWhereClause() const;
106 chuck         1.2  
107                        void clear();
108                    
109                      protected:
110 chuck         1.3  
111 chuck         1.2      Array<CQLChainedIdentifier> _selectIdentifiers;
112                    
113                        Boolean _hasWhereClause;
114                    
115                      private:
116                    
117 kumpf         1.11     Boolean applyProjection(
118                            PropertyNode* node,
119                            CIMProperty& nodeProp,
120                            Boolean& preservePropsForParent,
121                            Boolean allowMissing) const;
122                    
123                        void validateProperty(const QueryChainedIdentifier& chainId) const;
124                    
125                        CIMName lookupFromClass(const String& lookup) const;
126                    
127                        CIMPropertyList getPropertyListInternal(
128                            const CIMObjectPath& inClassName,
129                            Boolean includeSelect,
130                            Boolean includeWhere);
131                    
132                        Boolean addRequiredProperty(
133                            Array<CIMName>& reqProps,
134                            const CIMName& className,
135                            const QueryChainedIdentifier& chainId,
136                            Array<CIMName>& matchedScopes,
137                            Array<CIMName>& unmatchedScopes) const;
138 kumpf         1.11 
139                        Boolean isFilterable(
140                            const CIMInstance& inst,
141                            PropertyNode* node) const;
142                    
143                        void filterInstance(
144                            CIMInstance& inst,
145                            Boolean& allPropsRequired,
146                            const CIMName& allPropsClass,
147                            Array<CIMName>& requiredProps,
148                            Boolean& preserveProps,
149                            Boolean allowMissing) const;
150                    
151                        static Boolean containsProperty(
152                            const CIMName& name,
153                            const Array<CIMName>& props);
154 chuck         1.2  
155 kumpf         1.11     Boolean isFromChild(const CIMName& className) const;
156 chuck         1.4  
157 chuck         1.2      void checkWellFormedIdentifier(const QueryChainedIdentifier& chainId,
158                                                       Boolean isSelectListId);
159                    
160 marek         1.14     void reportNullContext() const;
161                    
162                        void CheckQueryContext() const
163                        {
164                            if (0 == _ctx)
165                            {
166                                reportNullContext();
167                            }
168                        }
169                    
170 chuck         1.2      CQLPredicate _predicate;
171                    
172                        Boolean _contextApplied;
173                    };
174                    
175                    PEGASUS_NAMESPACE_END
176                    
177 david.dillard 1.7  #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2