com.buildforge.services.common.dbo
Class AccessGroupDBO

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

public class AccessGroupDBO
extends DBObject

The database information representing an access group (level).


Field Summary
static char DEFAULT_NO
           
static char DEFAULT_YES
           
static int FIRST_USER_LEVEL_ID
          Access groups with level less than this are built-in and may not be deleted.
static char FLAG_DIRECT
           
static java.lang.String TYPE_KEY
           
 
Constructor Summary
AccessGroupDBO()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks for equivilance with another access group.
 AccessGroupDBO fromArray(java.lang.Object[] data)
          Deserialize the database object's settings from a request array.
 int getControlLevel()
           
 boolean getDefault()
           
 java.lang.String getLdapDN()
           
 java.lang.String getLdapKey()
           
 int getLevel()
           
 java.lang.String getName()
           
 java.lang.String getTypeKey()
          Retrieve the key that should be used to look up the display name for a data type.
 int hashCode()
          Overridden to be consistent with equals.
 boolean isLive()
          Checks whether or not the object is live.
 void setControlLevel(int controlLevel)
           
 void setDefault(boolean def)
           
 void setLdapDN(java.lang.String dn)
           
 void setLdapKey(java.lang.String ldapKey)
           
 void setLevel(int level)
           
 void setName(java.lang.String name)
           
 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
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_KEY

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

FLAG_DIRECT

public static final char FLAG_DIRECT
See Also:
Constant Field Values

DEFAULT_YES

public static final char DEFAULT_YES
See Also:
Constant Field Values

DEFAULT_NO

public static final char DEFAULT_NO
See Also:
Constant Field Values

FIRST_USER_LEVEL_ID

public static final int FIRST_USER_LEVEL_ID
Access groups with level less than this are built-in and may not be deleted.

See Also:
Constant Field Values
Constructor Detail

AccessGroupDBO

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

getControlLevel

public int getControlLevel()

getDefault

public boolean getDefault()

getLdapKey

public java.lang.String getLdapKey()

getLdapDN

public java.lang.String getLdapDN()

getLevel

public int getLevel()

getName

public java.lang.String getName()

setLevel

public void setLevel(int level)

setName

public void setName(java.lang.String name)

setDefault

public void setDefault(boolean def)

setLdapKey

public void setLdapKey(java.lang.String ldapKey)

setLdapDN

public void setLdapDN(java.lang.String dn)

setControlLevel

public void setControlLevel(int controlLevel)

equals

public boolean equals(java.lang.Object o)
Checks for equivilance with another access group. Two access groups are equal if they have the same id (level).

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare with
Returns:
true if o is the same access group

hashCode

public int hashCode()
Overridden to be consistent with equals.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.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

fromArray

public AccessGroupDBO 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.