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

  1 chuck 1.1.2.9 //%2003////////////////////////////////////////////////////////////////////////
  2 chuck 1.1.2.6 //
  3               // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4               // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5 chuck 1.1.2.10 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
  6 chuck 1.1.2.6  // IBM Corp.; EMC Corporation, The Open Group.
  7                //
  8                // Permission is hereby granted, free of charge, to any person obtaining a copy
  9                // of this software and associated documentation files (the "Software"), to
 10                // deal in the Software without restriction, including without limitation the
 11                // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12                // sell copies of the Software, and to permit persons to whom the Software is
 13                // furnished to do so, subject to the following conditions:
 14                // 
 15                // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16                // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17                // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18                // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19                // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20                // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21                // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22                // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23                //
 24                //==============================================================================
 25                //
 26                // Authors: David Rosckes (rosckes@us.ibm.com)
 27 chuck 1.1.2.6  //          Bert Rivero (hurivero@us.ibm.com)
 28                //          Chuck Carmack (carmack@us.ibm.com)
 29                //          Brian Lucier (lucier@us.ibm.com)
 30                //
 31                // Modified By:
 32                //
 33                //%/////////////////////////////////////////////////////////////////////////////
 34                
 35 humberto 1.1.2.2  #include "CQLSelectStatement.h"
 36 humberto 1.1.2.4  #include "CQLSelectStatementRep.h"
 37 chuck    1.1.2.6  #include <Pegasus/Common/InternalException.h>
 38 humberto 1.1.2.1  
 39                   PEGASUS_NAMESPACE_BEGIN
 40 humberto 1.1.2.2  
 41 chuck    1.1.2.6  CQLSelectStatement::CQLSelectStatement()
 42                     :SelectStatement()
 43                   {
 44                     _rep = new CQLSelectStatementRep();
 45 humberto 1.1.2.5  }
 46                   
 47 chuck    1.1.2.11 CQLSelectStatement::CQLSelectStatement(String& inQlang, String& inQuery, QueryContext& inCtx)
 48 chuck    1.1.2.6    :SelectStatement()
 49 humberto 1.1.2.2  {
 50 chuck    1.1.2.6    _rep = new CQLSelectStatementRep(inQlang,inQuery,inCtx);
 51 humberto 1.1.2.4  }
 52                   
 53 chuck    1.1.2.6  CQLSelectStatement::CQLSelectStatement(const CQLSelectStatement& statement)
 54                     :SelectStatement()
 55                   {
 56                     _rep = new CQLSelectStatementRep(*statement._rep);
 57 humberto 1.1.2.5  }
 58                   
 59 chuck    1.1.2.6  CQLSelectStatement::~CQLSelectStatement()
 60                   {
 61                     if(_rep)
 62                       delete _rep;
 63 humberto 1.1.2.2  }
 64                   
 65 chuck    1.1.2.6  CQLSelectStatement& CQLSelectStatement::operator=(const CQLSelectStatement& rhs)
 66 humberto 1.1.2.2  {
 67 chuck    1.1.2.6    if(&rhs != this)
 68                     {
 69                       if(_rep) delete _rep;	
 70                       _rep = new CQLSelectStatementRep(*rhs._rep);
 71                     }
 72                   
 73                     return *this;
 74 humberto 1.1.2.2  }
 75                   
 76 chuck    1.1.2.6  Boolean CQLSelectStatement::evaluate(const CIMInstance& inCI)
 77 humberto 1.1.2.1  {
 78 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
 79                   
 80                      return _rep->evaluate(inCI);
 81 humberto 1.1.2.2  }
 82                   
 83 chuck    1.1.2.6  void CQLSelectStatement::applyProjection(CIMInstance& inCI) throw(Exception)
 84 humberto 1.1.2.1  {
 85 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
 86                   
 87 lucier   1.1.2.12    _rep->applyProjection(inCI);
 88 humberto 1.1.2.2  }
 89                   
 90                   void CQLSelectStatement::validateClass(const CIMObjectPath& inClassName) throw(Exception)
 91                   {
 92 chuck    1.1.2.6  
 93                     PEGASUS_ASSERT(_rep != NULL);
 94                   
 95                     _rep->validateClass(inClassName);
 96 humberto 1.1.2.2  }
 97                   
 98                   void CQLSelectStatement::validateProperties() throw(Exception)
 99                   {
100 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
101                   
102                     _rep->validateProperties();
103 humberto 1.1.2.2  }
104                   
105 chuck    1.1.2.6  Array<CIMObjectPath> CQLSelectStatement::getClassPathList()
106 humberto 1.1.2.1  {
107 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
108                   
109                     return _rep->getClassPathList();
110 humberto 1.1.2.2  }
111                   
112                   CIMPropertyList CQLSelectStatement::getPropertyList(const CIMObjectPath& inClassName)
113 humberto 1.1.2.1  {
114 chuck    1.1.2.6    // Should be set by the concrete sub-classes
115                     PEGASUS_ASSERT(_rep != NULL);
116                   
117 humberto 1.1.2.4     return _rep->getPropertyList(inClassName);
118 humberto 1.1.2.2  }
119                   
120                   void CQLSelectStatement::appendClassPath(const CQLIdentifier& inIdentifier)
121                   {
122 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
123                   
124                     _rep->appendClassPath(inIdentifier);
125 humberto 1.1.2.2  }
126                   
127                   void CQLSelectStatement::setPredicate(CQLPredicate inPredicate)
128                   {
129 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
130                   
131                     _rep->setPredicate(inPredicate);
132 humberto 1.1.2.2  }
133                   
134                   void CQLSelectStatement::insertClassPathAlias(const CQLIdentifier& inIdentifier, String inAlias)
135                   {
136 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
137                   
138                     _rep->insertClassPathAlias(inIdentifier,inAlias);
139 humberto 1.1.2.2  }
140                   
141                   void CQLSelectStatement::appendSelectIdentifier(const CQLChainedIdentifier& x)
142                   {
143 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
144                   
145                     _rep->appendSelectIdentifier(x);
146 humberto 1.1.2.2  }
147                   
148                   Boolean CQLSelectStatement::appendWhereIdentifier(const CQLChainedIdentifier& x)
149                   {
150 chuck    1.1.2.6    PEGASUS_ASSERT(_rep != NULL);
151 humberto 1.1.2.2  
152 chuck    1.1.2.6     return _rep->appendWhereIdentifier(x);
153 humberto 1.1.2.5  }
154                   
155 chuck    1.1.2.8  void CQLSelectStatement::applyContext()
156                   {
157                      PEGASUS_ASSERT(_rep != NULL);
158                   
159                      _rep->applyContext();
160                   }
161                   
162                   void CQLSelectStatement::normalizeToDOC()
163                   {
164                      PEGASUS_ASSERT(_rep != NULL);
165                   
166                      _rep->normalizeToDOC();
167                   }
168                   
169                   void CQLSelectStatement::setHasWhereClause()
170                   {
171                     PEGASUS_ASSERT(_rep != NULL);
172                   
173                     _rep->setHasWhereClause();
174 chuck    1.1.2.7  }
175                   
176 chuck    1.1.2.8  Boolean CQLSelectStatement::hasWhereClause()
177                   {
178                     PEGASUS_ASSERT(_rep != NULL);
179                   
180                     return _rep->hasWhereClause();
181 chuck    1.1.2.7  }
182                   
183 chuck    1.1.2.8  String CQLSelectStatement::toString()
184                   {
185                     PEGASUS_ASSERT(_rep != NULL);
186                   
187                     return _rep->toString();
188 chuck    1.1.2.7  }
189                   
190                   void CQLSelectStatement::clear(){
191 chuck    1.1.2.8    PEGASUS_ASSERT(_rep != NULL);
192                   
193                     _rep->clear();
194 chuck    1.1.2.7  }
195                   
196 humberto 1.1.2.1  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2