|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jenkins.plugins.audit2db.internal.data.AbstractHibernateRepository
org.jenkins.plugins.audit2db.internal.data.BuildDetailsHibernateRepository
public class BuildDetailsHibernateRepository
Hibernate-based implementation of the BuildDetailsRepository
interface.
Constructor Summary | |
---|---|
BuildDetailsHibernateRepository(org.hibernate.SessionFactory sessionFactory)
|
Method Summary | |
---|---|
List<BuildDetails> |
getBuildDetails(String masterHostName,
Date fromDate,
Date toDate)
Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates for al projects. |
List<BuildDetails> |
getBuildDetails(String masterHostName,
String projectName,
Date fromDate,
Date toDate)
Retrieves the build details for all job instances that ran on the specified Jenkins master or all the slaves registered with that master, between two dates and for a specific project. |
List<BuildDetails> |
getBuildDetailsByDateRange(Date start,
Date end)
Retrieves previously saved build details whose start date or end date fall between the given range. |
List<BuildDetails> |
getBuildDetailsByDurationRange(long min,
long max)
Retrieves previously saved build details whose duration in seconds falls between the given range. |
List<BuildDetails> |
getBuildDetailsByFullName(String fullName)
Retrieves previously saved build details that match the given full name. |
BuildDetails |
getBuildDetailsById(String id)
Retrieves previously saved build details that match the given id. |
List<BuildDetails> |
getBuildDetailsByName(String name)
Retrieves previously saved build details that match the given name. |
List<BuildDetails> |
getBuildDetailsByParams(String masterHostName,
String paramName,
String paramValue,
Date fromDate,
Date toDate)
Retrieves previously saved build details that were executed using the given parameter values. |
List<BuildDetails> |
getBuildDetailsByUserId(String userId)
Retrieves previously saved build details that match the given user id. |
List<BuildDetails> |
getBuildDetailsByUserName(String userName)
Retrieves previously saved build details that match the given user name. |
BuildDetails |
getBuildDetailsForBuild(hudson.model.AbstractBuild<?,?> build)
Retrieves the build details for the given Jenkins build. |
BuildNode |
getBuildNodeByUrl(String url)
Retrieves the build node that matches the given url. |
List<String> |
getProjectNames(String masterHostName,
Date fromDate,
Date toDate)
Retrieves a list of all the projects registered with the specified Jenkins master that have had job instances executed between the specified dates. |
List<String> |
getProjectNames(String masterHostName,
String pattern,
Date fromDate,
Date toDate)
Retrieves the names of all projects on the given Jenkins master, filtered by name pattern and date range. |
Object |
saveBuildDetails(BuildDetails details)
Creates a new entity in the repository with the given build details. |
void |
saveBuildDetailsList(List<BuildDetails> details)
Creates new entities in the repository according to the given list of build details. |
void |
updateBuildDetails(BuildDetails details)
Updates a previously saved build using the given build details. |
Methods inherited from class org.jenkins.plugins.audit2db.internal.data.AbstractHibernateRepository |
---|
getHibernateTemplate, getSessionFactory, getTransactionManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BuildDetailsHibernateRepository(org.hibernate.SessionFactory sessionFactory)
Method Detail |
---|
public BuildNode getBuildNodeByUrl(String url)
BuildDetailsRepository
getBuildNodeByUrl
in interface BuildDetailsRepository
url
- the node url (unique).
null
.BuildDetailsRepository.getBuildNodeByUrl(String)
public Object saveBuildDetails(BuildDetails details)
BuildDetailsRepository
saveBuildDetails
in interface BuildDetailsRepository
details
- the details to save.
BuildDetailsRepository.saveBuildDetails(org.jenkins.plugins.audit2db.model.BuildDetails)
public void saveBuildDetailsList(List<BuildDetails> details)
BuildDetailsRepository
saveBuildDetailsList
in interface BuildDetailsRepository
details
- the collection of details to save.BuildDetailsRepository.saveBuildDetailsList(List)
public BuildDetails getBuildDetailsById(String id)
BuildDetailsRepository
getBuildDetailsById
in interface BuildDetailsRepository
id
- the build details id.
null
.BuildDetailsRepository.getBuildDetailsById(String)
public List<BuildDetails> getBuildDetailsByName(String name)
BuildDetailsRepository
getBuildDetailsByName
in interface BuildDetailsRepository
name
- the build name
BuildDetailsRepository.getBuildDetailsByName(java.lang.String)
public List<BuildDetails> getBuildDetailsByFullName(String fullName)
BuildDetailsRepository
getBuildDetailsByFullName
in interface BuildDetailsRepository
BuildDetailsRepository.getBuildDetailsByFullName(java.lang.String)
public List<BuildDetails> getBuildDetailsByDateRange(Date start, Date end)
BuildDetailsRepository
getBuildDetailsByDateRange
in interface BuildDetailsRepository
start
- the start date.end
- the end date.
BuildDetailsRepository.getBuildDetailsByDateRange(java.util.Date,
java.util.Date)
public List<BuildDetails> getBuildDetailsByDurationRange(long min, long max)
BuildDetailsRepository
getBuildDetailsByDurationRange
in interface BuildDetailsRepository
min
- the minimum duration in seconds.max
- the maximum duration in seconds.
org.jenkins.plugins.audit2db.data.BuildDetailsRepository#getBuildDetailsByDuration(long)
public List<BuildDetails> getBuildDetailsByUserId(String userId)
BuildDetailsRepository
getBuildDetailsByUserId
in interface BuildDetailsRepository
userId
- the user id to match.
BuildDetailsRepository.getBuildDetailsByUserId(java.lang.String)
public List<BuildDetails> getBuildDetailsByUserName(String userName)
BuildDetailsRepository
getBuildDetailsByUserName
in interface BuildDetailsRepository
userName
- the user name to match.
BuildDetailsRepository.getBuildDetailsByUserName(java.lang.String)
public List<BuildDetails> getBuildDetailsByParams(String masterHostName, String paramName, String paramValue, Date fromDate, Date toDate)
BuildDetailsRepository
getBuildDetailsByParams
in interface BuildDetailsRepository
masterHostName
- the host name of the Jenkins master.paramName
- the parameter name.paramValue
- the parameter value.fromDate
- the start (inclusive) of the date range.toDate
- the end (inclusive) of the date range.
null
.BuildDetailsRepository.getBuildDetailsByParams(String, String, String, Date, Date)
public void updateBuildDetails(BuildDetails details)
BuildDetailsRepository
updateBuildDetails
in interface BuildDetailsRepository
details
- the updated build details.BuildDetailsRepository.updateBuildDetails(org.jenkins.plugins.audit2db.model.BuildDetails)
public BuildDetails getBuildDetailsForBuild(hudson.model.AbstractBuild<?,?> build)
BuildDetailsRepository
getBuildDetailsForBuild
in interface BuildDetailsRepository
build
- a reference to the Jenkins build.
null
.BuildDetailsRepository.getBuildDetailsForBuild(AbstractBuild)
public List<String> getProjectNames(String masterHostName, Date fromDate, Date toDate)
BuildDetailsRepository
getProjectNames
in interface BuildDetailsRepository
masterHostName
- the host name of the Jenkins master.fromDate
- the start (inclusive) of the date range.toDate
- the end (inclusive) of the date range.
null
.public List<String> getProjectNames(String masterHostName, String pattern, Date fromDate, Date toDate)
null
name pattern will match all names.
getProjectNames
in interface BuildDetailsRepository
masterHostName
- the host name of the Jenkins master.pattern
- the pattern used to match project names.fromDate
- the start (inclusive) of the date range.toDate
- the end (inclusive) of the date range.
null
.public List<BuildDetails> getBuildDetails(String masterHostName, Date fromDate, Date toDate)
BuildDetailsRepository
getBuildDetails
in interface BuildDetailsRepository
masterHostName
- the host name of the Jenkins master.fromDate
- the start (inclusive) of the date range.toDate
- the end (inclusive) of the date range.
null
.public List<BuildDetails> getBuildDetails(String masterHostName, String projectName, Date fromDate, Date toDate)
BuildDetailsRepository
getBuildDetails
in interface BuildDetailsRepository
masterHostName
- the host name of the Jenkins master.projectName
- the name of the project that was executed.fromDate
- the start (inclusive) of the date range.toDate
- the end (inclusive) of the date range.
null
.org.jenkins.plugins.audit2db.data.AuditReportsRepository#getBuildDetails(java.lang.String,
java.sql.Date, java.sql.Date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |