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 thechildModel
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 thechildModel
, but after the action on theparentModel
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 thechildModel
, but after the action on theparentModel
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 thechildModel
to theparentModel
.- Parameters:
actionName
- The name of the action to be executed on thechildModel
parentModel
- The parent model instance, which has just been written to the databasechildModel
- The instance of the target model of the synthetic 1-to-1 relationshipuserContext
- 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 thechildModel
by the user on a User-defined Page.- Parameters:
actionName
- The name of the action that was executed on thechildModel
parentModel
- The parent model instancechildModel
- The instance of the target model of the synthetic 1-to-1 relationshipuserContext
- The user context
-