Package com.evolveum.midpoint.repo.api
Class VersionPrecondition<T extends ObjectType>
java.lang.Object
com.evolveum.midpoint.repo.api.VersionPrecondition<T>
- All Implemented Interfaces:
ModificationPrecondition<T>,Serializable
public class VersionPrecondition<T extends ObjectType>
extends Object
implements ModificationPrecondition<T>, Serializable
A
ModificationPrecondition that aborts an update operation if the actual version of the object being modified
is different from the expected one (expectedVersion).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionPrecondition(@NotNull PrismObject<T> object) VersionPrecondition(String expectedVersion) -
Method Summary
Modifier and TypeMethodDescriptionbooleanholds(PrismObject<T> object) Violation of the precondition can be reported either by returning false or by throwingPreconditionViolationExceptiondirectly.
-
Constructor Details
-
VersionPrecondition
-
VersionPrecondition
-
-
Method Details
-
holds
Description copied from interface:ModificationPreconditionViolation of the precondition can be reported either by returning false or by throwingPreconditionViolationExceptiondirectly. The former method is easier while the latter one gives a possibility to provide a custom exception message.- Specified by:
holdsin interfaceModificationPrecondition<T extends ObjectType>- Throws:
PreconditionViolationException
-