org.iternine.jeppetto.dao.mongodb.enhance
Interface DirtyableDBObject

All Superinterfaces:
org.bson.BSONObject, com.mongodb.DBObject
All Known Implementing Classes:
DirtyableDBObjectList, DirtyableDBObjectMap, DirtyableDBObjectSet

public interface DirtyableDBObject
extends com.mongodb.DBObject


Method Summary
 Iterator<String> getDirtyKeys()
           
 boolean isDirty()
           
 boolean isPersisted(com.mongodb.DBCollection dbCollection)
           
 void markPersisted(com.mongodb.DBCollection dbCollection)
          Consider the current state of the object to be in sync with the persisted state.
 
Methods inherited from interface com.mongodb.DBObject
isPartialObject, markAsPartialObject
 
Methods inherited from interface org.bson.BSONObject
containsField, containsKey, get, keySet, put, putAll, putAll, removeField, toMap
 

Method Detail

isDirty

boolean isDirty()
Returns:
true if this object is dirtied from it's persisted state

markPersisted

void markPersisted(com.mongodb.DBCollection dbCollection)
Consider the current state of the object to be in sync with the persisted state.


isPersisted

boolean isPersisted(com.mongodb.DBCollection dbCollection)
Returns:
true if this object has a representation in the underlying store.

getDirtyKeys

Iterator<String> getDirtyKeys()
Returns:
Set of keys corresponding to changed fields in this DBObject


Copyright © 2012. All Rights Reserved.