Package com.massivecraft.mcore.xlib.mongodb

Examples of com.massivecraft.mcore.xlib.mongodb.BasicDBObject.removeField()


  {
    DBCollection dbcoll = fixColl(coll);
    BasicDBObject raw = (BasicDBObject)dbcoll.findOne(new BasicDBObject(ID_FIELD, id));
    if (raw == null) return null;
   
    Long mtime = ((Number)raw.removeField(MTIME_FIELD)).longValue();
    raw.removeField(ID_FIELD);
   
    JsonElement element = GsonMongoConverter.mongo2GsonObject(raw);
   
    return new SimpleEntry<JsonElement, Long>(element, mtime);
View Full Code Here


    DBCollection dbcoll = fixColl(coll);
    BasicDBObject raw = (BasicDBObject)dbcoll.findOne(new BasicDBObject(ID_FIELD, id));
    if (raw == null) return null;
   
    Long mtime = ((Number)raw.removeField(MTIME_FIELD)).longValue();
    raw.removeField(ID_FIELD);
   
    JsonElement element = GsonMongoConverter.mongo2GsonObject(raw);
   
    return new SimpleEntry<JsonElement, Long>(element, mtime);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.