Package com.apgar.common.lib.trigger
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 -
Method Summary
Modifier and TypeMethodDescriptioncom.orchestranetworks.schema.PathGets the pathToParentSdlIdvoidhandleAfterCreate(com.orchestranetworks.schema.trigger.AfterCreateOccurrenceContext context) Set the record's meta data information at creation.voidhandleAfterModify(com.orchestranetworks.schema.trigger.AfterModifyOccurrenceContext context) Set the record's meta data information at modification.voidhandleBeforeCreate(com.orchestranetworks.schema.trigger.BeforeCreateOccurrenceContext context) Set the record's active indicator if needed at creation.voidhandleBeforeModify(com.orchestranetworks.schema.trigger.BeforeModifyOccurrenceContext context) Set the record's active indicator if needed at modification.voidsetPathToParentSdlId(com.orchestranetworks.schema.Path pathToParentSdlId) Sets the pathToParentSdlId pathvoidsetup(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
-
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:
setupin classcom.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:
handleAfterCreatein classcom.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:
handleAfterModifyin classcom.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:
handleBeforeCreatein classcom.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:
handleBeforeModifyin classcom.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
-