
public class OClassTrigger extends ODocumentHookAbstract implements ORecordHook.Scoped
ORecordHook.DISTRIBUTED_EXECUTION_MODE, ORecordHook.HOOK_POSITION, ORecordHook.RESULT, ORecordHook.SCOPE, ORecordHook.Scoped, ORecordHook.TYPE| Modifier and Type | Field and Description |
|---|---|
static String |
CLASSNAME |
static String |
METHOD_SEPARATOR |
static String |
ONAFTER_CREATED |
static String |
ONAFTER_DELETE |
static String |
ONAFTER_READ |
static String |
ONAFTER_UPDATED |
static String |
ONBEFORE_CREATED |
static String |
ONBEFORE_DELETE |
static String |
ONBEFORE_READ |
static String |
ONBEFORE_UPDATED |
static String |
PROP_AFTER_CREATE |
static String |
PROP_AFTER_DELETE |
static String |
PROP_AFTER_READ |
static String |
PROP_AFTER_UPDATE |
static String |
PROP_BEFORE_CREATE |
static String |
PROP_BEFORE_DELETE |
static String |
PROP_BEFORE_READ |
static String |
PROP_BEFORE_UPDATE |
database| Constructor and Description |
|---|
OClassTrigger(ODatabaseDocument database) |
| Modifier and Type | Method and Description |
|---|---|
ORecordHook.DISTRIBUTED_EXECUTION_MODE |
getDistributedExecutionMode() |
ORecordHook.SCOPE[] |
getScopes()
Returns the array of scopes this hook interested in.
|
void |
onRecordAfterCreate(ODocument iDocument)
It's called just after the document is created.
|
void |
onRecordAfterDelete(ODocument iDocument)
It's called just after the document is deleted.
|
void |
onRecordAfterRead(ODocument iDocument)
It's called just after the document is read.
|
void |
onRecordAfterUpdate(ODocument iDocument)
It's called just after the document is updated.
|
ORecordHook.RESULT |
onRecordBeforeCreate(ODocument iDocument)
It's called just before to create the new document.
|
ORecordHook.RESULT |
onRecordBeforeDelete(ODocument iDocument)
It's called just before to delete the document.
|
ORecordHook.RESULT |
onRecordBeforeRead(ODocument iDocument)
It's called just before to read the document.
|
ORecordHook.RESULT |
onRecordBeforeUpdate(ODocument iDocument)
It's called just before to update the document.
|
ORecordHook.RESULT |
onTrigger(ORecordHook.TYPE iType,
ORecord iRecord) |
filterBySchemaClass, getExcludeClasses, getIncludeClasses, onRecordCreateFailed, onRecordCreateReplicated, onRecordDeleteFailed, onRecordDeleteReplicated, onRecordFinalizeCreation, onRecordFinalizeDeletion, onRecordFinalizeUpdate, onRecordReadFailed, onRecordReadReplicated, onRecordUpdateFailed, onRecordUpdateReplicated, onUnregister, setExcludeClasses, setIncludeClassesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonUnregisterpublic static final String CLASSNAME
public static final String METHOD_SEPARATOR
public static final String ONBEFORE_CREATED
public static final String PROP_BEFORE_CREATE
public static final String ONAFTER_CREATED
public static final String PROP_AFTER_CREATE
public static final String ONBEFORE_READ
public static final String PROP_BEFORE_READ
public static final String ONAFTER_READ
public static final String PROP_AFTER_READ
public static final String ONBEFORE_UPDATED
public static final String PROP_BEFORE_UPDATE
public static final String ONAFTER_UPDATED
public static final String PROP_AFTER_UPDATE
public static final String ONBEFORE_DELETE
public static final String PROP_BEFORE_DELETE
public static final String ONAFTER_DELETE
public static final String PROP_AFTER_DELETE
public OClassTrigger(ODatabaseDocument database)
public ORecordHook.SCOPE[] getScopes()
ORecordHook.ScopedReturns the array of scopes this hook interested in. By default, all available scopes are returned, implement/override this method to limit the scopes this hook may participate to lower the number of useless invocations of this hook.
Limiting the hook to proper scopes may give huge performance boost, especially if the hook
ORecordHook.onTrigger(TYPE, ORecord) dispatcher implementation is heavy. In extreme cases, you may override the ORecordHook.onTrigger(TYPE, ORecord) to act directly on event ORecordHook.TYPE and exit early, scopes are just a more handy
alternative to this.
getScopes in interface ORecordHook.ScopedORecordHook.SCOPEpublic ORecordHook.DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode()
getDistributedExecutionMode in interface ORecordHookpublic ORecordHook.RESULT onRecordBeforeCreate(ODocument iDocument)
ODocumentHookAbstractonRecordBeforeCreate in class ODocumentHookAbstractiDocument - The document to createpublic void onRecordAfterCreate(ODocument iDocument)
ODocumentHookAbstractonRecordAfterCreate in class ODocumentHookAbstractiDocument - The document is going to be createdpublic ORecordHook.RESULT onRecordBeforeRead(ODocument iDocument)
ODocumentHookAbstractonRecordBeforeRead in class ODocumentHookAbstractiDocument - The document to readpublic void onRecordAfterRead(ODocument iDocument)
ODocumentHookAbstractonRecordAfterRead in class ODocumentHookAbstractiDocument - The document just readpublic ORecordHook.RESULT onRecordBeforeUpdate(ODocument iDocument)
ODocumentHookAbstractonRecordBeforeUpdate in class ODocumentHookAbstractiDocument - The document to updatepublic void onRecordAfterUpdate(ODocument iDocument)
ODocumentHookAbstractonRecordAfterUpdate in class ODocumentHookAbstractiDocument - The document just updatedpublic ORecordHook.RESULT onRecordBeforeDelete(ODocument iDocument)
ODocumentHookAbstractonRecordBeforeDelete in class ODocumentHookAbstractiDocument - The document to deletepublic void onRecordAfterDelete(ODocument iDocument)
ODocumentHookAbstractonRecordAfterDelete in class ODocumentHookAbstractiDocument - The document just deletedpublic ORecordHook.RESULT onTrigger(ORecordHook.TYPE iType, ORecord iRecord)
onTrigger in interface ORecordHookonTrigger in class ODocumentHookAbstractCopyright © 2009–2025 OrientDB. All rights reserved.