Class GenericValueCreationTrigger

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

public class GenericValueCreationTrigger extends com.orchestranetworks.schema.trigger.TableTrigger
Table trigger to pre-fill a few fields using data in a record passed in the session's tracking info.

This class' input parameters only serve as an example and can be customized as needed.

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.GenericValueCreationTrigger">
                 <name>./name</name>
             </osd:trigger>
         </xs:appinfo>
     </xs:annotation>
 </xs:complexType>
 
Author:
APGAR Consulting
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.orchestranetworks.schema.Path
    Sample field to be set path
    static final com.orchestranetworks.schema.Path
    Record SdlID path
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the parameter field
    void
    handleNewContext(com.orchestranetworks.schema.trigger.NewTransientOccurrenceContext context)
    Sets the parameter value in the record
    void
    Sets the parameter field
    void
    setup(com.orchestranetworks.schema.trigger.TriggerSetupContext arg0)
     

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

    handleAfterCreate, handleAfterDelete, handleAfterModify, handleBeforeCreate, handleBeforeDelete, handleBeforeModify, handleBeforeTransactionCancel, handleBeforeTransactionCommit, zza, zza

    Methods inherited from class java.lang.Object

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

    • SDLID_PATH

      public static final com.orchestranetworks.schema.Path SDLID_PATH
      Record SdlID path
    • NAME_PATH

      public static final com.orchestranetworks.schema.Path NAME_PATH
      Sample field to be set path
  • Constructor Details

    • GenericValueCreationTrigger

      public GenericValueCreationTrigger()
  • Method Details

    • setup

      public void setup(com.orchestranetworks.schema.trigger.TriggerSetupContext arg0)
      Specified by:
      setup in class com.orchestranetworks.schema.trigger.TableTrigger
    • handleNewContext

      public void handleNewContext(com.orchestranetworks.schema.trigger.NewTransientOccurrenceContext context)
      Sets the parameter value in the record
      Overrides:
      handleNewContext in class com.orchestranetworks.schema.trigger.TableTrigger
    • getName

      public String getName()
      Gets the parameter field
      Returns:
      the parameter as a String
    • setName

      public void setName(String name)
      Sets the parameter field
      Parameters:
      name - input parameter as a String