public class EventListType
extends java.lang.Object
BasicEventList
with the
help of a PersistentEventList
.
To create the EventLists, an EventListFactory
is used. The default factory simply
instantiates new BasicEventList
s with unshared ReadWriteLock
s and
ListEventPublisher
s. If that doesn't suite your needs, you can either implement and set
your own EventListFactory
implementation. Or you can use a so called
list category. By setting a list category on the
EventListType instance, a different list factory will be used which uses the category to determine
the publisher and lock to use for all EventLists it creates. This way, all EventListType instances
which use the same list category will produce EventLists with the same shared lock and publisher.
The desired list category can be set programmatically by subclassing. When Hibernate bug
HHH-2336
is fixed, you will be able to specify the category as collection type parameter in your
Hibernate mapping file.
setListFactory(EventListFactory)
,
useListCategory(String)
,
PROPERTYNAME_EVENTLIST_CATEGORY
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTYNAME_EVENTLIST_CATEGORY
Name of property for specifying an EventList category in the Hibernate mapping file.
|
Constructor and Description |
---|
EventListType() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.Object collection,
java.lang.Object entity) |
java.util.Iterator |
getElementsIterator(java.lang.Object collection) |
EventListFactory |
getListFactory()
Gets the used EventListFactory.
|
java.lang.Object |
indexOf(java.lang.Object collection,
java.lang.Object obj) |
java.lang.Object |
instantiate()
Instantiate an empty instance of the "underlying" collection (not a wrapper).
|
java.lang.Object |
instantiate(int anticipatedSize) |
PersistentCollection |
instantiate(SessionImplementor session,
CollectionPersister persister) |
java.lang.Object |
replaceElements(java.lang.Object original,
java.lang.Object target,
CollectionPersister persister,
java.lang.Object owner,
java.util.Map copyCache,
SessionImplementor session) |
void |
setListFactory(EventListFactory newListFactory)
Sets a new EventListFactory.
|
void |
setParameterValues(java.util.Properties parameters)
When Hibernate bug HHH-2336
is fixed, this method will be called by Hibernate when reading its mapping files.
|
protected void |
useListCategory(java.lang.String category)
Convenience method to specify the used list category.
|
protected void |
useListCategory(java.lang.String category,
ReadWriteLock lock,
ListEventPublisher publisher)
Convenience method to specify the used list category and the associated ReadWriteLock and
ListEventPublisher
|
PersistentCollection |
wrap(SessionImplementor session,
java.lang.Object collection) |
public static final java.lang.String PROPERTYNAME_EVENTLIST_CATEGORY
public final EventListFactory getListFactory()
public final void setListFactory(EventListFactory newListFactory)
public final void setParameterValues(java.util.Properties parameters)
protected final void useListCategory(java.lang.String category)
protected final void useListCategory(java.lang.String category, ReadWriteLock lock, ListEventPublisher publisher)
public boolean contains(java.lang.Object collection, java.lang.Object entity)
public java.util.Iterator getElementsIterator(java.lang.Object collection)
public java.lang.Object indexOf(java.lang.Object collection, java.lang.Object obj)
public java.lang.Object instantiate()
public java.lang.Object instantiate(int anticipatedSize)
public PersistentCollection instantiate(SessionImplementor session, CollectionPersister persister) throws HibernateException
HibernateException
public java.lang.Object replaceElements(java.lang.Object original, java.lang.Object target, CollectionPersister persister, java.lang.Object owner, java.util.Map copyCache, SessionImplementor session) throws HibernateException
HibernateException
public PersistentCollection wrap(SessionImplementor session, java.lang.Object collection)
Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2013-02-25 11:44