com.arsdigita.workflow.simple
Class TaskComment

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.workflow.simple.TaskComment

public class TaskComment
extends ObservableDomainObject

A comment on a task. Must be loaded in full because we don't handle ID.

Author:
Stefan Deusch, Khy Huang

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String versionId
           
 
Constructor Summary
  TaskComment(BigDecimal commentID, BigDecimal taskID, User user, String comment)
          Constructor for a task comment.
  TaskComment(BigDecimal commentID, BigDecimal taskID, User user, String comment, Date date)
          Constructor for a task comment.
  TaskComment(BigDecimal taskID, String comment)
          Constructor for a task comment without a specific user.
  TaskComment(BigDecimal taskID, User user, String comment)
          Constructor for a task comment.
  TaskComment(BigDecimal taskID, User user, String comment, Date date)
          Constructor for a task comment with a date setting.
  TaskComment(DataObject commentDataObject)
          Constructor to restore a task comment by data object.
protected TaskComment(ObjectType type)
          Constructor for setting the object type.
  TaskComment(OID oid)
          Restores the task ID with the OID.
  TaskComment(String typeName)
          Constructor for setting the object type name.
 
Method Summary
protected  String getBaseDataObjectType()
          Gets the base data object type.
 String getComment()
          Retrieves the comment string.
 Date getDate()
          Retrieves the creation date of the comment.
 Task getTask()
           
 BigDecimal getTaskID()
          Retrieves the task ID of the task owning this comment.
 User getUser()
          Get the user who added this comment.
 OID getUserOID()
          Retrieves the user OID of the user who created the comment.
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, initialize, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values
Constructor Detail

TaskComment

public TaskComment(BigDecimal taskID,
                   User user,
                   String comment)
Constructor for a task comment.

Parameters:
taskID - the task ID
user - the user
comment - the comment

TaskComment

public TaskComment(BigDecimal commentID,
                   BigDecimal taskID,
                   User user,
                   String comment)
Constructor for a task comment.

Parameters:
commentID - the comment ID
taskID - the task ID
user - the user
comment - the comment

TaskComment

public TaskComment(BigDecimal taskID,
                   User user,
                   String comment,
                   Date date)
Constructor for a task comment with a date setting.

Parameters:
taskID - the task ID
user - the user
comment - the comment
date - the date

TaskComment

public TaskComment(BigDecimal commentID,
                   BigDecimal taskID,
                   User user,
                   String comment,
                   Date date)
Constructor for a task comment.

Parameters:
commentID - the comment ID
taskID - the task ID
user - the user
comment - the comment
date - the Date of the comment

TaskComment

public TaskComment(BigDecimal taskID,
                   String comment)
Constructor for a task comment without a specific user.

Parameters:
taskID - the task ID
comment - the comment

TaskComment

public TaskComment(DataObject commentDataObject)
Constructor to restore a task comment by data object.

Parameters:
commentDataObject - the data object

TaskComment

protected TaskComment(ObjectType type)
Constructor for setting the object type.

Parameters:
type - the object type

TaskComment

public TaskComment(String typeName)
Constructor for setting the object type name.


TaskComment

public TaskComment(OID oid)
            throws DataObjectNotFoundException
Restores the task ID with the OID.

Parameters:
oid - the OID
See Also:
OID
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()
Gets the base data object type.

Overrides:
getBaseDataObjectType in class DomainObject
Returns:
The fully qualified name ("modelName.typeName") of the base data object type for this domain object class, or null if there is no restriction on the data object type for the primary data object encapsulated by this class.

getComment

public String getComment()
Retrieves the comment string.

Returns:
the comment string.

getDate

public Date getDate()
Retrieves the creation date of the comment.

Returns:
the creation date of the comment.

getUserOID

public OID getUserOID()
Retrieves the user OID of the user who created the comment.

Returns:
the user OID of the user who created the comment.
See Also:
OID

getUser

public User getUser()
Get the user who added this comment.

Returns:
a User, or null if no User is associated with this comment
Throws:
UncheckedWrapperException - if the OID does not reference a valid User

getTaskID

public BigDecimal getTaskID()
Retrieves the task ID of the task owning this comment.

Returns:
the task ID.

getTask

public Task getTask()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC