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.
-
Method Summary
Modifier and TypeMethodDescription<R,E extends Throwable>
RgetInTarget(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.booleanisSourceCTModel(com.liferay.portal.kernel.model.change.tracking.CTModel<?> ctModel) Returns whether the change tracking model is from the source.booleanisTargetCTModel(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 EReturns 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 extends Throwable
-
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()
-