Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.collection.AbstractPersistentCollection
org.hibernate.collection.PersistentBag
Nested Class Summary |
Nested classes/interfaces inherited from class org.hibernate.collection.AbstractPersistentCollection | |
AbstractPersistentCollection.DelayedOperation |
Field Summary | |
protected List |
Fields inherited from class org.hibernate.collection.AbstractPersistentCollection | |
UNKNOWN |
Constructor Summary | |
| |
| |
|
Method Summary | |
boolean |
|
void |
|
boolean |
|
boolean |
|
void |
|
void |
|
boolean |
|
boolean |
|
Serializable |
|
boolean |
|
Iterator |
|
boolean |
|
boolean |
|
boolean |
|
Object |
|
Iterator |
|
Object |
|
Object |
|
Collection |
|
Serializable |
|
Object |
|
int |
|
int |
|
void |
|
boolean |
|
boolean | |
boolean |
|
boolean |
|
Iterator |
|
int |
|
ListIterator | |
ListIterator |
|
boolean |
|
boolean |
|
boolean |
|
int |
|
Object |
|
boolean |
|
Object |
|
boolean |
|
boolean |
|
Object |
|
int |
|
List |
|
Object[] |
|
Object[] |
|
String |
|
public PersistentBag()
Not called by Hibernate, but used by non-JDK serialization, eg. SOAP libraries.
public boolean add(Object object)
- See Also:
java.util.Collection.add(Object)
public void add(int i, Object o)
- See Also:
java.util.List.add(int, Object)
public boolean addAll(Collection values)
- See Also:
java.util.Collection.addAll(Collection)
public boolean addAll(int i, Collection c)
- See Also:
java.util.List.addAll(int, Collection)
public void beforeInitialize(CollectionPersister persister, int anticipatedSize)
Called before any elements are read into the collection, allowing appropriate initializations to occur.
- Specified by:
- beforeInitialize in interface PersistentCollection
- Parameters:
persister
- The underlying collection persister.anticipatedSize
- The anticipated size of the collection after initilization is complete.
public void clear()
- See Also:
java.util.Collection.clear()
public boolean contains(Object object)
- See Also:
java.util.Collection.contains(Object)
public boolean containsAll(Collection c)
- See Also:
java.util.Collection.containsAll(Collection)
public Serializable disassemble(CollectionPersister persister) throws HibernateException
Disassemble the collection, ready for the cache
- Specified by:
- disassemble in interface PersistentCollection
public boolean empty()
Is the initialized collection empty?
- Specified by:
- empty in interface PersistentCollection
- Overrides:
- empty in interface AbstractPersistentCollection
public Iterator entries(CollectionPersister persister)
Iterate all collection entries, during update of the database
- Specified by:
- entries in interface PersistentCollection
public boolean entryExists(Object entry, int i)
Does an element exist at this entry in the collection?
- Specified by:
- entryExists in interface PersistentCollection
public boolean equals(Object obj)
Bag does not respect the collection API and do an JVM instance comparison to do the equals. The semantic is broken not to have to initialize a collection for a simple equals() operation.
- See Also:
java.lang.Object.equals(java.lang.Object)
public boolean equalsSnapshot(CollectionPersister persister) throws HibernateException
Does the current state exactly match the snapshot?
- Specified by:
- equalsSnapshot in interface PersistentCollection
public Object get(int i)
- See Also:
java.util.List.get(int)
public Iterator getDeletes(CollectionPersister persister, boolean indexIsFormula) throws HibernateException
Get all the elements that need deleting
- Specified by:
- getDeletes in interface PersistentCollection
public Object getElement(Object entry)
Get the value of the given collection entry
- Specified by:
- getElement in interface PersistentCollection
public Object getIndex(Object entry, int i, CollectionPersister persister)
Get the index of the given collection entry
- Specified by:
- getIndex in interface PersistentCollection
- Parameters:
persister
- it was more elegant before we added this...
public Collection getOrphans(Serializable snapshot, String entityName) throws HibernateException
get all "orphaned" elements
- Specified by:
- getOrphans in interface PersistentCollection
- Overrides:
- getOrphans in interface AbstractPersistentCollection
public Serializable getSnapshot(CollectionPersister persister) throws HibernateException
Return a new snapshot of the current state of the collection
- Specified by:
- getSnapshot in interface PersistentCollection
public Object getSnapshotElement(Object entry, int i)
Get the snapshot value of the given collection entry
- Specified by:
- getSnapshotElement in interface PersistentCollection
public int hashCode()
- See Also:
java.lang.Object.hashCode()
public int indexOf(Object o)
- See Also:
java.util.List.indexOf(Object)
public void initializeFromCache(CollectionPersister persister, Serializable disassembled, Object owner) throws HibernateException
Read the state of the collection from a disassembled cached value
- Specified by:
- initializeFromCache in interface PersistentCollection
public boolean isEmpty()
- See Also:
java.util.Collection.isEmpty()
public boolean isRowUpdatePossible()
- Specified by:
- isRowUpdatePossible in interface PersistentCollection
- Overrides:
- isRowUpdatePossible in interface AbstractPersistentCollection
public boolean isSnapshotEmpty(Serializable snapshot)
Is the snapshot empty?
- Specified by:
- isSnapshotEmpty in interface PersistentCollection
public boolean isWrapper(Object collection)
Is this the wrapper for the given underlying collection instance?
- Specified by:
- isWrapper in interface PersistentCollection
public Iterator iterator()
- See Also:
java.util.Collection.iterator()
public int lastIndexOf(Object o)
- See Also:
java.util.List.lastIndexOf(Object)
public ListIterator listIterator()
- See Also:
java.util.List.listIterator()
public ListIterator listIterator(int i)
- See Also:
java.util.List.listIterator(int)
public boolean needsInserting(Object entry, int i, Type elemType) throws HibernateException
Do we need to insert this element?
- Specified by:
- needsInserting in interface PersistentCollection
public boolean needsRecreate(CollectionPersister persister)
Do we need to completely recreate this collection when it changes?
- Specified by:
- needsRecreate in interface PersistentCollection
- Overrides:
- needsRecreate in interface AbstractPersistentCollection
public boolean needsUpdating(Object entry, int i, Type elemType)
Do we need to update this element?
- Specified by:
- needsUpdating in interface PersistentCollection
public int occurrences(Object o)
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException
Read a row from the JDBC result set
- Specified by:
- readFrom in interface PersistentCollection
public boolean remove(Object o)
- See Also:
java.util.Collection.remove(Object)
public Object remove(int i)
- See Also:
java.util.List.remove(int)
public boolean removeAll(Collection c)
- See Also:
java.util.Collection.removeAll(Collection)
public boolean retainAll(Collection c)
- See Also:
java.util.Collection.retainAll(Collection)
public Object set(int i, Object o)
- See Also:
java.util.List.set(int, Object)
public int size()
- See Also:
java.util.Collection.size()
public List subList(int start, int end)
- See Also:
java.util.List.subList(int, int)
public Object[] toArray()
- See Also:
java.util.Collection.toArray()
public Object[] toArray(Object[] a)
- See Also:
java.util.Collection.toArray(Object[])
public String toString()