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

Diff for /pegasus/src/Pegasus/WQL/WQLSelectStatement.cpp between version 1.5 and 1.6

version 1.5, 2002/08/20 17:39:37 version 1.6, 2003/02/12 17:18:39
Line 23 
Line 23 
 // //
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By:  // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 130 
Line 131 
  
     _operations.reserveCapacity(16);     _operations.reserveCapacity(16);
     _operands.reserveCapacity(16);     _operands.reserveCapacity(16);
   
       _allProperties = false;
 } }
  
 WQLSelectStatement::~WQLSelectStatement() WQLSelectStatement::~WQLSelectStatement()
Line 140 
Line 143 
 void WQLSelectStatement::clear() void WQLSelectStatement::clear()
 { {
     _className.clear();     _className.clear();
       _allProperties = false;
     _selectPropertyNames.clear();     _selectPropertyNames.clear();
     _operations.clear();     _operations.clear();
     _operands.clear();     _operands.clear();
 } }
  
 Boolean WQLSelectStatement::appendWherePropertyName(const String& x)  Boolean WQLSelectStatement::getAllProperties() const
   {
       return _allProperties;
   }
   
   void WQLSelectStatement::setAllProperties(const Boolean allProperties)
   {
       _allProperties = allProperties;
   }
   
   const CIMPropertyList WQLSelectStatement::getSelectPropertyList () const
   {
       //
       //  Check for "*"
       //
       if (_allProperties)
       {
           //
           //  Return null CIMPropertyList for all properties
           //
           return CIMPropertyList ();
       }
       else
       {
           //
           //  Return CIMPropertyList for properties referenced in the projection
           //  list (SELECT clause)
           //
           return CIMPropertyList (_selectPropertyNames);
       }
   }
   
   const CIMPropertyList WQLSelectStatement::getWherePropertyList () const
   {
       //
       //  Return CIMPropertyList for properties referenced in the condition
       //  (WHERE clause)
       //  The list may be empty, but may not be NULL
       //
       return CIMPropertyList (_wherePropertyNames);
   }
   
   Boolean WQLSelectStatement::appendWherePropertyName(const CIMName& x)
 { {
     //     //
     // Reject duplicate property names by returning false.     // Reject duplicate property names by returning false.
Line 175 
Line 221 
  
     if (op.getType() == WQLOperand::PROPERTY_NAME)     if (op.getType() == WQLOperand::PROPERTY_NAME)
     {     {
         const String& propertyName = op.getPropertyName();          const CIMName& propertyName = op.getPropertyName();
  
         if (!source->getValue(propertyName, op))         if (!source->getValue(propertyName, op))
             throw NoSuchProperty(propertyName);              throw NoSuchProperty(propertyName.getString());
     }     }
 } }
  
Line 339 
Line 385 
     // Print the class name:     // Print the class name:
     //     //
  
     cout << "    _className: \"" << _className << '"' << endl;      cout << "    _className: \"" << _className.getString() << '"' << endl;
  
     //     //
     // Print the property:      // Print the select properties:
     //     //
  
     for (Uint32 i = 0; i < _selectPropertyNames.size(); i++)      if (_allProperties)
       {
           cout << endl;
           cout << "    _allProperties: TRUE" << endl;
       }
   
       else for (Uint32 i = 0; i < _selectPropertyNames.size(); i++)
     {     {
         if (i == 0)         if (i == 0)
             cout << endl;             cout << endl;
  
         cout << "    _selectPropertyNames[" << i << "]: ";         cout << "    _selectPropertyNames[" << i << "]: ";
         cout << '"' << _selectPropertyNames[i] << '"' << endl;          cout << '"' << _selectPropertyNames[i].getString() << '"' << endl;
     }     }
  
     //     //


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2