Interface SyntheticModelListener


public interface SyntheticModelListener
This interface is intended to be implemented and provided when calling UserDefinedPageService#registerSynthetic1to1(String, Class, Class, String, SyntheticModelListener).
  • Method Summary

    Modifier and Type Method Description
    void postAction​(java.lang.String actionName, Model parentModel, Model childModel, PlatformUserContext userContext)
    This method is called after an action has been executed on the childModel by the user on a User-defined Page.
    void preAction​(java.lang.String actionName, Model parentModel, Model childModel, PlatformUserContext userContext)
    This method is called before an action is executed on the childModel, but after the action on the parentModel has been executed by the user on a User-defined Page.
  • Method Details

    • preAction

      void preAction​(java.lang.String actionName, Model parentModel, Model childModel, PlatformUserContext userContext)
      This method is called before an action is executed on the childModel, but after the action on the parentModel has been executed by the user on a User-defined Page. It can be used to help enforce the synthetic 1-to-1 relationship by setting up the model link (or series of model links) from the childModel to the parentModel.
      Parameters:
      actionName - The name of the action to be executed on the childModel
      parentModel - The parent model instance, which has just been written to the database
      childModel - The instance of the target model of the synthetic 1-to-1 relationship
      userContext - The user context
    • postAction

      void postAction​(java.lang.String actionName, Model parentModel, Model childModel, PlatformUserContext userContext)
      This method is called after an action has been executed on the childModel by the user on a User-defined Page.
      Parameters:
      actionName - The name of the action that was executed on the childModel
      parentModel - The parent model instance
      childModel - The instance of the target model of the synthetic 1-to-1 relationship
      userContext - The user context