org.fudgemsg.mapping
Class FudgeMongoDBObject

java.lang.Object
  extended by org.fudgemsg.mapping.FudgeMongoDBObject
All Implemented Interfaces:
com.mongodb.DBObject, org.bson.BSONObject

public class FudgeMongoDBObject
extends Object
implements com.mongodb.DBObject

Wraps a FudgeFieldContainer and implements the DBObject interface, without going through an object conversion stage (as the MongoDBFudgeBuilder will do). This class is very much a work in progress. For details on why, please see http://kirkwylie.blogspot.com/2010/06/performance-of-fudge-persistence-in.html and the comments from the 10gen team at the bottom.


Constructor Summary
FudgeMongoDBObject(MutableFudgeFieldContainer underlying)
          The primary constructor.
 
Method Summary
 boolean containsField(String s)
          
 boolean containsKey(String s)
          
 Object get(String key)
          
 FudgeMsg getUnderlying()
           
 boolean isPartialObject()
          
 Set<String> keySet()
          
 void markAsPartialObject()
          
 Object put(String key, Object v)
          
 void putAll(org.bson.BSONObject o)
          
 void putAll(Map m)
          
 Object removeField(String key)
          
 Map toMap()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FudgeMongoDBObject

public FudgeMongoDBObject(MutableFudgeFieldContainer underlying)
The primary constructor.

Parameters:
underlying - underlying FudgeFieldContainer to be wrapped
Method Detail

getUnderlying

public FudgeMsg getUnderlying()
Returns:
the underlying

containsField

public boolean containsField(String s)

Specified by:
containsField in interface org.bson.BSONObject

containsKey

public boolean containsKey(String s)

Specified by:
containsKey in interface org.bson.BSONObject

get

public Object get(String key)

Specified by:
get in interface org.bson.BSONObject

isPartialObject

public boolean isPartialObject()

Specified by:
isPartialObject in interface com.mongodb.DBObject

keySet

public Set<String> keySet()

Specified by:
keySet in interface org.bson.BSONObject

markAsPartialObject

public void markAsPartialObject()

Specified by:
markAsPartialObject in interface com.mongodb.DBObject

put

public Object put(String key,
                  Object v)

Specified by:
put in interface org.bson.BSONObject

putAll

public void putAll(org.bson.BSONObject o)

Specified by:
putAll in interface org.bson.BSONObject

putAll

public void putAll(Map m)

Specified by:
putAll in interface org.bson.BSONObject

removeField

public Object removeField(String key)

Specified by:
removeField in interface org.bson.BSONObject

toMap

public Map toMap()

Specified by:
toMap in interface org.bson.BSONObject


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0