org.iternine.jeppetto.dao.mongodb.enhance
Class DirtyableDBObjectList
java.lang.Object
org.iternine.jeppetto.dao.mongodb.enhance.DirtyableDBObjectList
- All Implemented Interfaces:
- com.mongodb.DBObject, Iterable, Collection, List, org.bson.BSONObject, DirtyableDBObject
- Direct Known Subclasses:
- DirtyableDBObjectSet
public class DirtyableDBObjectList
- extends Object
- implements List, DirtyableDBObject
|
Constructor Summary |
DirtyableDBObjectList()
Default constructor that uses an ArrayList as the delegate and expects no non-Jeppetto
access. |
DirtyableDBObjectList(List delegate,
boolean modifiableDelegate)
Constructor that takes is passed the delegate list along w/ an indication as to
whether the delegate is modifiable by code outside of Jeppetto. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirtyableDBObjectList
public DirtyableDBObjectList()
- Default constructor that uses an ArrayList as the delegate and expects no non-Jeppetto
access.
DirtyableDBObjectList
public DirtyableDBObjectList(List delegate,
boolean modifiableDelegate)
- Constructor that takes is passed the delegate list along w/ an indication as to
whether the delegate is modifiable by code outside of Jeppetto.
- Parameters:
delegate - the underlying List implementationmodifiableDelegate - true if access is possible to the delegate by non-Jeppetto code
add
public void add(int index,
Object element)
- Specified by:
add in interface List
addAll
public boolean addAll(int index,
Collection elements)
- Specified by:
addAll in interface List
remove
public Object remove(int index)
- Specified by:
remove in interface List
removeAll
public boolean removeAll(Collection collection)
- Specified by:
removeAll in interface Collection- Specified by:
removeAll in interface List
set
public Object set(int index,
Object element)
- Specified by:
set in interface List
add
public boolean add(Object element)
- Specified by:
add in interface Collection- Specified by:
add in interface List
remove
public boolean remove(Object object)
- Specified by:
remove in interface Collection- Specified by:
remove in interface List
addAll
public boolean addAll(Collection elements)
- Specified by:
addAll in interface Collection- Specified by:
addAll in interface List
retainAll
public boolean retainAll(Collection collection)
- Specified by:
retainAll in interface Collection- Specified by:
retainAll in interface List
clear
public void clear()
- Specified by:
clear in interface Collection- Specified by:
clear in interface List
size
public int size()
- Specified by:
size in interface Collection- Specified by:
size in interface List
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection- Specified by:
isEmpty in interface List
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection- Specified by:
contains in interface List
iterator
public Iterator iterator()
- Specified by:
iterator in interface Iterable- Specified by:
iterator in interface Collection- Specified by:
iterator in interface List
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List
toArray
public Object[] toArray(Object[] objects)
- Specified by:
toArray in interface Collection- Specified by:
toArray in interface List
containsAll
public boolean containsAll(Collection objects)
- Specified by:
containsAll in interface Collection- Specified by:
containsAll in interface List
get
public Object get(int index)
- Specified by:
get in interface List
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf in interface List
listIterator
public ListIterator listIterator()
- Specified by:
listIterator in interface List
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator in interface List
subList
public List subList(int fromIndex,
int toIndex)
- Specified by:
subList in interface List
isDirty
public boolean isDirty()
- Specified by:
isDirty in interface DirtyableDBObject
- Returns:
- true if this object is dirtied from it's persisted state
markPersisted
public void markPersisted(com.mongodb.DBCollection dbCollection)
- Description copied from interface:
DirtyableDBObject
- Consider the current state of the object to be in sync with the persisted state.
- Specified by:
markPersisted in interface DirtyableDBObject
isPersisted
public boolean isPersisted(com.mongodb.DBCollection dbCollection)
- Specified by:
isPersisted in interface DirtyableDBObject
- Returns:
- true if this object has a representation in the underlying store.
getDirtyKeys
public Iterator<String> getDirtyKeys()
- Specified by:
getDirtyKeys in interface DirtyableDBObject
- Returns:
- Set of keys corresponding to changed fields in this DBObject
markAsPartialObject
public void markAsPartialObject()
- Specified by:
markAsPartialObject in interface com.mongodb.DBObject
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
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
removeField
public Object removeField(String s)
- Specified by:
removeField in interface org.bson.BSONObject
toMap
public Map toMap()
- Specified by:
toMap in interface org.bson.BSONObject
get
public Object get(String s)
- Specified by:
get in interface org.bson.BSONObject
putAll
public void putAll(Map m)
- Specified by:
putAll in interface org.bson.BSONObject
putAll
public void putAll(org.bson.BSONObject o)
- Specified by:
putAll in interface org.bson.BSONObject
put
public Object put(String s,
Object v)
- Specified by:
put in interface org.bson.BSONObject
isRewrite
public boolean isRewrite()
Copyright © 2012. All Rights Reserved.