|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.odell.glazedlists.hibernate.EventListType
public class EventListType
A Hibernate custom collection type for mapping and persisting a BasicEventList with the
help of a PersistentEventList.
To create the EventLists, an EventListFactory is used. The default factory simply
instantiates new BasicEventLists with unshared ReadWriteLocks and
ListEventPublishers. 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| Field Summary | |
|---|---|
static String |
PROPERTYNAME_EVENTLIST_CATEGORY
Name of property for specifying an EventList category in the Hibernate mapping file. |
| Constructor Summary | |
|---|---|
EventListType()
|
|
| Method Summary | |
|---|---|
boolean |
contains(Object collection,
Object entity)
|
Iterator |
getElementsIterator(Object collection)
|
EventListFactory |
getListFactory()
Gets the used EventListFactory. |
Object |
indexOf(Object collection,
Object obj)
|
Object |
instantiate()
Instantiate an empty instance of the "underlying" collection (not a wrapper). |
Object |
instantiate(int anticipatedSize)
|
PersistentCollection |
instantiate(SessionImplementor session,
CollectionPersister persister)
|
Object |
replaceElements(Object original,
Object target,
CollectionPersister persister,
Object owner,
Map copyCache,
SessionImplementor session)
|
void |
setListFactory(EventListFactory newListFactory)
Sets a new EventListFactory. |
void |
setParameterValues(Properties parameters)
When Hibernate bug HHH-2336 is fixed, this method will be called by Hibernate when reading its mapping files. |
protected void |
useListCategory(String category)
Convenience method to specify the used list category. |
protected void |
useListCategory(String category,
ReadWriteLock lock,
ListEventPublisher publisher)
Convenience method to specify the used list category and the associated ReadWriteLock and ListEventPublisher |
PersistentCollection |
wrap(SessionImplementor session,
Object collection)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTYNAME_EVENTLIST_CATEGORY
| Constructor Detail |
|---|
public EventListType()
| Method Detail |
|---|
public final EventListFactory getListFactory()
public final void setListFactory(EventListFactory newListFactory)
public final void setParameterValues(Properties parameters)
setParameterValues in interface ParameterizedTypeprotected final void useListCategory(String category)
protected final void useListCategory(String category,
ReadWriteLock lock,
ListEventPublisher publisher)
public boolean contains(Object collection,
Object entity)
contains in interface UserCollectionTypepublic Iterator getElementsIterator(Object collection)
getElementsIterator in interface UserCollectionType
public Object indexOf(Object collection,
Object obj)
indexOf in interface UserCollectionTypepublic Object instantiate()
public Object instantiate(int anticipatedSize)
instantiate in interface UserCollectionType
public PersistentCollection instantiate(SessionImplementor session,
CollectionPersister persister)
throws HibernateException
instantiate in interface UserCollectionTypeHibernateException
public Object replaceElements(Object original,
Object target,
CollectionPersister persister,
Object owner,
Map copyCache,
SessionImplementor session)
throws HibernateException
replaceElements in interface UserCollectionTypeHibernateException
public PersistentCollection wrap(SessionImplementor session,
Object collection)
wrap in interface UserCollectionType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||