Interface VersioningSupplement<T>

Type Parameters:
T - the type of the object to increment the version of
All Known Implementing Classes:
AbstractVersioningSupplement, DeploymentProjectVersioningSupplement, EnvironmentVersioningSupplement, PlanVersioningSupplement, RepositoryDataEntityVersioningSupplement

public interface VersioningSupplement<T>
Interface for versioning supplements. Versioning supplements are used to increment the version of an object.
Since:
9.4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    incrementVersion(T object, @Nullable org.hibernate.Session session)
    Increments the version of the given entity.
    void
    incrementVersion(T object, @Nullable org.hibernate.Session session, boolean onlyIfSessionDirty)
    Increments the version of the given entity.
  • Method Details

    • incrementVersion

      void incrementVersion(@Nullable T object, @Nullable @Nullable org.hibernate.Session session)
      Increments the version of the given entity. Comparing to incrementVersion(T, Session, boolean), the version increment is always performed, regardless of the dirtiness state of the session.
      Parameters:
      object - the entity whose version needs to be incremented
      session - the session to use for incrementing the version
    • incrementVersion

      void incrementVersion(@Nullable T object, @Nullable @Nullable org.hibernate.Session session, boolean onlyIfSessionDirty)
      Increments the version of the given entity.
      Parameters:
      object - the entity whose version needs to be incremented
      session - the session to use for incrementing the version
      onlyIfSessionDirty - a flag indicating whether the version should only be incremented if the session is dirty: - true: The version is incremented only if the session contains changes that need to be flushed. - false: The version is incremented unconditionally, regardless of the session's state.
      Since:
      12.0