version 1.24, 2006/01/30 16:16:39
|
version 1.25, 2006/05/02 20:26:58
|
|
|
_isResolved = true; | _isResolved = true; |
return; | return; |
} | } |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
CIMType propObjType = propObj.getType(); |
|
if(index == IdSize-1) |
|
{ |
|
_process_value(propObj,Idstrings[index],inQueryCtx); |
|
return; |
|
} |
|
else if((propObjType != CIMTYPE_OBJECT && |
|
propObjType != CIMTYPE_INSTANCE) || |
|
(propObj.getValue().isNull())) |
|
{ |
|
// Object is not embedded. |
|
_valueType = CQLValue::Null_type; |
|
_isResolved = true; |
|
return; |
|
} |
|
CIMValue propValue = propObj.getValue(); |
|
// If the property is an embeddedInstance, convert to an object |
|
if(propObjType == CIMTYPE_INSTANCE) |
|
{ |
|
CIMInstance tmpInst; |
|
propValue.get(tmpInst); |
|
propValue = CIMValue((CIMObject)tmpInst); |
|
} |
|
propValue.get(objectContext); |
|
#else |
if(index == IdSize-1) | if(index == IdSize-1) |
{ | { |
_process_value(propObj,Idstrings[index],inQueryCtx); | _process_value(propObj,Idstrings[index],inQueryCtx); |
|
|
return; | return; |
} | } |
propObj.getValue().get(objectContext); | propObj.getValue().get(objectContext); |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
if(!objectContext.isInstance()) | if(!objectContext.isInstance()) |
{ | { |
MessageLoaderParms mparms("CQL.CQLValueRep.OBJECT_CONTEXT_NOT_INSTANCE", | MessageLoaderParms mparms("CQL.CQLValueRep.OBJECT_CONTEXT_NOT_INSTANCE", |
|
|
_valueType = CQLValue::CIMObject_type; | _valueType = CQLValue::CIMObject_type; |
_isResolved = true; | _isResolved = true; |
} | } |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
else if(propObj.getType() == CIMTYPE_INSTANCE) |
|
{ |
|
CIMInstance cimInstance; |
|
propObj.getValue().get(cimInstance); |
|
|
|
_theValue.set((CIMObject)cimInstance.clone()); |
|
_valueType = CQLValue::CIMObject_type; |
|
_isResolved = true; |
|
} |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
else // Primitive | else // Primitive |
{ | { |
if(_id.isArray()) | if(_id.isArray()) |
|
|
break; | break; |
} | } |
case CIMTYPE_OBJECT: | case CIMTYPE_OBJECT: |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
case CIMTYPE_INSTANCE: |
{ | { |
|
Boolean isInstance = cv.getType() == CIMTYPE_INSTANCE; |
if(key == -1) | if(key == -1) |
{ | { |
_theValue = cv; | _theValue = cv; |
} | } |
else | else |
{ | { |
|
if(isInstance) |
|
{ |
|
Array<CIMInstance> _inst; |
|
cv.get(_inst); |
|
_theValue.set((CIMObject)(_inst[index])); |
|
} |
|
else |
|
{ |
Array<CIMObject> _obj; | Array<CIMObject> _obj; |
cv.get(_obj); | cv.get(_obj); |
_theValue.set(_obj[index]); | _theValue.set(_obj[index]); |
} | } |
|
} |
|
|
_valueType = CQLValue::CIMObject_type; | _valueType = CQLValue::CIMObject_type; |
break; | break; |
} | } |
|
#else |
|
{ |
|
if(key == -1) |
|
{ |
|
_theValue = cv; |
|
} |
|
else |
|
{ |
|
Array<CIMObject> _obj; |
|
cv.get(_obj); |
|
_theValue.set(_obj[index]); |
|
} |
|
_valueType = CQLValue::CIMObject_type; |
|
break; |
|
} |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
default: | default: |
MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"), | MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"), |
String("Unable to set internal object type: $0."), | String("Unable to set internal object type: $0."), |
|
|
_valueType = CQLValue::CIMObject_type; | _valueType = CQLValue::CIMObject_type; |
break; | break; |
} | } |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
case CIMTYPE_INSTANCE: |
|
{ |
|
// Convert the value into an Object value |
|
CIMValue convertedValue(CIMTYPE_OBJECT, false); |
|
CIMInstance tmpInst; |
|
cv.get(tmpInst); |
|
convertedValue.set((CIMObject)tmpInst); |
|
_theValue = convertedValue; |
|
_valueType = CQLValue::CIMObject_type; |
|
break; |
|
} |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
default: | default: |
MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"), | MessageLoaderParms mload(String("CQL.CQLValueRep.SET_VALUE"), |
String("Unable to set internal object type: $0."), | String("Unable to set internal object type: $0."), |
|
|
} | } |
break; | break; |
} | } |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
case CIMTYPE_INSTANCE: |
|
{ |
|
Array<CIMInstance> tmpInst; |
|
_in1.get(tmpInst); |
|
for(Uint32 i = 0; i < tmpInst.size(); ++i) |
|
{ |
|
_cqlVal1.append(CQLValue((CIMObject)tmpInst[i])); |
|
} |
|
break; |
|
} |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
default: | default: |
MessageLoaderParms mload(String("CQL.CQLValueRep.INVALID_ARRAY_COMPARISON"), | MessageLoaderParms mload(String("CQL.CQLValueRep.INVALID_ARRAY_COMPARISON"), |
String("Invalid array comparison type: $0."), | String("Invalid array comparison type: $0."), |
|
|
{ | { |
_cqlVal2.append(CQLValue(_obj2[i])); | _cqlVal2.append(CQLValue(_obj2[i])); |
} | } |
|
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
|
case CIMTYPE_INSTANCE: |
|
{ |
|
Array<CIMObject> tmpInst; |
|
_in2.get(tmpInst); |
|
for(Uint32 i = 0; i < tmpInst.size(); ++i) |
|
{ |
|
_cqlVal2.append(CQLValue((CIMObject)tmpInst[i])); |
|
} |
|
} |
|
#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT |
break; | break; |
} | } |
default: | default: |