Class TriggeredItemEntity
java.lang.Object
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.TriggeredItemEntity
- Author:
- Robert Sandell <robert.sandell@sonyericsson.com>
-
Constructor Summary
ConstructorsConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionbooleanDeprecated.booleanDeprecated.UseisSameBuild(int, String)insteadbooleanbooleanIf this object represents the same project as aProjectFullname.getBuild()The build.The buildnumber if any yet.The project.The project's id.booleanhasBuild()If this object contains a build.inthashCode()booleanisSameBuild(int otherBuildNumber, String otherParentName) If this object represents the same build as specified by parameters.voidThe build.voidsetBuildNumber(Integer buildNumber) The buildnumber if any yet.voidsetProject(Job project) The project.voidsetProjectId(String projectId) The project's id.
-
Constructor Details
-
TriggeredItemEntity
Standard constructor.- Parameters:
buildNumber- a buildNumberprojectId- a project's full name.
-
TriggeredItemEntity
Standard Constructor.- Parameters:
project- a project.build- a build.
-
TriggeredItemEntity
Easy Constructor. The project will be set fromRun.getParent().- Parameters:
build- a build.
-
TriggeredItemEntity
Easy Constructor.- Parameters:
project- a project.
-
TriggeredItemEntity
public TriggeredItemEntity()Default constructor.
-
-
Method Details
-
hasBuild
public boolean hasBuild()If this object contains a build.- Returns:
- true if so.
-
getBuild
The build. If this object is newly deserialized, the build will be looked up viagetBuildNumber().- Returns:
- the build.
-
setBuild
The build.- Parameters:
build- the build.
-
getProject
The project. If this object is newly deserialized, the project will be looked up fromgetProjectId()- Returns:
- the project.
-
setProject
The project.- Parameters:
project- the project.
-
getBuildNumber
The buildnumber if any yet.- Returns:
- the build number.
-
setBuildNumber
The buildnumber if any yet. Do not use this method unless you are a serializer!- Parameters:
buildNumber- the build number.
-
getProjectId
The project's id.- Returns:
- the id.
- See Also:
-
setProjectId
The project's id. Do not use this method unless you are a serializer!- Parameters:
projectId- the id.- See Also:
-
equals
-
isSameBuild
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.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
If this object represents the same project as aProjectFullname.- Parameters:
aProjectFullname- the project to compare.- Returns:
- true if it is so.
-
equals
Deprecated.Useequals(String)insteadIf this object represents the same project as other.- Parameters:
other- the project to compare.- Returns:
- true if it is so.
-
hashCode
public int hashCode()
-
equals(String)instead