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

Diff for /pegasus/src/Pegasus/WQL/WQLQueryExpressionRep.cpp between version 1.2 and 1.6

version 1.2, 2004/10/17 20:40:15 version 1.6, 2007/04/17 12:38:31
Line 1 
Line 1 
 //%2004////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 6 
Line 6 
 // IBM Corp.; EMC Corporation, The Open Group. // IBM Corp.; EMC Corporation, The Open Group.
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; VERITAS Software Corporation; The Open Group.
   // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
   // EMC Corporation; Symantec Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 25 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Adrian Schuur (schuur@de.ibm.com)  
 //  
 // Modified By:  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include "WQLQueryExpressionRep.h" #include "WQLQueryExpressionRep.h"
Line 45 
Line 45 
    return _stmt->getSelectPropertyList();    return _stmt->getSelectPropertyList();
 } }
  
 WQLQueryExpressionRep::~WQLQueryExpressionRep() {  WQLQueryExpressionRep::~WQLQueryExpressionRep()
   {
    if (_stmt) delete _stmt;    if (_stmt) delete _stmt;
 } }
  
 void WQLQueryExpressionRep::_parse() void WQLQueryExpressionRep::_parse()
 { {
    if (_queryLanguage=="WQL") {     if (_queryLanguage=="WQL")
      {
       _stmt=new WQLSelectStatement();       _stmt=new WQLSelectStatement();
       WQLParser::parse(_query, *_stmt);       WQLParser::parse(_query, *_stmt);
    }    }
    else throw    else throw
      PEGASUS_CIM_EXCEPTION(CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED, _queryLanguage);       PEGASUS_CIM_EXCEPTION(CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED,
                _queryLanguage);
 } }
  
 Boolean WQLQueryExpressionRep::evaluate(const CIMInstance & inst) const Boolean WQLQueryExpressionRep::evaluate(const CIMInstance & inst) const
Line 64 
Line 67 
     if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();     if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();
  
     WQLInstancePropertySource ips(inst);     WQLInstancePropertySource ips(inst);
     try {      try
       {
        if (_stmt->evaluateWhereClause(&ips)) return true;        if (_stmt->evaluateWhereClause(&ips)) return true;
     }     }
     catch (...) {      catch (...)
       {
          return false;          return false;
     }     }
     return false;     return false;
 } }
  
 void WQLQueryExpressionRep::applyProjection(CIMInstance & ci) {  void WQLQueryExpressionRep::applyProjection(CIMInstance & ci,
       Boolean allowMissing)
   {
    if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();    if (_stmt==NULL) ((WQLQueryExpressionRep*)this)->_parse();
  
    _stmt->applyProjection(ci);     _stmt->applyProjection(ci, allowMissing);
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2