Package com.atlassian.bamboo.build
Class BuildNumberGeneratorDaoImpl
java.lang.Object
com.atlassian.bamboo.build.BuildNumberGeneratorDaoImpl
- All Implemented Interfaces:
BuildNumberGeneratorDao
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
generateBuildNumberNewTx
(@NotNull PlanIdentifier planIdentifier) Generates a new build number for the given plan.int
getNextBuildNumber
(@NotNull PlanIdentifier planIdentifier) Gets the next build number for the given plan.void
initBuildNumbers
(@NotNull PlanIdentifier planIdentifier) Initializes the build numbers for the given plan.void
initBuildNumbersNewTx
(@NotNull PlanIdentifier planIdentifier) Initializes the build numbers for the given plan.setNextBuildNumberNewTx
(@NotNull PlanIdentifier planIdentifier, int newBuildNumber) Sets the next build number for the given plan.
-
Constructor Details
-
BuildNumberGeneratorDaoImpl
public BuildNumberGeneratorDaoImpl()
-
-
Method Details
-
generateBuildNumberNewTx
Description copied from interface:BuildNumberGeneratorDao
Generates a new build number for the given plan.- Specified by:
generateBuildNumberNewTx
in interfaceBuildNumberGeneratorDao
- Parameters:
planIdentifier
- identifier of the plan for which the build number should be generated- Returns:
- the new build number
-
initBuildNumbers
Description copied from interface:BuildNumberGeneratorDao
Initializes the build numbers for the given plan.- Specified by:
initBuildNumbers
in interfaceBuildNumberGeneratorDao
- Parameters:
planIdentifier
- identifier of the plan for which the build numbers are initialized
-
initBuildNumbersNewTx
Description copied from interface:BuildNumberGeneratorDao
Initializes the build numbers for the given plan. Executed as a new transaction. Created for the testing purposes only.- Specified by:
initBuildNumbersNewTx
in interfaceBuildNumberGeneratorDao
- Parameters:
planIdentifier
- identifier of the plan for which the build numbers are initialized
-
setNextBuildNumberNewTx
public SetNewBuildNumberResult setNextBuildNumberNewTx(@NotNull @NotNull PlanIdentifier planIdentifier, int newBuildNumber) Description copied from interface:BuildNumberGeneratorDao
Sets the next build number for the given plan.- Specified by:
setNextBuildNumberNewTx
in interfaceBuildNumberGeneratorDao
- Parameters:
planIdentifier
- identifier of the plan for which the build number is setnewBuildNumber
- the next build number- Returns:
- the result of the operation
-
getNextBuildNumber
Description copied from interface:BuildNumberGeneratorDao
Gets the next build number for the given plan.- Specified by:
getNextBuildNumber
in interfaceBuildNumberGeneratorDao
- Parameters:
planIdentifier
- identifier of the plan for which the build number is returned- Returns:
- the next build number
-