Package com.apgar.common.lib.trigger
Class DateDefaultValueTrigger
java.lang.Object
com.orchestranetworks.schema.trigger.TableTrigger
com.apgar.common.lib.trigger.DateDefaultValueTrigger
public class DateDefaultValueTrigger
extends com.orchestranetworks.schema.trigger.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the path of the field to be set as a stringvoidhandleNewContext(com.orchestranetworks.schema.trigger.NewTransientOccurrenceContext context) voidsetPathToField(String pathToField) Sets the pathToField parametervoidsetup(com.orchestranetworks.schema.trigger.TriggerSetupContext context) Perform type checkMethods inherited from class com.orchestranetworks.schema.trigger.TableTrigger
handleAfterCreate, handleAfterDelete, handleAfterModify, handleBeforeCreate, handleBeforeDelete, handleBeforeModify, handleBeforeTransactionCancel, handleBeforeTransactionCommit, zza, zza
-
Constructor Details
-
DateDefaultValueTrigger
public DateDefaultValueTrigger()
-
-
Method Details
-
handleNewContext
public void handleNewContext(com.orchestranetworks.schema.trigger.NewTransientOccurrenceContext context) - Overrides:
handleNewContextin classcom.orchestranetworks.schema.trigger.TableTrigger
-
setup
public void setup(com.orchestranetworks.schema.trigger.TriggerSetupContext context) Perform type check- Specified by:
setupin classcom.orchestranetworks.schema.trigger.TableTrigger
-
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
Sets the pathToField parameter- Parameters:
pathToField- path to field
-