コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * @param source
  * @return
  */
 @Override
 public BasicDBObject convert(IDeviceStreamData source) {
   return MongoDeviceStreamData.toDBObject(source, false);
 }
コード例 #3
0
 /**
  * @param source
  * @return
  */
 @Override
 public IDeviceStreamData convert(DBObject source) {
   return MongoDeviceStreamData.fromDBObject(source, false);
 }
コード例 #4
0
 /**
  * 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;
 }