FileDocCategorySizeDatePackage
UserCollectionType.javaAPI DocHibernate 3.2.52239Wed Jul 05 13:17:28 BST 2006org.hibernate.usertype

UserCollectionType

public interface UserCollectionType
A custom type for mapping user-written classes that implement PersistentCollection
see
org.hibernate.collection.PersistentCollection
author
Gavin King

Fields Summary
Constructors Summary
Methods Summary
public booleancontains(java.lang.Object collection, java.lang.Object entity)
Optional operation. Does the collection contain the entity instance?

public java.util.IteratorgetElementsIterator(java.lang.Object collection)
Return an iterator over the elements of this collection - the passed collection instance may or may not be a wrapper

public java.lang.ObjectindexOf(java.lang.Object collection, java.lang.Object entity)
Optional operation. Return the index of the entity in the collection.

public org.hibernate.collection.PersistentCollectioninstantiate(org.hibernate.engine.SessionImplementor session, org.hibernate.persister.collection.CollectionPersister persister)
Instantiate an uninitialized instance of the collection wrapper

public java.lang.Objectinstantiate(int anticipatedSize)
Instantiate an empty instance of the "underlying" collection (not a wrapper), but with the given anticipated size (i.e. accounting for initial size and perhaps load factor).

param
anticipatedSize The anticipated size of the instaniated collection after we are done populating it. Note, may be negative to indicate that we not yet know anything about the anticipated size (i.e., when initializing from a result set row by row).

public java.lang.ObjectreplaceElements(java.lang.Object original, java.lang.Object target, org.hibernate.persister.collection.CollectionPersister persister, java.lang.Object owner, java.util.Map copyCache, org.hibernate.engine.SessionImplementor session)
Replace the elements of a collection with the elements of another collection

public org.hibernate.collection.PersistentCollectionwrap(org.hibernate.engine.SessionImplementor session, java.lang.Object collection)
Wrap an instance of a collection