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

  1 karl  1.9 //%2006////////////////////////////////////////////////////////////////////////
  2 chuck 1.2 //
  3 karl  1.5 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 chuck 1.2 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.5 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9           // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.9 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 chuck 1.2 //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20 karl  1.9 // 
 21 chuck 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29           //
 30           //==============================================================================
 31           //
 32           // Authors: David Rosckes (rosckes@us.ibm.com)
 33           //          Bert Rivero (hurivero@us.ibm.com)
 34           //          Chuck Carmack (carmack@us.ibm.com)
 35           //          Brian Lucier (lucier@us.ibm.com)
 36           //
 37 david.dillard 1.7 // Modified By: David Dillard, VERITAS Software Corp.
 38                   //                  (david.dillard@veritas.com)
 39 chuck         1.2 //
 40                   //%/////////////////////////////////////////////////////////////////////////////
 41                   
 42                   #ifndef Pegasus_CQLSelectStatementRep_h
 43                   #define Pegasus_CQLSelectStatementRep_h
 44                   
 45                   #include <Pegasus/Query/QueryCommon/SelectStatementRep.h>
 46                   #include <Pegasus/Query/QueryCommon/QueryChainedIdentifier.h>
 47                   #include <Pegasus/CQL/CQLChainedIdentifier.h>
 48                   #include <Pegasus/CQL/Linkage.h>
 49                   
 50                   PEGASUS_NAMESPACE_BEGIN
 51                   
 52                   struct PropertyNode;
 53                   
 54                   class PEGASUS_CQL_LINKAGE CQLSelectStatementRep : public SelectStatementRep
 55                   {
 56                     public:
 57                   
 58 chuck         1.3     CQLSelectStatementRep();
 59                   
 60 david.dillard 1.7     CQLSelectStatementRep(String& inQlang,
 61                                             String& inQuery,
 62 chuck         1.3                           QueryContext& inCtx);
 63 chuck         1.2 
 64 chuck         1.3     CQLSelectStatementRep(String& inQlang,
 65                                             String& inQuery);
 66 chuck         1.2 
 67                       CQLSelectStatementRep(const CQLSelectStatementRep& rep);
 68                   
 69                       ~CQLSelectStatementRep();
 70                   
 71                       CQLSelectStatementRep& operator=(const CQLSelectStatementRep& cqlss);
 72                   
 73 chuck         1.3     Boolean evaluate(const CIMInstance& inCI);
 74                   
 75 carolann.graves 1.6     void applyProjection(CIMInstance& inCI,
 76 david.dillard   1.7         Boolean allowMissing);
 77 chuck           1.3 
 78 david.dillard   1.7     void validate();
 79 chuck           1.2 
 80                         Array<CIMObjectPath> getClassPathList();
 81                     
 82                         CIMPropertyList getPropertyList(const CIMObjectPath& inClassName);
 83                     
 84                         CIMPropertyList getSelectPropertyList(const CIMObjectPath& inClassName);
 85                     
 86                         CIMPropertyList getWherePropertyList(const CIMObjectPath& inClassName);
 87                     
 88                         Array<CQLChainedIdentifier> getSelectChainedIdentifiers();
 89                     
 90                         Array<CQLChainedIdentifier> getWhereChainedIdentifiers();
 91                     
 92 chuck           1.3     void appendClassPath(const CQLIdentifier& inIdentifier);
 93                     
 94 david.dillard   1.7     void setPredicate(const CQLPredicate& inPredicate);
 95 chuck           1.2 
 96                         CQLPredicate getPredicate() const;
 97                     
 98 david.dillard   1.7     void insertClassPathAlias(const CQLIdentifier& inIdentifier,
 99 chuck           1.3                               String inAlias);
100                     
101 chuck           1.2     void appendSelectIdentifier(const CQLChainedIdentifier& x);
102                     
103                         void applyContext();
104                     
105                         void normalizeToDOC();
106                     
107                         String toString();
108                     
109                         void setHasWhereClause();
110                     
111                         Boolean hasWhereClause();
112                     
113                         void clear();
114                     
115                       protected:
116 chuck           1.3 
117 chuck           1.2     Array<CQLChainedIdentifier> _selectIdentifiers;
118                     
119                         Boolean _hasWhereClause;
120                     
121                       private:
122                     
123 chuck           1.3     Boolean applyProjection(PropertyNode* node,
124                                                 CIMProperty& nodeProp,
125 carolann.graves 1.6                             Boolean& preservePropsForParent,
126                                                 Boolean allowMissing);
127 chuck           1.2 
128                         void validateProperty(QueryChainedIdentifier& chainId);
129                     
130                         CIMName lookupFromClass(const String&  lookup);
131                     
132                         CIMPropertyList getPropertyListInternal(const CIMObjectPath& inClassName,
133                                                                 Boolean includeSelect,
134                                                                 Boolean includeWhere);
135                     
136                         Boolean addRequiredProperty(Array<CIMName>& reqProps,
137                                                     CIMName& className,
138                                                     QueryChainedIdentifier& chainId,
139                                                     Array<CIMName>& matchedScopes,
140                                                     Array<CIMName>& unmatchedScopes);
141                     
142                         Boolean isFilterable(const CIMInstance& inst,
143                                              PropertyNode* node);
144                     
145 david.dillard   1.7     void filterInstance(CIMInstance& inst,
146 chuck           1.3                         Boolean& allPropsRequired,
147                                             const CIMName& allPropsClass,
148                                             Array<CIMName>& requiredProps,
149 carolann.graves 1.6                         Boolean& preserveProps,
150                                             Boolean allowMissing);
151 chuck           1.2 
152                         Boolean containsProperty(const CIMName& name,
153                                                  const Array<CIMName>& props);
154                     
155 chuck           1.4     Boolean isFromChild(const CIMName& className);
156                     
157 chuck           1.2     void checkWellFormedIdentifier(const QueryChainedIdentifier& chainId,
158                                                        Boolean isSelectListId);
159                     
160                         CQLPredicate _predicate;
161                     
162                         Boolean _contextApplied;
163                     };
164                     
165                     PEGASUS_NAMESPACE_END
166                     
167 david.dillard   1.7 #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2