Class DateDefaultValueTrigger

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

public class DateDefaultValueTrigger extends TableTrigger
Table trigger to fill a field (path as a parameter) with the current date value. Simple Date and DateTime type check is executed.

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.DateDefaultValueTrigger">
                 <pathToField>./pathToField</pathToField>
             </osd:trigger>
         </xs:appinfo>
     </xs:annotation>
 </xs:complexType>
 
Author:
APGAR Consulting
  • Constructor Details

    • DateDefaultValueTrigger

      public DateDefaultValueTrigger()
  • Method Details

    • handleNewContext

      public void handleNewContext(NewTransientOccurrenceContext context)
      Overrides:
      handleNewContext in class TableTrigger
    • setup

      public void setup(TriggerSetupContext context)
      Perform type check
      Specified by:
      setup in class TableTrigger
    • getPathToField

      public String getPathToField()
      Returns the path of the field to be set as a string
      Returns:
      the formatted String path of the field set by the trigger
    • setPathToField

      public void setPathToField(String pathToField)
      Sets the pathToField parameter
      Parameters:
      pathToField - path to field