Class TriggeredItemEntity
- java.lang.Object
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.TriggeredItemEntity
-
public class TriggeredItemEntity extends Object
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
-
Constructor Summary
Constructors Constructor Description TriggeredItemEntity()
Default constructor.TriggeredItemEntity(Job project)
Easy Constructor.TriggeredItemEntity(Job project, Run build)
Standard Constructor.TriggeredItemEntity(Run build)
Easy Constructor.TriggeredItemEntity(Integer buildNumber, String projectId)
Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Job other)
Deprecated.Useequals(String)
insteadboolean
equals(Run<?,?> aBuild)
Deprecated.UseisSameBuild(int, String)
insteadboolean
equals(Object obj)
boolean
equals(String aProjectFullname)
If this object represents the same project as aProjectFullname.Run
getBuild()
The build.Integer
getBuildNumber()
The buildnumber if any yet.Job
getProject()
The project.String
getProjectId()
The project's id.boolean
hasBuild()
If this object contains a build.int
hashCode()
boolean
isSameBuild(int otherBuildNumber, String otherParentName)
If this object represents the same build as specified by parameters.void
setBuild(Run build)
The build.void
setBuildNumber(Integer buildNumber)
The buildnumber if any yet.void
setProject(Job project)
The project.void
setProjectId(String projectId)
The project's id.
-
-
-
Constructor Detail
-
TriggeredItemEntity
public TriggeredItemEntity(Integer buildNumber, String projectId)
Standard constructor.- Parameters:
buildNumber
- a buildNumberprojectId
- a project's full name.
-
TriggeredItemEntity
public TriggeredItemEntity(Job project, Run build)
Standard Constructor.- Parameters:
project
- a project.build
- a build.
-
TriggeredItemEntity
public TriggeredItemEntity(Run build)
Easy Constructor. The project will be set fromRun.getParent()
.- Parameters:
build
- a build.
-
TriggeredItemEntity
public TriggeredItemEntity(Job project)
Easy Constructor.- Parameters:
project
- a project.
-
TriggeredItemEntity
public TriggeredItemEntity()
Default constructor.
-
-
Method Detail
-
hasBuild
public boolean hasBuild()
If this object contains a build.- Returns:
- true if so.
-
getBuild
@WithBridgeMethods(hudson.model.AbstractBuild.class) public Run getBuild()
The build. If this object is newly deserialized, the build will be looked up viagetBuildNumber()
.- Returns:
- the build.
-
setBuild
public void setBuild(Run build)
The build.- Parameters:
build
- the build.
-
getProject
@WithBridgeMethods(hudson.model.AbstractProject.class) public Job getProject()
The project. If this object is newly deserialized, the project will be looked up fromgetProjectId()
- Returns:
- the project.
-
setProject
public void setProject(Job project)
The project.- Parameters:
project
- the project.
-
getBuildNumber
public Integer getBuildNumber()
The buildnumber if any yet.- Returns:
- the build number.
-
setBuildNumber
public void setBuildNumber(Integer buildNumber)
The buildnumber if any yet. Do not use this method unless you are a serializer!- Parameters:
buildNumber
- the build number.
-
getProjectId
public String getProjectId()
The project's id.- Returns:
- the id.
- See Also:
AbstractItem.getFullName()
-
setProjectId
public void setProjectId(String projectId)
The project's id. Do not use this method unless you are a serializer!- Parameters:
projectId
- the id.- See Also:
AbstractItem.getFullName()
-
isSameBuild
public boolean isSameBuild(int otherBuildNumber, String otherParentName)
If this object represents the same build as specified by parameters.- Parameters:
otherBuildNumber
- build numberotherParentName
- project full name- Returns:
- true if it is so.
-
equals
@Deprecated public boolean equals(@CheckForNull Run<?,?> aBuild)
Deprecated.UseisSameBuild(int, String)
insteadIf this object represents the same build as aBuild.- Parameters:
aBuild
- the build to compare.- Returns:
- true if it is so.
-
equals
public boolean equals(String aProjectFullname)
If this object represents the same project as aProjectFullname.- Parameters:
aProjectFullname
- the project to compare.- Returns:
- true if it is so.
-
equals
@Deprecated public boolean equals(Job other)
Deprecated.Useequals(String)
insteadIf this object represents the same project as other.- Parameters:
other
- the project to compare.- Returns:
- true if it is so.
-
-