Package com.sissi.ucenter.relation.muc.room

Examples of com.sissi.ucenter.relation.muc.room.RoomConfigParser


     * @see com.sissi.ucenter.relation.muc.room.Room#push(com.sissi.field.Fields)
     */
    public Room push(Fields fields) {
      BasicDBObjectBuilder update = BasicDBObjectBuilder.start();
      for (Field<?> field : fields) {
        RoomConfigParser parser = MongoRoomBuilder.this.parsers.get(field.getName());
        if (parser != null) {
          update.add(Dictionary.FIELD_CONFIGS + "." + parser.field(), parser.parse(field));
        }
      }
      if (!update.isEmpty()) {
        MongoRoomBuilder.this.config.collection().update(this.build(), BasicDBObjectBuilder.start("$set", update.get()).get());
      }
View Full Code Here


     * {"$set":{"configs.Xxx":Xxx}}
     *
     * @see com.sissi.ucenter.relation.muc.room.Room#push(com.sissi.field.Field)
     */
    public Room push(Field<?> field) {
      RoomConfigParser parser = MongoRoomBuilder.this.parsers.get(field.getName());
      if (parser != null) {
        MongoRoomBuilder.this.config.collection().update(this.build(), BasicDBObjectBuilder.start("$set", BasicDBObjectBuilder.start(Dictionary.FIELD_CONFIGS + "." + parser.field(), parser.parse(field)).get()).get());
      }
      return this;
    }
View Full Code Here

TOP

Related Classes of com.sissi.ucenter.relation.muc.room.RoomConfigParser

Copyright © 2018 www.massapicom. 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.