org.iternine.jeppetto.dao.mongodb.enhance
Class DirtyableDBObjectSet

java.lang.Object
  extended by org.iternine.jeppetto.dao.mongodb.enhance.DirtyableDBObjectList
      extended by org.iternine.jeppetto.dao.mongodb.enhance.DirtyableDBObjectSet
All Implemented Interfaces:
com.mongodb.DBObject, Iterable, Collection, List, Set, org.bson.BSONObject, DirtyableDBObject

public class DirtyableDBObjectSet
extends DirtyableDBObjectList
implements Set

A DirtyableDBObjectSet uses two underlying collection objects to manage the semantics of this class. The first is a Set object which is used to ensure Set semantics are followed, the second is an underlying List, provided by the base class, to ensure ordering and provide the lookup by index methods that DBObject implementations require.


Constructor Summary
DirtyableDBObjectSet()
           
DirtyableDBObjectSet(Set delegate, boolean modifiableDelegate)
           
 
Method Summary
 boolean add(Object element)
           
 boolean addAll(Collection elements)
           
 void clear()
           
 boolean contains(Object element)
           
 boolean containsAll(Collection collection)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 Object put(String s, Object v)
           
 boolean remove(Object element)
           
 boolean removeAll(Collection elements)
           
 Object removeField(String s)
           
 boolean retainAll(Collection elements)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] objects)
           
 
Methods inherited from class org.iternine.jeppetto.dao.mongodb.enhance.DirtyableDBObjectList
add, addAll, containsField, containsKey, get, get, getDirtyKeys, indexOf, isDirty, isPartialObject, isPersisted, isRewrite, keySet, lastIndexOf, listIterator, listIterator, markAsPartialObject, markPersisted, putAll, putAll, remove, set, subList, toMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
equals, hashCode
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

DirtyableDBObjectSet

public DirtyableDBObjectSet()

DirtyableDBObjectSet

public DirtyableDBObjectSet(Set delegate,
                            boolean modifiableDelegate)
Parameters:
delegate -
modifiableDelegate - true if access is possible to the delegate by non-Jeppetto code
Method Detail

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in interface Set
Overrides:
size in class DirtyableDBObjectList

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection
Specified by:
isEmpty in interface List
Specified by:
isEmpty in interface Set
Overrides:
isEmpty in class DirtyableDBObjectList

contains

public boolean contains(Object element)
Specified by:
contains in interface Collection
Specified by:
contains in interface List
Specified by:
contains in interface Set
Overrides:
contains in class DirtyableDBObjectList

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface List
Specified by:
iterator in interface Set
Overrides:
iterator in class DirtyableDBObjectList

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection
Specified by:
toArray in interface List
Specified by:
toArray in interface Set
Overrides:
toArray in class DirtyableDBObjectList

toArray

public Object[] toArray(Object[] objects)
Specified by:
toArray in interface Collection
Specified by:
toArray in interface List
Specified by:
toArray in interface Set
Overrides:
toArray in class DirtyableDBObjectList

add

public boolean add(Object element)
Specified by:
add in interface Collection
Specified by:
add in interface List
Specified by:
add in interface Set
Overrides:
add in class DirtyableDBObjectList

remove

public boolean remove(Object element)
Specified by:
remove in interface Collection
Specified by:
remove in interface List
Specified by:
remove in interface Set
Overrides:
remove in class DirtyableDBObjectList

containsAll

public boolean containsAll(Collection collection)
Specified by:
containsAll in interface Collection
Specified by:
containsAll in interface List
Specified by:
containsAll in interface Set
Overrides:
containsAll in class DirtyableDBObjectList

addAll

public boolean addAll(Collection elements)
Specified by:
addAll in interface Collection
Specified by:
addAll in interface List
Specified by:
addAll in interface Set
Overrides:
addAll in class DirtyableDBObjectList

retainAll

public boolean retainAll(Collection elements)
Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface List
Specified by:
retainAll in interface Set
Overrides:
retainAll in class DirtyableDBObjectList

removeAll

public boolean removeAll(Collection elements)
Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface List
Specified by:
removeAll in interface Set
Overrides:
removeAll in class DirtyableDBObjectList

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface List
Specified by:
clear in interface Set
Overrides:
clear in class DirtyableDBObjectList

removeField

public Object removeField(String s)
Specified by:
removeField in interface org.bson.BSONObject
Overrides:
removeField in class DirtyableDBObjectList

put

public Object put(String s,
                  Object v)
Specified by:
put in interface org.bson.BSONObject
Overrides:
put in class DirtyableDBObjectList


Copyright © 2012. All Rights Reserved.