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

Diff for /pegasus/src/Pegasus/CQL/CQLSelectStatementRep.cpp between version 1.11 and 1.12

version 1.11, 2005/04/23 13:00:20 version 1.12, 2005/05/03 21:13:49
Line 206 
Line 206 
   PEGASUS_UNREACHABLE( return true; ) //should never get here   PEGASUS_UNREACHABLE( return true; ) //should never get here
 } }
  
 void CQLSelectStatementRep::applyProjection(CIMInstance& inCI) throw(Exception)  void CQLSelectStatementRep::applyProjection(CIMInstance& inCI,
       Boolean allowMissing) throw(Exception)
 { {
   PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::applyProjection(inCI)");   PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::applyProjection(inCI)");
  
Line 407 
Line 408 
         // will not remove properties when filtering the embedded instance.         // will not remove properties when filtering the embedded instance.
         // This call returns whether the embedded instance property         // This call returns whether the embedded instance property
         // should be added to the required property list.         // should be added to the required property list.
         childRequired = applyProjection(childNode, childProp, allPropsRequired);          childRequired = applyProjection(childNode, childProp, allPropsRequired,
               allowMissing);
         inCI.addProperty(childProp);         inCI.addProperty(childProp);
       }       }
     }     }
Line 430 
Line 432 
                  allPropsRequired,                  allPropsRequired,
                  fromList[0].getName(),                  fromList[0].getName(),
                  requiredProps,                  requiredProps,
                  preserve);                   preserve,
                    allowMissing);
 } }
  
 Boolean CQLSelectStatementRep::applyProjection(PropertyNode* node, Boolean CQLSelectStatementRep::applyProjection(PropertyNode* node,
                                                CIMProperty& nodeProp,                                                CIMProperty& nodeProp,
                                                Boolean& preservePropsForParent)                                                 Boolean& preservePropsForParent,
                                                  Boolean allowMissing)
 { {
   PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::applyProjection(node, nodeProp)");   PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::applyProjection(node, nodeProp)");
  
Line 563 
Line 567 
         // should be added to the required property list.         // should be added to the required property list.
         Boolean preserve =         Boolean preserve =
           node->endpoint || allPropsRequired || preservePropsForParent;           node->endpoint || allPropsRequired || preservePropsForParent;
         childRequired = applyProjection(curChild, childProp, preserve);          childRequired = applyProjection(curChild, childProp, preserve,
               allowMissing);
         nodeInst.addProperty(childProp);         nodeInst.addProperty(childProp);
       }       }
     }     }
Line 590 
Line 595 
                  allPropsRequired,                  allPropsRequired,
                  nodeInst.getClassName(),                  nodeInst.getClassName(),
                  requiredProps,                  requiredProps,
                  preserveProps);                   preserveProps,
                    allowMissing);
  
   // Put the projected instance back into the property.   // Put the projected instance back into the property.
   CIMObject newNodeObj(nodeInst);   CIMObject newNodeObj(nodeInst);
Line 675 
Line 681 
                                            Boolean& allPropsRequired,                                            Boolean& allPropsRequired,
                                            const CIMName& allPropsClass,                                            const CIMName& allPropsClass,
                                            Array<CIMName>& requiredProps,                                            Array<CIMName>& requiredProps,
                                            Boolean& preserveProps)                                             Boolean& preserveProps,
       Boolean allowMissing)
 { {
   PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::removeUnneededProperties");    PEG_METHOD_ENTER (TRC_CQL, "CQLSelectStatementRep::filterInstance");
   PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"instance = " + inst.getClassName().getString());   PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"instance = " + inst.getClassName().getString());
   PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"allPropsClass = " + allPropsClass.getString());   PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"allPropsClass = " + allPropsClass.getString());
  
Line 721 
Line 728 
   }   }
  
   // Check that all required properties are on the instance.   // Check that all required properties are on the instance.
     if (!allowMissing)
     {
   for (Uint32 i = 0; i < requiredProps.size(); i++)   for (Uint32 i = 0; i < requiredProps.size(); i++)
   {   {
     if (!containsProperty(requiredProps[i], supportedProps))     if (!containsProperty(requiredProps[i], supportedProps))
     {     {
       PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"missing:" + requiredProps[i].getString());                PEG_TRACE_STRING (TRC_CQL, Tracer::LEVEL4,"missing:" +
                     requiredProps[i].getString());
       PEG_METHOD_EXIT();       PEG_METHOD_EXIT();
       MessageLoaderParms parms("CQL.CQLSelectStatementRep.PROJ_MISSING_PROP",                MessageLoaderParms parms
                     ("CQL.CQLSelectStatementRep.PROJ_MISSING_PROP",
                                "The property $0 is missing on the instance of class $1.",                                "The property $0 is missing on the instance of class $1.",
                                requiredProps[i].getString(), inst.getClassName().getString());                    requiredProps[i].getString(),
                     inst.getClassName().getString());
       throw QueryRuntimePropertyException(parms);       throw QueryRuntimePropertyException(parms);
     }     }
   }   }
     }
  
   // If requested, remove the properties on the instance that are not required.   // If requested, remove the properties on the instance that are not required.
   if (!preserveProps)   if (!preserveProps)


Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2