blackboard.data.content
Class Upload

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.content.Upload
All Implemented Interfaces:
UploadDef, IBbObject, java.lang.Cloneable
Direct Known Subclasses:
CourseUpload, GroupUpload

public abstract class Upload
extends BbObject
implements UploadDef

Upload

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

Field Summary
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Fields inherited from interface blackboard.data.content.UploadDef
COURSE_MEMBERSHIP_ID, FILE_ID, UPLOAD_DATE
 
Constructor Summary
Upload()
          Default constructor.
 
Method Summary
 Id getCourseMembershipId()
          Gets the id of the course membership record for the user that performed this upload in the course that contains it.
 UploadedFile getFile()
          Gets the uploaded file record of the file referred to by this upload.
 Id getFileId()
          Gets the id of the uploaded file record of the file referred to by this upload.
 java.util.Calendar getUploadDate()
          Gets the date and time when the file referred to by this object was uploaded.
 void setCourseMembershipId(Id courseMembershipId)
          Sets the id of the course membership record for the user that performed this upload in the course that contains it.
 void setFile(UploadedFile uploadedFile)
          Sets the uploaded file record of the file referred to by this upload.
 void setUploadDate(java.util.Calendar uploadDate)
          Sets the date and time when the file referred to by this object was uploaded.
 void syncFileId()
          Synchronizes the id returned by future calls to getFileId() to be the same as the id currently returned by a call to getFile().
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getDataType, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Upload

public Upload()
Default constructor. Creates an instance of Upload with default property values.

Method Detail

getCourseMembershipId

public Id getCourseMembershipId()
Gets the id of the course membership record for the user that performed this upload in the course that contains it. This will be unset on new instances, but must be set to the id of an existing course membership before persisting.

Returns:
the id of the owning course membership, unset on new instances

setCourseMembershipId

public void setCourseMembershipId(Id courseMembershipId)
Sets the id of the course membership record for the user that performed this upload in the course that contains it. This must be set on new instances to the id of an existing course membership before persisting.

Parameters:
courseMembershipId - the id of the owning course membership

getUploadDate

public java.util.Calendar getUploadDate()
Gets the date and time when the file referred to by this object was uploaded. This will be null on new instances, but must be set to a valid date before persisting.

Returns:
the date and time when the upload was performed, null on new instances

setUploadDate

public void setUploadDate(java.util.Calendar uploadDate)
Sets the date and time when the file referred to by this object was uploaded. This must be set on new instances to a valid date before persisting.

Parameters:
uploadDate - the date and time when the upload was performed

getFile

public UploadedFile getFile()
Gets the uploaded file record of the file referred to by this upload. This will be null on new instances, but must be set to a valid UploadedFile object before persisting.

Returns:
the uploaded file object referred to by this object, null on new instances

setFile

public void setFile(UploadedFile uploadedFile)
Sets the uploaded file record of the file referred to by this upload. This must be set on new instances to a valid UploadedFile object before persisting.

Parameters:
uploadedFile - the uploaded file object referred to by this object

getFileId

public Id getFileId()
Gets the id of the uploaded file record of the file referred to by this upload. This will be unset on new instances. This is intended primarily for use by loaders to do a heavy load of the uploaded file object.

Returns:
the id of the uploaded file object referred to by this object, unset on new instances

syncFileId

public void syncFileId()
Synchronizes the id returned by future calls to getFileId() to be the same as the id currently returned by a call to getFile().getId(). This method should be called whenever the id of the related uploaded file object may have changed to ensure data integrity. It is called automatically by setFile(UploadedFile). This is intended primarily for use by persisters to do a heavy persist of the uploaded file object.



Copyright © 2003 Blackboard, Inc. All Rights Reserved.