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