Class ODocumentHookAbstract

java.lang.Object
com.orientechnologies.orient.core.hook.ODocumentHookAbstract
All Implemented Interfaces:
ORecordHook

public abstract class ODocumentHookAbstract extends Object implements ORecordHook
Hook abstract class that calls separate methods for ODocument records.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
See Also:
  • Field Details

  • Constructor Details

    • ODocumentHookAbstract

      @Deprecated public ODocumentHookAbstract()
      Deprecated.
    • ODocumentHookAbstract

      public ODocumentHookAbstract(ODatabaseDocument database)
  • Method Details

    • onUnregister

      public void onUnregister()
      Specified by:
      onUnregister in interface ORecordHook
    • onRecordBeforeCreate

      public ORecordHook.RESULT onRecordBeforeCreate(ODocument iDocument)
      It's called just before to create the new document.
      Parameters:
      iDocument - The document to create
      Returns:
      True if the document has been modified and a new marshalling is required, otherwise false
    • onRecordAfterCreate

      public void onRecordAfterCreate(ODocument iDocument)
      It's called just after the document is created.
      Parameters:
      iDocument - The document is going to be created
    • onRecordCreateFailed

      public void onRecordCreateFailed(ODocument iDocument)
      It's called just after the document creation was failed.
      Parameters:
      iDocument - The document just created
    • onRecordCreateReplicated

      public void onRecordCreateReplicated(ODocument iDocument)
      It's called just after the document creation was replicated on another node.
      Parameters:
      iDocument - The document just created
    • onRecordBeforeRead

      public ORecordHook.RESULT onRecordBeforeRead(ODocument iDocument)
      It's called just before to read the document.
      Parameters:
      iDocument - The document to read
      Returns:
      True if the document has been modified and a new marshalling is required, otherwise false
    • onRecordAfterRead

      public void onRecordAfterRead(ODocument iDocument)
      It's called just after the document is read.
      Parameters:
      iDocument - The document just read
    • onRecordReadFailed

      public void onRecordReadFailed(ODocument iDocument)
      It's called just after the document read was failed.
      Parameters:
      iDocument - The document just created
    • onRecordReadReplicated

      public void onRecordReadReplicated(ODocument iDocument)
      It's called just after the document read was replicated on another node.
      Parameters:
      iDocument - The document just created
    • onRecordBeforeUpdate

      public ORecordHook.RESULT onRecordBeforeUpdate(ODocument iDocument)
      It's called just before to update the document.
      Parameters:
      iDocument - The document to update
      Returns:
      True if the document has been modified and a new marshalling is required, otherwise false
    • onRecordAfterUpdate

      public void onRecordAfterUpdate(ODocument iDocument)
      It's called just after the document is updated.
      Parameters:
      iDocument - The document just updated
    • onRecordUpdateFailed

      public void onRecordUpdateFailed(ODocument iDocument)
      It's called just after the document updated was failed.
      Parameters:
      iDocument - The document is going to be updated
    • onRecordUpdateReplicated

      public void onRecordUpdateReplicated(ODocument iDocument)
      It's called just after the document updated was replicated.
      Parameters:
      iDocument - The document is going to be updated
    • onRecordBeforeDelete

      public ORecordHook.RESULT onRecordBeforeDelete(ODocument iDocument)
      It's called just before to delete the document.
      Parameters:
      iDocument - The document to delete
      Returns:
      True if the document has been modified and a new marshalling is required, otherwise false
    • onRecordAfterDelete

      public void onRecordAfterDelete(ODocument iDocument)
      It's called just after the document is deleted.
      Parameters:
      iDocument - The document just deleted
    • onRecordDeleteFailed

      public void onRecordDeleteFailed(ODocument iDocument)
      It's called just after the document deletion was failed.
      Parameters:
      iDocument - The document is going to be deleted
    • onRecordDeleteReplicated

      public void onRecordDeleteReplicated(ODocument iDocument)
      It's called just after the document deletion was replicated.
      Parameters:
      iDocument - The document is going to be deleted
    • onRecordFinalizeUpdate

      public void onRecordFinalizeUpdate(ODocument document)
    • onRecordFinalizeCreation

      public void onRecordFinalizeCreation(ODocument document)
    • onRecordFinalizeDeletion

      public void onRecordFinalizeDeletion(ODocument document)
    • onTrigger

      public ORecordHook.RESULT onTrigger(ORecordHook.TYPE iType, ORecord iRecord)
      Specified by:
      onTrigger in interface ORecordHook
    • getIncludeClasses

      public String[] getIncludeClasses()
    • setIncludeClasses

      public ODocumentHookAbstract setIncludeClasses(String... includeClasses)
    • getExcludeClasses

      public String[] getExcludeClasses()
    • setExcludeClasses

      public ODocumentHookAbstract setExcludeClasses(String... excludeClasses)
    • filterBySchemaClass

      protected boolean filterBySchemaClass(ODocument iDocument)