Class MongoDBUtils


  • public class MongoDBUtils
    extends Object
    A utility class for MongoDB module.
    • Constructor Detail

      • MongoDBUtils

        public MongoDBUtils()
    • Method Detail

      • toRow

        public static org.apache.metamodel.data.Row toRow​(com.mongodb.DBObject dbObject,
                                                          org.apache.metamodel.data.DataSetHeader header)
        Converts a MongoDB data object DBObject into MetaModel Row.
        Parameters:
        dbObject - a MongoDB object storing data.
        header - a header describing the columns of the data stored.
        Returns:
        the MetaModel Row result object.
      • toRow

        public static org.apache.metamodel.data.Row toRow​(Map<?,​?> map,
                                                          org.apache.metamodel.data.DataSetHeader header)
        Converts a map into MetaModel. This map stores data of a MongoDB document.
        Parameters:
        map - a map object storing data of a MongoDB document.
        header - a header describing the columns of the data stored.
        Returns:
        the MetaModel Row result object.