Class TriggeredItemEntity


  • public class TriggeredItemEntity
    extends Object
    Wrapper class for smoother serialization of Run and Job.
    Author:
    Robert Sandell <robert.sandell@sonyericsson.com>
    • Constructor Detail

      • TriggeredItemEntity

        public TriggeredItemEntity​(Integer buildNumber,
                                   String projectId)
        Standard constructor.
        Parameters:
        buildNumber - a buildNumber
        projectId - 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 from Run.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.
      • setBuild

        public void setBuild​(Run build)
        The build.
        Parameters:
        build - the build.
      • 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.
      • 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 number
        otherParentName - project full name
        Returns:
        true if it is so.
      • equals

        @Deprecated
        public boolean equals​(@CheckForNull
                              Run<?,​?> aBuild)
        Deprecated.
        If 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.
        Use equals(String) instead
        If this object represents the same project as other.
        Parameters:
        other - the project to compare.
        Returns:
        true if it is so.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object