Interface ConstraintResolverContext<T extends com.liferay.portal.kernel.model.change.tracking.CTModel<T>>


@ProviderType public interface ConstraintResolverContext<T extends com.liferay.portal.kernel.model.change.tracking.CTModel<T>>
Used in automatically resolving constraint conflicts between the source and target models.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <R, E extends Throwable>
    R
    getInTarget(com.liferay.petra.function.UnsafeSupplier<R,E> unsafeSupplier)
    Returns the result of the unsafe supplier from within the target change tracking collection.
    Returns the source change tracking model that has a unique constraint conflict with the target change tracking model.
    Returns the target change tracking model that has a unique constraint conflict with the source change tracking model.
    boolean
    isSourceCTModel(com.liferay.portal.kernel.model.change.tracking.CTModel<?> ctModel)
    Returns whether the change tracking model is from the source.
    boolean
    isTargetCTModel(com.liferay.portal.kernel.model.change.tracking.CTModel<?> ctModel)
    Returns whether the change tracking model is from the target.
    void
     
  • Method Details

    • getInTarget

      <R, E extends Throwable> R getInTarget(com.liferay.petra.function.UnsafeSupplier<R,E> unsafeSupplier) throws E
      Returns the result of the unsafe supplier from within the target change tracking collection.
      Parameters:
      unsafeSupplier - the unsafe supplier to call
      Returns:
      the result from the unsafe supplier
      Throws:
      E
    • getSourceCTModel

      T getSourceCTModel()
      Returns the source change tracking model that has a unique constraint conflict with the target change tracking model.
      Returns:
      the source change tracking model
    • getTargetCTModel

      T getTargetCTModel()
      Returns the target change tracking model that has a unique constraint conflict with the source change tracking model.
      Returns:
      the target change tracking model
    • isSourceCTModel

      boolean isSourceCTModel(com.liferay.portal.kernel.model.change.tracking.CTModel<?> ctModel)
      Returns whether the change tracking model is from the source.
      Parameters:
      ctModel - the change tracking model to check
      Returns:
      whether the model is from the source
    • isTargetCTModel

      boolean isTargetCTModel(com.liferay.portal.kernel.model.change.tracking.CTModel<?> ctModel)
      Returns whether the change tracking model is from the target.
      Parameters:
      ctModel - the change tracking model to check
      Returns:
      whether the model is from the target
    • mergeSourceCTModelIntoTargetCTModel

      void mergeSourceCTModelIntoTargetCTModel()