blackboard.data
Class BbObject

java.lang.Object
  extended by blackboard.data.BbObject
All Implemented Interfaces:
IBbObject, java.lang.Cloneable
Direct Known Subclasses:
AggregateReviewStatus, Announcement, CalendarEntry, Cartridge, ChildFile, Content, ContentFile, ContentStatus, Course, CourseMembership, CourseToc, Group, GroupMembership, Lineitem, Link, PortalRole, Score, StaffInfo, Upload, UploadedFile, UserInfo, UserRole

public abstract class BbObject
extends java.lang.Object
implements IBbObject, java.lang.Cloneable

The BbObject class is the root of the data class hierarchy. All data objects have BbObject as a superclass. It contains a set of members and methods that all data objects inherit.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Field Summary
protected  BbAttributes _bbAttributes
           
 
Constructor Summary
BbObject()
          Default Constructor
 
Method Summary
 java.lang.Object clone()
          This method clones the BbObject as well as it's contained BbAttributes object.
 BbAttributes getBbAttributes()
          Returns the BbAttributes associated with this BbObject.
 java.util.Calendar getCreatedDate()
          Deprecated.  
abstract  DataType getDataType()
          Returns the DataType identifier for the given BbObject-derived object.
 Id getId()
          Returns the Id associated with this BbObject.
 java.util.Calendar getModifiedDate()
          Returns the date on which this BbObject was last modified.
 void persist()
          Inserts or updates the current BbObject in a lightweight fashion.
 void setCreatedDate(java.util.Calendar cCreatedDate)
          Deprecated.  
 void setId(Id iId)
          Sets the Id value for this BbObject.
 void setModifiedDate(java.util.Calendar cModifiedDate)
          Sets the last modified date for this BbObject.
 java.lang.String toString()
          Returns the contents of this BbObject object as a line-feed separated list of name value pairs of this object's properties.
 void validate()
          Validates the contents of this BbObject.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_bbAttributes

protected BbAttributes _bbAttributes
Constructor Detail

BbObject

public BbObject()
Default Constructor

Method Detail

getBbAttributes

public BbAttributes getBbAttributes()
Returns the BbAttributes associated with this BbObject.

Specified by:
getBbAttributes in interface IBbObject
Returns:
BbAttributes value for this BbObject

getId

public Id getId()
Returns the Id associated with this BbObject.

Specified by:
getId in interface IBbObject
Returns:
Id value for this BbObject

setId

public void setId(Id iId)
Sets the Id value for this BbObject.

Specified by:
setId in interface IBbObject
Parameters:
iId - an Id value to use for this BbObject

getCreatedDate

public java.util.Calendar getCreatedDate()
Deprecated. 

In Bb6, schema level changes have caused a created date value to no longer be a reliable property of all Blackboard objects. As a result, this method should no longer be used as its behavior can not be guaranteed.

Specified by:
getCreatedDate in interface IBbObject

setCreatedDate

public void setCreatedDate(java.util.Calendar cCreatedDate)
Deprecated. 

In Bb6, schema level changes have caused a created date value to no longer be a reliable property of all Blackboard objects. As a result, this method should no longer be used as its behavior can not be guaranteed.

Specified by:
setCreatedDate in interface IBbObject

getModifiedDate

public java.util.Calendar getModifiedDate()
Returns the date on which this BbObject was last modified.

Specified by:
getModifiedDate in interface IBbObject
Returns:
a Calendar representing the modified date of this BbObject

setModifiedDate

public void setModifiedDate(java.util.Calendar cModifiedDate)
Sets the last modified date for this BbObject.

The modified date value is controlled by the database (automatically updated by) and should generally not be directly manipulated by code.

Specified by:
setModifiedDate in interface IBbObject
Parameters:
cModifiedDate - a Calendar to use for the modified date

getDataType

public abstract DataType getDataType()
Returns the DataType identifier for the given BbObject-derived object. Can be used to uniquely identify the "type" of a data object.

Specified by:
getDataType in interface IBbObject
Returns:
the DataType for current object

toString

public java.lang.String toString()
Returns the contents of this BbObject object as a line-feed separated list of name value pairs of this object's properties. The line-feed character used is the one specified by the java system property "line.separator". This method can be used for debug purposes.

Overrides:
toString in class java.lang.Object
Returns:
a String that represents the contents of this object

validate

public void validate()
              throws ValidationException
Validates the contents of this BbObject. Internal consistency checks are also performed.

Specified by:
validate in interface IBbObject
Throws:
ValidationException - if validation of this object fails

clone

public java.lang.Object clone()
This method clones the BbObject as well as it's contained BbAttributes object.

Overrides:
clone in class java.lang.Object

persist

public void persist()
             throws ValidationException,
                    PersistenceException
Inserts or updates the current BbObject in a lightweight fashion. The target of the operation is determined based upon the state of the object. If the object represents a valid object within an exsiting database container, the object will be persisted back to that container (update operation). Otherwise, the object will be persisted using the default database persistence manager (as determined by context).

Throws:
ValidationException - if this object is not in a consistent state to be persisted.
PersistenceException - if some other exception happens while persisting this object.
Since:
Bb 6.0.11


Copyright © 2003 Blackboard, Inc. All Rights Reserved.