Package com.db4o.internal.events
Class EventRegistryImpl
- java.lang.Object
-
- com.db4o.internal.events.EventRegistryImpl
-
- All Implemented Interfaces:
EventRegistry,Callbacks
- Direct Known Subclasses:
ClientEventRegistryImpl
public class EventRegistryImpl extends java.lang.Object implements Callbacks, EventRegistry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classEventRegistryImpl.CommittedEvent
-
Field Summary
Fields Modifier and Type Field Description protected Event4Impl_activatedprotected Event4Impl_activatingprotected Event4Impl_classRegisteredprotected Event4Impl_closingprotected Event4Impl_committedprotected Event4Impl_committingprotected Event4Impl_createdprotected Event4Impl_creatingprotected Event4Impl_deactivatedprotected Event4Impl_deactivatingprotected Event4Impl_deletedprotected Event4Impl_deletingprotected Event4Impl_instantiatedprotected Event4Impl_openedprotected Event4Impl_queryFinishedprotected Event4Impl_queryStartedprotected Event4Impl_updatedprotected Event4Impl_updating
-
Constructor Summary
Constructors Constructor Description EventRegistryImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Event4activated()This event is fired after an object is activated.Event4activating()This event is fired before an object is activated.booleancaresAboutCommitted()booleancaresAboutCommitting()booleancaresAboutDeleted()booleancaresAboutDeleting()voidclassOnRegistered(ClassMetadata clazz)Event4classRegistered()This event is fired when a new class is registered with metadata.voidcloseOnStarted(ObjectContainer container)Event4closing()This event is fired when theObjectContainer.close()is called.voidcommitOnCompleted(Transaction transaction, CallbackObjectInfoCollections objectInfoCollections, boolean isOwnCommit)voidcommitOnStarted(Transaction transaction, CallbackObjectInfoCollections objectInfoCollections)Event4committed()This event is fired after a transaction has been committed.Event4committing()This event is fired just before a transaction is committed.Event4created()This event is fired after an object is created (saved for the first time).Event4creating()This event is fired before an object is saved for the first time.Event4deactivated()This event is fired after an object is deactivated.Event4deactivating()This event is fired before an object is deactivated.Event4deleted()This event is fired after an object is deleted.Event4deleting()This event is fired before an object is deleted.static booleaninCallback(InternalObjectContainer container)Event4instantiated()This event is fired when a persistent object is instantiated.booleanobjectCanActivate(Transaction transaction, java.lang.Object obj)booleanobjectCanDeactivate(Transaction transaction, ObjectInfo objectInfo)booleanobjectCanDelete(Transaction transaction, ObjectInfo objectInfo)booleanobjectCanNew(Transaction transaction, java.lang.Object obj)booleanobjectCanUpdate(Transaction transaction, ObjectInfo objectInfo)voidobjectOnActivate(Transaction transaction, ObjectInfo obj)voidobjectOnDeactivate(Transaction transaction, ObjectInfo obj)voidobjectOnDelete(Transaction transaction, ObjectInfo obj)voidobjectOnInstantiate(Transaction transaction, ObjectInfo obj)voidobjectOnNew(Transaction transaction, ObjectInfo obj)voidobjectOnUpdate(Transaction transaction, ObjectInfo obj)protected voidonCommittedListenerAdded()Event4<ObjectContainerEventArgs>opened()This event is fired when theObjectContainerhas finished its startup procedure.voidopenOnFinished(ObjectContainer container)Event4queryFinished()This event is fired upon a query end and can be used to gather query statistics.voidqueryOnFinished(Transaction transaction, Query query)voidqueryOnStarted(Transaction transaction, Query query)Event4queryStarted()This event is fired upon a query start and can be used to gather query statistics.Event4updated()This event is fired after an object is updated.Event4updating()This event is fired before an object is updated.
-
-
-
Field Detail
-
_queryStarted
protected final Event4Impl _queryStarted
-
_queryFinished
protected final Event4Impl _queryFinished
-
_creating
protected final Event4Impl _creating
-
_activating
protected final Event4Impl _activating
-
_updating
protected final Event4Impl _updating
-
_deleting
protected final Event4Impl _deleting
-
_deactivating
protected final Event4Impl _deactivating
-
_created
protected final Event4Impl _created
-
_activated
protected final Event4Impl _activated
-
_updated
protected final Event4Impl _updated
-
_deleted
protected final Event4Impl _deleted
-
_deactivated
protected final Event4Impl _deactivated
-
_committing
protected final Event4Impl _committing
-
_committed
protected final Event4Impl _committed
-
_instantiated
protected final Event4Impl _instantiated
-
_classRegistered
protected final Event4Impl _classRegistered
-
_closing
protected final Event4Impl _closing
-
_opened
protected final Event4Impl _opened
-
-
Method Detail
-
queryOnFinished
public void queryOnFinished(Transaction transaction, Query query)
- Specified by:
queryOnFinishedin interfaceCallbacks
-
queryOnStarted
public void queryOnStarted(Transaction transaction, Query query)
- Specified by:
queryOnStartedin interfaceCallbacks
-
objectCanNew
public boolean objectCanNew(Transaction transaction, java.lang.Object obj)
- Specified by:
objectCanNewin interfaceCallbacks
-
objectCanActivate
public boolean objectCanActivate(Transaction transaction, java.lang.Object obj)
- Specified by:
objectCanActivatein interfaceCallbacks
-
objectCanUpdate
public boolean objectCanUpdate(Transaction transaction, ObjectInfo objectInfo)
- Specified by:
objectCanUpdatein interfaceCallbacks
-
objectCanDelete
public boolean objectCanDelete(Transaction transaction, ObjectInfo objectInfo)
- Specified by:
objectCanDeletein interfaceCallbacks
-
objectCanDeactivate
public boolean objectCanDeactivate(Transaction transaction, ObjectInfo objectInfo)
- Specified by:
objectCanDeactivatein interfaceCallbacks
-
objectOnActivate
public void objectOnActivate(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnActivatein interfaceCallbacks
-
objectOnNew
public void objectOnNew(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnNewin interfaceCallbacks
-
objectOnUpdate
public void objectOnUpdate(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnUpdatein interfaceCallbacks
-
objectOnDelete
public void objectOnDelete(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnDeletein interfaceCallbacks
-
classOnRegistered
public void classOnRegistered(ClassMetadata clazz)
- Specified by:
classOnRegisteredin interfaceCallbacks
-
objectOnDeactivate
public void objectOnDeactivate(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnDeactivatein interfaceCallbacks
-
objectOnInstantiate
public void objectOnInstantiate(Transaction transaction, ObjectInfo obj)
- Specified by:
objectOnInstantiatein interfaceCallbacks
-
commitOnStarted
public void commitOnStarted(Transaction transaction, CallbackObjectInfoCollections objectInfoCollections)
- Specified by:
commitOnStartedin interfaceCallbacks
-
commitOnCompleted
public void commitOnCompleted(Transaction transaction, CallbackObjectInfoCollections objectInfoCollections, boolean isOwnCommit)
- Specified by:
commitOnCompletedin interfaceCallbacks
-
closeOnStarted
public void closeOnStarted(ObjectContainer container)
- Specified by:
closeOnStartedin interfaceCallbacks
-
openOnFinished
public void openOnFinished(ObjectContainer container)
- Specified by:
openOnFinishedin interfaceCallbacks
-
queryFinished
public Event4 queryFinished()
Description copied from interface:EventRegistryThis event is fired upon a query end and can be used to gather query statistics. The query object is available fromQueryEventArgsevent parameter.- Specified by:
queryFinishedin interfaceEventRegistry- Returns:
- event
- See Also:
QueryEventArgs
-
queryStarted
public Event4 queryStarted()
Description copied from interface:EventRegistryThis event is fired upon a query start and can be used to gather query statistics. The query object is available fromQueryEventArgsevent parameter.- Specified by:
queryStartedin interfaceEventRegistry- Returns:
- event
- See Also:
QueryEventArgs
-
creating
public Event4 creating()
Description copied from interface:EventRegistryThis event is fired before an object is saved for the first time. The object can be obtained fromCancellableObjectEventArgsevent parameter. The action can be cancelled usingCancellableObjectEventArgs.cancel()- Specified by:
creatingin interfaceEventRegistry- Returns:
- event
- See Also:
CancellableObjectEventArgs,ObjectContainer.store(Object)
-
activating
public Event4 activating()
Description copied from interface:EventRegistryThis event is fired before an object is activated. The object can be obtained fromCancellableObjectEventArgsevent parameter. The action can be cancelled usingCancellableObjectEventArgs.cancel()- Specified by:
activatingin interfaceEventRegistry- Returns:
- event
- See Also:
CancellableObjectEventArgs,ObjectContainer.activate(Object, int)
-
updating
public Event4 updating()
Description copied from interface:EventRegistryThis event is fired before an object is updated. The object can be obtained fromCancellableObjectEventArgsevent parameter. The action can be cancelled usingCancellableObjectEventArgs.cancel()- Specified by:
updatingin interfaceEventRegistry- Returns:
- event
- See Also:
CancellableObjectEventArgs,ObjectContainer.store(Object)
-
deleting
public Event4 deleting()
Description copied from interface:EventRegistryThis event is fired before an object is deleted. The object can be obtained fromCancellableObjectEventArgsevent parameter. The action can be cancelled usingCancellableObjectEventArgs.cancel()
Note, that this event is not available in networked client/server mode and will throw an exception when attached to a client ObjectContainer.- Specified by:
deletingin interfaceEventRegistry- Returns:
- event
- See Also:
CancellableObjectEventArgs,ObjectContainer.delete(Object)
-
deactivating
public Event4 deactivating()
Description copied from interface:EventRegistryThis event is fired before an object is deactivated. The object can be obtained fromCancellableObjectEventArgsevent parameter. The action can be cancelled usingCancellableObjectEventArgs.cancel()- Specified by:
deactivatingin interfaceEventRegistry- Returns:
- event
- See Also:
CancellableObjectEventArgs,ObjectContainer.deactivate(Object, int)
-
created
public Event4 created()
Description copied from interface:EventRegistryThis event is fired after an object is created (saved for the first time). The object can be obtained from theObjectInfoEventArgsevent parameter.
The event can be used to trigger some post-creation functionality.- Specified by:
createdin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectEventArgs,ObjectContainer.store(Object)
-
activated
public Event4 activated()
Description copied from interface:EventRegistryThis event is fired after an object is activated. The object can be obtained from theObjectInfoEventArgsevent parameter.
The event can be used to trigger some post-activation functionality.- Specified by:
activatedin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectInfoEventArgs,ObjectContainer.activate(Object, int)
-
updated
public Event4 updated()
Description copied from interface:EventRegistryThis event is fired after an object is updated. The object can be obtained from theObjectInfoEventArgsevent parameter.
The event can be used to trigger some post-update functionality.- Specified by:
updatedin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectInfoEventArgs,ObjectContainer.store(Object)
-
deleted
public Event4 deleted()
Description copied from interface:EventRegistryThis event is fired after an object is deleted. The object can be obtained from theObjectInfoEventArgsevent parameter.
The event can be used to trigger some post-deletion functionality.
Note, that this event is not available in networked client/server mode and will throw an exception when attached to a client ObjectContainer.- Specified by:
deletedin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectEventArgs,ObjectContainer.delete(Object)
-
deactivated
public Event4 deactivated()
Description copied from interface:EventRegistryThis event is fired after an object is deactivated. The object can be obtained from theObjectInfoEventArgsevent parameter.
The event can be used to trigger some post-deactivation functionality.- Specified by:
deactivatedin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectEventArgs,ObjectContainer.delete(Object)
-
committing
public Event4 committing()
Description copied from interface:EventRegistryThis event is fired just before a transaction is committed. The transaction and a list of the modified objects can be obtained from theCommitEventArgsevent parameter.
Committing event gives a user a chance to interrupt the commit and rollback the transaction.- Specified by:
committingin interfaceEventRegistry- Returns:
- event
- See Also:
CommitEventArgs,ObjectContainer.commit()
-
committed
public Event4 committed()
Description copied from interface:EventRegistryThis event is fired after a transaction has been committed. The transaction and a list of the modified objects can be obtained from theCommitEventArgsevent parameter.
The event can be used to trigger some post-commit functionality.- Specified by:
committedin interfaceEventRegistry- Returns:
- event
- See Also:
CommitEventArgs,ObjectContainer.commit()
-
classRegistered
public Event4 classRegistered()
Description copied from interface:EventRegistryThis event is fired when a new class is registered with metadata. The class information can be obtained fromClassEventArgsevent parameter.- Specified by:
classRegisteredin interfaceEventRegistry- Returns:
- event
- See Also:
ClassEventArgs
-
instantiated
public Event4 instantiated()
Description copied from interface:EventRegistryThis event is fired when a persistent object is instantiated. The object can be obtained from theObjectInfoEventArgsevent parameter.- Specified by:
instantiatedin interfaceEventRegistry- Returns:
- event
- See Also:
ObjectInfoEventArgs
-
closing
public Event4 closing()
Description copied from interface:EventRegistryThis event is fired when theObjectContainer.close()is called.- Specified by:
closingin interfaceEventRegistry- Returns:
- event
-
onCommittedListenerAdded
protected void onCommittedListenerAdded()
-
caresAboutCommitting
public boolean caresAboutCommitting()
- Specified by:
caresAboutCommittingin interfaceCallbacks
-
caresAboutCommitted
public boolean caresAboutCommitted()
- Specified by:
caresAboutCommittedin interfaceCallbacks
-
caresAboutDeleting
public boolean caresAboutDeleting()
- Specified by:
caresAboutDeletingin interfaceCallbacks
-
caresAboutDeleted
public boolean caresAboutDeleted()
- Specified by:
caresAboutDeletedin interfaceCallbacks
-
opened
public Event4<ObjectContainerEventArgs> opened()
Description copied from interface:EventRegistryThis event is fired when theObjectContainerhas finished its startup procedure.- Specified by:
openedin interfaceEventRegistry- Returns:
- event
-
inCallback
public static boolean inCallback(InternalObjectContainer container)
-
-