com.buildforge.services.common.dbo
Class BuildDBO

java.lang.Object
  extended by com.buildforge.services.common.dbo.DBObject
      extended by com.buildforge.services.common.dbo.GeoAwareDBObject
          extended by com.buildforge.services.common.dbo.BuildDBO

public class BuildDBO
extends GeoAwareDBObject

Database information representing build records (jobs).


Nested Class Summary
static class BuildDBO.Process
          Identifies the type of build process.
static class BuildDBO.Result
          Identifies the type of build process.
static class BuildDBO.State
          Identifies the run state of the build.
 
Field Summary
static char FLAG_FIND_ENV
           
static char FLAG_UNLOCK
           
static java.lang.String TYPE_KEY
           
 
Constructor Summary
BuildDBO()
           
 
Method Summary
 BuildDBO fromArray(java.lang.Object[] data)
          Deserialize the database object's settings from a request array.
 java.lang.String getBuildClass()
           
 int getBuildId()
           
 boolean getCancellation()
           
 int getChainedBuildId()
           
 int getDuration()
           
 java.lang.String getEngineId()
           
 java.lang.String getEnvKey()
           
 java.lang.String getEnvText()
           
 int getFailChainId()
           
 int getFired()
           
 int getJobId()
           
 int getLevel()
           
 int getPassChainId()
           
 BuildDBO.Process getProcess()
           
 BuildDBO.Result getResult()
           
 java.lang.String getSelectorId()
           
 int getSize()
           
 java.lang.String getStage()
           
 int getStartTime()
           
 BuildDBO.State getState()
           
 java.lang.String getTag()
           
 int getTargetId()
           
 java.lang.String getTypeKey()
          Retrieve the key that should be used to look up the display name for a data type.
 int getUserId()
           
 boolean isLive()
          Checks whether or not the object is live.
static void sanityCheckId(int buildId)
           
 void setBuildClass(java.lang.String buildClass)
           
 void setBuildId(int buildId)
           
 void setCancellation(boolean cancellation)
           
 void setChainedBuildId(int newChainedBuildId)
           
 void setDuration(int duration)
           
 void setEngineId(java.lang.String engineId)
           
 void setEnvKey(java.lang.String envDataKey)
           
 void setEnvText(java.lang.String envDataText)
           
 void setFailChainId(int newFailChainId)
           
 void setFired(int fired)
           
 void setJobId(int jobId)
           
 void setLevel(int level)
           
 void setPassChainId(int newPassChainId)
           
 void setProcess(BuildDBO.Process process)
           
 void setResult(BuildDBO.Result result)
           
 void setSelectorId(java.lang.String resource)
           
 void setSize(int size)
           
 void setStage(java.lang.String stage)
           
 void setStartTime(int startTime)
           
 void setState(BuildDBO.State state)
           
 void setTag(java.lang.String tag)
           
 void setTargetId(int targetId)
           
 void setUserId(int userId)
           
 java.lang.Object[] toArray()
          Serializes this database object as an array of objects.
 java.lang.String toString()
           
 
Methods inherited from class com.buildforge.services.common.dbo.GeoAwareDBObject
getGeoId, setGeoId
 
Methods inherited from class com.buildforge.services.common.dbo.DBObject
badId, badName, checkDead, checkLive, collision, collision
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_KEY

public static final java.lang.String TYPE_KEY
See Also:
Constant Field Values

FLAG_FIND_ENV

public static final char FLAG_FIND_ENV
See Also:
Constant Field Values

FLAG_UNLOCK

public static final char FLAG_UNLOCK
See Also:
Constant Field Values
Constructor Detail

BuildDBO

public BuildDBO()
Method Detail

getTypeKey

public java.lang.String getTypeKey()
Description copied from class: DBObject
Retrieve the key that should be used to look up the display name for a data type.

Specified by:
getTypeKey in class DBObject
Returns:
the type key for this object's class

isLive

public boolean isLive()
Description copied from class: DBObject
Checks whether or not the object is live. Note that this is not valid for object types that do not have a unique identifier. Those for which no reasonable implementation exists should always return false.

Specified by:
isLive in class DBObject
Returns:
true iff liveness is a valid concept for this object, and the object is live; otherwise, false is returned.

getBuildClass

public java.lang.String getBuildClass()

getBuildId

public int getBuildId()

getCancellation

public boolean getCancellation()

getChainedBuildId

public int getChainedBuildId()

getDuration

public int getDuration()

getEngineId

public java.lang.String getEngineId()

getEnvKey

public java.lang.String getEnvKey()

getEnvText

public java.lang.String getEnvText()

getFailChainId

public int getFailChainId()

getFired

public int getFired()

getJobId

public int getJobId()

getLevel

public int getLevel()

getPassChainId

public int getPassChainId()

getProcess

public BuildDBO.Process getProcess()

getResult

public BuildDBO.Result getResult()

getSelectorId

public java.lang.String getSelectorId()

getSize

public int getSize()

getStage

public java.lang.String getStage()

getStartTime

public int getStartTime()

getState

public BuildDBO.State getState()

getTag

public java.lang.String getTag()

getTargetId

public int getTargetId()

getUserId

public int getUserId()

setBuildClass

public void setBuildClass(java.lang.String buildClass)

setBuildId

public void setBuildId(int buildId)

setCancellation

public void setCancellation(boolean cancellation)

setChainedBuildId

public void setChainedBuildId(int newChainedBuildId)

setDuration

public void setDuration(int duration)

setEngineId

public void setEngineId(java.lang.String engineId)

setEnvKey

public void setEnvKey(java.lang.String envDataKey)

setEnvText

public void setEnvText(java.lang.String envDataText)

setFailChainId

public void setFailChainId(int newFailChainId)

setFired

public void setFired(int fired)

setJobId

public void setJobId(int jobId)

setLevel

public void setLevel(int level)

setPassChainId

public void setPassChainId(int newPassChainId)

setProcess

public void setProcess(BuildDBO.Process process)

setResult

public void setResult(BuildDBO.Result result)

setSelectorId

public void setSelectorId(java.lang.String resource)

setSize

public void setSize(int size)

setStage

public void setStage(java.lang.String stage)

setStartTime

public void setStartTime(int startTime)

setState

public void setState(BuildDBO.State state)

setTag

public void setTag(java.lang.String tag)

setTargetId

public void setTargetId(int targetId)

setUserId

public void setUserId(int userId)

sanityCheckId

public static void sanityCheckId(int buildId)
                          throws APIException
Throws:
APIException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

fromArray

public BuildDBO fromArray(java.lang.Object[] data)
                   throws APIException
Description copied from class: DBObject
Deserialize the database object's settings from a request array. This method is used to reconstruct a database object from the array that was created by DBObject.toArray().

Specified by:
fromArray in class DBObject
Parameters:
data - the object list that renders this object
Returns:
this object, for convenience
Throws:
APIException - if there is something wrong with the serialized data that interferes with the reconstruction of the object. The most obvious reason for this would be if the serialized array contains the wrong number of fields or otherwise does not match the serialized form for this type of database object.

toArray

public java.lang.Object[] toArray()
Description copied from class: DBObject
Serializes this database object as an array of objects. As specified in the description for Protocol, all supported protocols transfer database objects in this form.

Specified by:
toArray in class DBObject