com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr
Class Change

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.gerritevents.dto.attr.Change
All Implemented Interfaces:
GerritJsonDTO

public class Change
extends Object
implements GerritJsonDTO

Represents a Gerrit JSON Change DTO. The Gerrit change the event is related to.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Constructor Summary
Change()
          Default constructor.
Change(net.sf.json.JSONObject json)
          Constructor that fills with data directly.
 
Method Summary
 boolean equals(Object obj)
           
 void fromJson(net.sf.json.JSONObject json)
          Takes a JSON object and fills its internal data-structure.
 String getBranch()
          Branch name within project.
 String getId()
          Change identifier.
 String getNumber()
          Deprecated. because the Gerrit documentation says so.
 Account getOwner()
          Owner in account attribute.
 String getProject()
          Project path in Gerrit.
 String getSubject()
          Description of change.
 String getUrl()
          Canonical URL to reach this change.
 int hashCode()
           
 void setBranch(String branch)
          Branch name within project.
 void setId(String id)
          Change identifier.
 void setNumber(String number)
          Deprecated. because the Gerrit documentation says so.
 void setOwner(Account owner)
          Owner in account attribute.
 void setProject(String project)
          Project path in Gerrit.
 void setSubject(String subject)
          Description of change.
 void setUrl(String url)
          Canonical URL to reach this change.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Change

public Change()
Default constructor.


Change

public Change(net.sf.json.JSONObject json)
Constructor that fills with data directly.

Parameters:
json - the JSON Object with corresponding data.
See Also:
fromJson(net.sf.json.JSONObject)
Method Detail

fromJson

public void fromJson(net.sf.json.JSONObject json)
Description copied from interface: GerritJsonDTO
Takes a JSON object and fills its internal data-structure.

Specified by:
fromJson in interface GerritJsonDTO
Parameters:
json - the JSON Object.

getBranch

public String getBranch()
Branch name within project.

Returns:
the branch.

setBranch

public void setBranch(String branch)
Branch name within project.

Parameters:
branch - the branch.

getId

public String getId()
Change identifier.

Returns:
the identifier.

setId

public void setId(String id)
Change identifier.

Parameters:
id - the identifier.

getNumber

public String getNumber()
Deprecated. because the Gerrit documentation says so.

Change number (deprecated).

Returns:
the change number.

setNumber

public void setNumber(String number)
Deprecated. because the Gerrit documentation says so.

Change number (deprecated).

Parameters:
number - the change number.

getOwner

public Account getOwner()
Owner in account attribute.

Returns:
the owner.

setOwner

public void setOwner(Account owner)
Owner in account attribute.

Parameters:
owner - the owner.

getProject

public String getProject()
Project path in Gerrit.

Returns:
the project.

setProject

public void setProject(String project)
Project path in Gerrit.

Parameters:
project - the project.

getSubject

public String getSubject()
Description of change.

Returns:
the description.

setSubject

public void setSubject(String subject)
Description of change.

Parameters:
subject - the description.

getUrl

public String getUrl()
Canonical URL to reach this change.

Returns:
the URL.

setUrl

public void setUrl(String url)
Canonical URL to reach this change.

Parameters:
url - the URL.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2012 Hudson. All Rights Reserved.