version 1.1.2.21, 2004/10/29 15:50:24
|
version 1.1.2.22, 2004/10/31 16:02:00
|
|
|
// needs to be done. | // needs to be done. |
propObj = objectContext.getProperty(propertyIndex); | propObj = objectContext.getProperty(propertyIndex); |
| |
|
/* |
if(inQueryCtx.getClassRelation(Idstrings[index].getScope(),classContext) | if(inQueryCtx.getClassRelation(Idstrings[index].getScope(),classContext) |
== QueryContext::NOTRELATED) | == QueryContext::NOTRELATED) |
{ | { |
|
|
_valueType = CQLValue::Null_type; | _valueType = CQLValue::Null_type; |
return; | return; |
} | } |
|
*/ |
| |
if(index == Idstrings.size()-1) | if(index == Idstrings.size()-1) |
{ | { |
|
|
// We need to take the chain and create a complete context | // We need to take the chain and create a complete context |
// for the symbolic constant. We will use the context from | // for the symbolic constant. We will use the context from |
// inCid to populate the context for chain. | // inCid to populate the context for chain. |
|
/* |
_CQLChainId[0].setName(inCid[inCid.size()-1].getName()); | _CQLChainId[0].setName(inCid[inCid.size()-1].getName()); |
_CQLChainId[0].applyScope(inCid[inCid.size()-1].getScope()); | _CQLChainId[0].applyScope(inCid[inCid.size()-1].getScope()); |
|
*/ |
|
|
|
CQLIdentifier id = _CQLChainId[0]; |
|
id.setName(inCid[inCid.size()-1].getName()); |
|
id.applyScope(inCid[inCid.size()-1].getScope()); |
|
|
|
CQLChainedIdentifier chainId(id); |
| |
for(Sint32 i = inCid.size()-2; i >= 0; --i) | for(Sint32 i = inCid.size()-2; i >= 0; --i) |
{ | { |
_CQLChainId.prepend(inCid[i]); |
chainId.prepend(inCid[i]); |
} | } |
| |
|
_CQLChainId = chainId; |
|
|
|
|
CIMInstance temp; | CIMInstance temp; |
resolve(temp,_ctx); | resolve(temp,_ctx); |
} | } |
|
|
{ | { |
_CQLChainId.applyContext(_ctx); | _CQLChainId.applyContext(_ctx); |
} | } |
|
|
|
// Add the chained identifier to the WHERE identifier list. |
|
// Note: CQLValue's are only used in WHERE processing. |
|
if (_CQLChainId.size() > 0) |
|
{ |
|
_ctx.addWhereIdentifier(_CQLChainId); |
|
} |
} | } |
| |
void CQLValueRep::_resolveSymbolicConstant(const QueryContext& inQueryCtx) | void CQLValueRep::_resolveSymbolicConstant(const QueryContext& inQueryCtx) |
|
|
className = _CQLChainId[0].getName(); | className = _CQLChainId[0].getName(); |
} | } |
| |
|
PEGASUS_STD(cout) << _CQLChainId.toString() << PEGASUS_STD(endl); |
|
|
QueryClass = inQueryCtx.getClass(className); | QueryClass = inQueryCtx.getClass(className); |
| |
Uint32 propertyIndex = | Uint32 propertyIndex = |
|
|
| |
if(propertyIndex == PEG_NOT_FOUND) | if(propertyIndex == PEG_NOT_FOUND) |
{ | { |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant"))); |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant1"))); |
} | } |
| |
CIMProperty queryPropObj = QueryClass.getProperty(propertyIndex); | CIMProperty queryPropObj = QueryClass.getProperty(propertyIndex); |
|
|
if(qualIndex == PEG_NOT_FOUND) | if(qualIndex == PEG_NOT_FOUND) |
{ | { |
// This property can not be processed with a symbolic constant. | // This property can not be processed with a symbolic constant. |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant"))); |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant2"))); |
} | } |
| |
valueMap = queryPropObj.getQualifier(qualIndex).getValue(); | valueMap = queryPropObj.getQualifier(qualIndex).getValue(); |
|
|
{ | { |
// The symbolic constant provided is not valid | // The symbolic constant provided is not valid |
// for this property. | // for this property. |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant"))); |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant3"))); |
} | } |
| |
// The symbolic constant defined in the CQLIdentifier is | // The symbolic constant defined in the CQLIdentifier is |
|
|
{ | { |
// The symbolic constant provided is not valid | // The symbolic constant provided is not valid |
// for this property. | // for this property. |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant"))); |
throw(Exception(String("CQLValueRep::_resolveSymbolicConstant4"))); |
} | } |
| |
CString cStr = valueMapArray[matchIndex].getCString(); | CString cStr = valueMapArray[matchIndex].getCString(); |