com.mongodb
Class DefaultDBCallback

java.lang.Object
  extended by org.bson.BasicBSONCallback
      extended by com.mongodb.DefaultDBCallback
All Implemented Interfaces:
DBCallback, BSONCallback

public class DefaultDBCallback
extends BasicBSONCallback
implements DBCallback

This class overrides BasicBSONCallback to implement some extra features specific to the Database. For example DBRef type.

Author:
antoine

Field Summary
static DBCallbackFactory FACTORY
           
 
Constructor Summary
DefaultDBCallback(DBCollection coll)
           
 
Method Summary
 BSONObject create()
           
 BSONObject create(boolean array, List<String> path)
           
 void gotDBRef(String name, String ns, ObjectId id)
           
 Object objectDone()
           
 void objectStart(boolean array, String name)
           
 void reset()
           
 
Methods inherited from class org.bson.BasicBSONCallback
_put, arrayDone, arrayStart, arrayStart, createBSONCallback, createList, cur, curName, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, isStackEmpty, objectStart, objectStart, objectStart, setRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.bson.BSONCallback
arrayDone, arrayStart, arrayStart, createBSONCallback, get, gotBinary, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, objectStart, objectStart, objectStart
 

Field Detail

FACTORY

public static DBCallbackFactory FACTORY
Constructor Detail

DefaultDBCallback

public DefaultDBCallback(DBCollection coll)
Method Detail

gotDBRef

public void gotDBRef(String name,
                     String ns,
                     ObjectId id)
Specified by:
gotDBRef in interface BSONCallback
Overrides:
gotDBRef in class BasicBSONCallback

objectStart

public void objectStart(boolean array,
                        String name)
Overrides:
objectStart in class BasicBSONCallback

objectDone

public Object objectDone()
Specified by:
objectDone in interface BSONCallback
Overrides:
objectDone in class BasicBSONCallback

create

public BSONObject create()
Overrides:
create in class BasicBSONCallback

create

public BSONObject create(boolean array,
                         List<String> path)
Overrides:
create in class BasicBSONCallback

reset

public void reset()
Specified by:
reset in interface BSONCallback
Overrides:
reset in class BasicBSONCallback