com.buildforge.services.common.dbo
Class ScopeDBO

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

public class ScopeDBO
extends DBObject

Database information representing the link between an adaptor and a project. Adaptor links were formerly called scopes in the Build Forge system, and that vestigal name has been retained here, for the time being.


Nested Class Summary
static class ScopeDBO.Active
          Identifies whether an adaptor is active, inactive, or being debugged.
 
Field Summary
static java.lang.Class<ScopeDBO> CLASS
           
static java.lang.String TYPE_KEY
           
 
Constructor Summary
ScopeDBO()
           
 
Method Summary
 ScopeDBO fromArray(java.lang.Object[] data)
          Deserialize the database object's settings from a request array.
 ScopeDBO.Active getActive()
           
 java.lang.String getAdaptorName()
           
 int getEnvironmentGroupId()
           
 int getJobId()
           
 java.lang.String getName()
           
 int getProjectId()
           
 int getScopeId()
           
 int getStamp()
           
 java.lang.String getStatus()
           
 java.lang.String getTypeKey()
          Retrieve the key that should be used to look up the display name for a data type.
 boolean isLive()
          Checks whether or not the object is live.
static void sanityCheckAdaptor(java.lang.String adaptorName)
           
static void sanityCheckId(int scopeId)
           
static void sanityCheckName(java.lang.String name)
           
static void sanityCheckProject(int projectId)
           
 void setActive(ScopeDBO.Active active)
           
 void setAdaptorName(java.lang.String adaptorName)
           
 void setEnvironmentGroupId(int environmentGroupId)
           
 void setJobId(int jobId)
           
 void setName(java.lang.String name)
           
 void setProjectId(int projectId)
           
 void setScopeId(int scopeId)
           
 void setStamp(int stamp)
           
 void setStatus(java.lang.String status)
           
 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.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

CLASS

public static final java.lang.Class<ScopeDBO> CLASS
Constructor Detail

ScopeDBO

public ScopeDBO()
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.

getActive

public ScopeDBO.Active getActive()

getAdaptorName

public java.lang.String getAdaptorName()

getEnvironmentGroupId

public int getEnvironmentGroupId()

getJobId

public int getJobId()

getName

public java.lang.String getName()

getProjectId

public int getProjectId()

getScopeId

public int getScopeId()

getStamp

public int getStamp()

getStatus

public java.lang.String getStatus()

setActive

public void setActive(ScopeDBO.Active active)

setAdaptorName

public void setAdaptorName(java.lang.String adaptorName)

setEnvironmentGroupId

public void setEnvironmentGroupId(int environmentGroupId)

setJobId

public void setJobId(int jobId)

setName

public void setName(java.lang.String name)

setProjectId

public void setProjectId(int projectId)

setScopeId

public void setScopeId(int scopeId)

setStamp

public void setStamp(int stamp)

setStatus

public void setStatus(java.lang.String status)

sanityCheckId

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

sanityCheckName

public static void sanityCheckName(java.lang.String name)
                            throws APIException
Throws:
APIException

sanityCheckProject

public static void sanityCheckProject(int projectId)
                               throws APIException
Throws:
APIException

sanityCheckAdaptor

public static void sanityCheckAdaptor(java.lang.String adaptorName)
                               throws APIException
Throws:
APIException

toString

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

fromArray

public ScopeDBO 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