Class TrackingEntryDaoImpl
java.lang.Object
com.atlassian.bamboo.brokenbuildtracker.data.TrackingEntryDaoImpl
- All Implemented Interfaces:
TrackingEntryDao
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddResult
(AOTrackingEntry entry, long resultId, int buildNumber) addUser
(AOTrackingEntry entry, String username, @Nullable String userWhoUpdated) void
closeAllTrackingEntries
(long planId) @NotNull AOTrackingEntry
createTrackingEntry
(long planId, boolean active) Create a new tracking entry for the plan.getActiveTrackingEntriesForUser
(String username) getActiveTrackingEntriesForUser
(String username, int start, int limit) getActiveTrackingEntryForPlan
(long id) Gets the currently active tracking entry for a plan.@Nullable AOTrackingEntry
getTrackingEntryById
(int id) Find tracking entry by database ID@Nullable AOTrackingEntry
getTrackingEntryForResult
(Long resultId) getTrackingEntryWithBuildNumber
(long planId, int buildNumber) void
removeAllResults
(AOTrackingEntry entry) void
removeAllUsers
(AOTrackingEntry entry) void
removeResult
(AOTrackingResult result) void
void
removeTrackingForPlan
(long id) void
removeTrackingForResult
(long idOfDeletedItem) void
removeUser
(AOTrackingUser responsible) void
saveTrackingEntry
(@NotNull AOTrackingEntry trackingEntry) Save changes for an existing tracking entry Do NOT use to create brand new objects
-
Constructor Details
-
TrackingEntryDaoImpl
@Autowired public TrackingEntryDaoImpl(com.atlassian.activeobjects.external.ActiveObjects ao)
-
-
Method Details
-
saveTrackingEntry
Description copied from interface:TrackingEntryDao
Save changes for an existing tracking entry Do NOT use to create brand new objects- Specified by:
saveTrackingEntry
in interfaceTrackingEntryDao
- Parameters:
trackingEntry
- to save
-
createTrackingEntry
Description copied from interface:TrackingEntryDao
Create a new tracking entry for the plan.- Specified by:
createTrackingEntry
in interfaceTrackingEntryDao
- Parameters:
planId
- plan tracking entry belongs toactive
- whether the tracking entry currently active or not- Returns:
- created tracking entry
-
addUser
public AOTrackingEntry addUser(AOTrackingEntry entry, String username, @Nullable @Nullable String userWhoUpdated) - Specified by:
addUser
in interfaceTrackingEntryDao
-
addResult
- Specified by:
addResult
in interfaceTrackingEntryDao
-
removeUser
- Specified by:
removeUser
in interfaceTrackingEntryDao
-
removeResult
- Specified by:
removeResult
in interfaceTrackingEntryDao
-
removeAllUsers
- Specified by:
removeAllUsers
in interfaceTrackingEntryDao
-
removeAllResults
-
removeTrackingEntry
- Specified by:
removeTrackingEntry
in interfaceTrackingEntryDao
-
getTrackingEntryById
Description copied from interface:TrackingEntryDao
Find tracking entry by database ID- Specified by:
getTrackingEntryById
in interfaceTrackingEntryDao
- Parameters:
id
- of tracking entry to find- Returns:
- tracking entry with id if exists, otherwise null
-
getTrackingEntryForResult
- Specified by:
getTrackingEntryForResult
in interfaceTrackingEntryDao
-
getActiveTrackingEntryForPlan
public AOTrackingEntry getActiveTrackingEntryForPlan(long id) throws MultipleActiveTrackingEntryException Description copied from interface:TrackingEntryDao
Gets the currently active tracking entry for a plan.- Specified by:
getActiveTrackingEntryForPlan
in interfaceTrackingEntryDao
- Parameters:
id
- of the plan- Returns:
- the open tracking entry if one (and only one) exists.
- Throws:
MultipleActiveTrackingEntryException
- if more than one active tracking entry is found
-
getActiveTrackingEntries
- Specified by:
getActiveTrackingEntries
in interfaceTrackingEntryDao
-
getActiveTrackingEntriesForUser
- Specified by:
getActiveTrackingEntriesForUser
in interfaceTrackingEntryDao
-
getActiveTrackingEntriesForUser
- Specified by:
getActiveTrackingEntriesForUser
in interfaceTrackingEntryDao
-
getTrackingEntryWithBuildNumber
- Specified by:
getTrackingEntryWithBuildNumber
in interfaceTrackingEntryDao
-
closeAllTrackingEntries
public void closeAllTrackingEntries(long planId) - Specified by:
closeAllTrackingEntries
in interfaceTrackingEntryDao
-
removeTrackingForPlan
public void removeTrackingForPlan(long id) - Specified by:
removeTrackingForPlan
in interfaceTrackingEntryDao
-
removeTrackingForResult
public void removeTrackingForResult(long idOfDeletedItem) - Specified by:
removeTrackingForResult
in interfaceTrackingEntryDao
-