Package com.atlassian.bamboo.versioning
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 TypeMethodDescriptionvoidincrementVersion(T object, @Nullable org.hibernate.Session session) Increments the version of the given entity.voidincrementVersion(T object, @Nullable org.hibernate.Session session, boolean onlyIfSessionDirty) Increments the version of the given entity.
-
Method Details
-
incrementVersion
Increments the version of the given entity. Comparing toincrementVersion(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 incrementedsession- 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 incrementedsession- the session to use for incrementing the versiononlyIfSessionDirty- 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
-