Class MetaDataTableTrigger

java.lang.Object
com.orchestranetworks.schema.trigger.TableTrigger
com.apgar.common.lib.trigger.MetaDataTableTrigger

public class MetaDataTableTrigger extends com.orchestranetworks.schema.trigger.TableTrigger
Table trigger that allows the handling of a record's Tracking Information section.

The trigger is defined as follows for the table it is applied on in the XSD of its dataset.

 <xs:complexType name="SampleTable_Type">
     <xs:annotation>
         <xs:documentation xml:lang="en-US">
             <osd:label>Sample Table</osd:label>
         </xs:documentation>
         <xs:appinfo>
             <osd:table>...</osd:table>
             <osd:trigger class="com.apgar.common.lib.trigger.MetaDataTableTrigger"/>
         </xs:appinfo>
     </xs:annotation>
 </xs:complexType>
 
Author:
APGAR Consulting
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.orchestranetworks.schema.Path
    Gets the pathToParentSdlId
    void
    handleAfterCreate(com.orchestranetworks.schema.trigger.AfterCreateOccurrenceContext context)
    Set the record's meta data information at creation.
    void
    handleAfterModify(com.orchestranetworks.schema.trigger.AfterModifyOccurrenceContext context)
    Set the record's meta data information at modification.
    void
    handleBeforeCreate(com.orchestranetworks.schema.trigger.BeforeCreateOccurrenceContext context)
    Set the record's active indicator if needed at creation.
    void
    handleBeforeModify(com.orchestranetworks.schema.trigger.BeforeModifyOccurrenceContext context)
    Set the record's active indicator if needed at modification.
    void
    setPathToParentSdlId(com.orchestranetworks.schema.Path pathToParentSdlId)
    Sets the pathToParentSdlId path
    void
    setup(com.orchestranetworks.schema.trigger.TriggerSetupContext context)
    Checks if active indicator needs to be set.

    Methods inherited from class com.orchestranetworks.schema.trigger.TableTrigger

    handleAfterDelete, handleBeforeDelete, handleBeforeTransactionCancel, handleBeforeTransactionCommit, handleNewContext, zza, zza

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MetaDataTableTrigger

      public MetaDataTableTrigger()
  • Method Details

    • setup

      public void setup(com.orchestranetworks.schema.trigger.TriggerSetupContext context)
      Checks if active indicator needs to be set. This is a rule declared in the CommonRules class.
      Specified by:
      setup in class com.orchestranetworks.schema.trigger.TableTrigger
      Parameters:
      context - TriggerSetupContext
    • handleAfterCreate

      public void handleAfterCreate(com.orchestranetworks.schema.trigger.AfterCreateOccurrenceContext context) throws com.orchestranetworks.service.OperationException
      Set the record's meta data information at creation. This is a rule declared in the CommonRules class.
      Overrides:
      handleAfterCreate in class com.orchestranetworks.schema.trigger.TableTrigger
      Parameters:
      context - AfterCreateOccurrenceContext
      Throws:
      com.orchestranetworks.service.OperationException
    • handleAfterModify

      public void handleAfterModify(com.orchestranetworks.schema.trigger.AfterModifyOccurrenceContext context) throws com.orchestranetworks.service.OperationException
      Set the record's meta data information at modification. This is a rule declared in the CommonRules class.
      Overrides:
      handleAfterModify in class com.orchestranetworks.schema.trigger.TableTrigger
      Parameters:
      context - AfterModifyOccurrenceContext
      Throws:
      com.orchestranetworks.service.OperationException
    • handleBeforeCreate

      public void handleBeforeCreate(com.orchestranetworks.schema.trigger.BeforeCreateOccurrenceContext context) throws com.orchestranetworks.service.OperationException
      Set the record's active indicator if needed at creation. This is a rule declared in the CommonRules class.
      Overrides:
      handleBeforeCreate in class com.orchestranetworks.schema.trigger.TableTrigger
      Parameters:
      context - BeforeCreateOccurrenceContext
      Throws:
      com.orchestranetworks.service.OperationException
    • handleBeforeModify

      public void handleBeforeModify(com.orchestranetworks.schema.trigger.BeforeModifyOccurrenceContext context) throws com.orchestranetworks.service.OperationException
      Set the record's active indicator if needed at modification. This is a rule declared in the CommonRules class.
      Overrides:
      handleBeforeModify in class com.orchestranetworks.schema.trigger.TableTrigger
      Parameters:
      context - BeforeModifyOccurrenceContext
      Throws:
      com.orchestranetworks.service.OperationException
    • getPathToParentSdlId

      public com.orchestranetworks.schema.Path getPathToParentSdlId()
      Gets the pathToParentSdlId
      Returns:
      pathToParentSdlId Path
    • setPathToParentSdlId

      public void setPathToParentSdlId(com.orchestranetworks.schema.Path pathToParentSdlId)
      Sets the pathToParentSdlId path
      Parameters:
      pathToParentSdlId - Path