/**
  * Convert SPI object to Mongo DBObject.
  *
  * @param source
  * @param isNested
  * @return
  */
 public static BasicDBObject toDBObject(IDeviceStreamData source, boolean isNested) {
   BasicDBObject result = new BasicDBObject();
   MongoDeviceStreamData.toDBObject(source, result, isNested);
   return result;
 }
 /**
  * @param source
  * @return
  */
 @Override
 public BasicDBObject convert(IDeviceStreamData source) {
   return MongoDeviceStreamData.toDBObject(source, false);
 }
 /**
  * @param source
  * @return
  */
 @Override
 public IDeviceStreamData convert(DBObject source) {
   return MongoDeviceStreamData.fromDBObject(source, false);
 }
 /**
  * Convert a DBObject into the SPI equivalent.
  *
  * @param source
  * @param isNested
  * @return
  */
 public static DeviceStreamData fromDBObject(DBObject source, boolean isNested) {
   DeviceStreamData result = new DeviceStreamData();
   MongoDeviceStreamData.fromDBObject(source, result, isNested);
   return result;
 }