Object ob=arrayIt.next();
if(!(ob instanceof Calendar)){
throw new SPLException("Value should be of type Calendar");
}
Calendar cal=(Calendar)ob;
CIMDateTime calCIM=new CIMDateTime(cal.getTime());
cimDateTimeArray.add(calCIM);
}
Object actualValue=(CIMDateTime[])cimDateTimeArray.toArray();
cimval=new CIMValue(actualValue);
}
}else{
if(type==CIMDataType.UINT8){
Short sht=new Short(Short.parseShort(CIMKeyValue.toString()));
UnsignedInt8 uint8= new UnsignedInt8(sht.shortValue());
cimval=new CIMValue(uint8);
}
if(type==CIMDataType.UINT16){
Integer integ=new Integer(Integer.parseInt(CIMKeyValue.toString()));
UnsignedInt16 uint16= new UnsignedInt16(integ.intValue());
cimval=new CIMValue(uint16);
}
if(type==CIMDataType.UINT32){
Long lng=new Long(Long.parseLong(CIMKeyValue.toString()));
UnsignedInt32 uint32= new UnsignedInt32(lng.longValue());
cimval=new CIMValue(uint32);
}
if(type==CIMDataType.UINT64){
Long shrt=new Long(Long.parseLong(CIMKeyValue.toString()));
BigInteger big=BigInteger.valueOf(shrt.longValue());
UnsignedInt64 uint64= new UnsignedInt64(big.abs());
cimval=new CIMValue(uint64);
}
if(type==CIMDataType.SINT8){
Byte byt=new Byte(Byte.parseByte(CIMKeyValue.toString()));
cimval=new CIMValue(byt);
}
if(type==CIMDataType.SINT16){
Short sht=new Short(Short.parseShort(CIMKeyValue.toString()));
cimval=new CIMValue(sht);
}
if(type==CIMDataType.SINT32){
Integer integ=new Integer(Integer.parseInt(CIMKeyValue.toString()));
cimval=new CIMValue(integ);
}
if(type==CIMDataType.SINT64){
Long lng=new Long(Long.parseLong(CIMKeyValue.toString()));
cimval=new CIMValue(lng);
}
if(type==CIMDataType.REAL32){
Float flt=new Float(Float.parseFloat(CIMKeyValue.toString()));
cimval=new CIMValue(flt);
}
if(type==CIMDataType.REAL64){
Double dbl=new Double(Double.parseDouble(CIMKeyValue.toString()));
cimval=new CIMValue(dbl);
}
if(type==CIMDataType.CHAR16){
Character cha=new Character((CIMKeyValue.toString()).charAt(0));
cimval=new CIMValue(cha);
}
if(type==CIMDataType.BOOLEAN){
Boolean booln=Boolean.valueOf(CIMKeyValue.toString());
cimval=new CIMValue(booln);
}
if(type==CIMDataType.STRING){
String str=CIMKeyValue.toString();
cimval=new CIMValue(str);
}
if(type==CIMDataType.DATETIME){
if(!(CIMKeyValue instanceof Calendar)){
throw new SPLException("Value should be of type Calendar");
}
Calendar cal=(Calendar)CIMKeyValue;
CIMDateTime calCIM=new CIMDateTime(cal.getTime());
cimval=new CIMValue(calCIM);
}
}
return cimval;