org.enhydra.shark
Class WfAssignmentImpl

java.lang.Object
  extended by org.enhydra.shark.WfAssignmentImpl
All Implemented Interfaces:
PersistenceInterface, WfAssignmentInternal

public class WfAssignmentImpl
extends java.lang.Object
implements WfAssignmentInternal

WfAssignmentImpl - Workflow Assignment Object implementation

Author:
Sasa Bojanic, Vladimir Puskas

Field Summary
protected  java.lang.String activityId
           
protected  boolean isAccepted
           
protected  boolean justCreated
           
protected  java.lang.String mgrName
           
protected  java.lang.String oldAssignee
           
protected  java.lang.String processId
           
protected  WfResourceInternal resource
           
protected  java.lang.String resourceUsername
           
 
Constructor Summary
  WfAssignmentImpl(AssignmentPersistenceObject po, WfResourceInternal res)
          Used to create object when restoring it from database.
protected WfAssignmentImpl(WMSessionHandle shandle, WfActivityInternal activity, WfResourceInternal resource)
          Creates new WfAssignment.
 
Method Summary
 WfActivityInternal activity(WMSessionHandle shandle)
          Gets the activity object of this assignment.
 java.lang.String activityId(WMSessionHandle shandle)
           
 WfResourceInternal assignee(WMSessionHandle shandle)
          Gets the assignee (resource) of this assignment.
protected  AssignmentPersistenceObject createAndFillPersistentObject()
           
 void delete(WMSessionHandle shandle)
           
 boolean equals(java.lang.Object obj)
           
 boolean get_accepted_status(WMSessionHandle shandle)
           
 int hashCode()
           
 java.lang.String managerName(WMSessionHandle shandle)
           
 void persist(WMSessionHandle shandle)
           
 java.lang.String processId(WMSessionHandle shandle)
           
 java.lang.String resourceUsername(WMSessionHandle shandle)
           
protected  void restore(AssignmentPersistenceObject po)
           
 void set_assignee(WMSessionHandle shandle, WfResourceInternal new_value)
          Sets the assignee of this assignment.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

activityId

protected java.lang.String activityId

resourceUsername

protected java.lang.String resourceUsername

mgrName

protected java.lang.String mgrName

processId

protected java.lang.String processId

isAccepted

protected boolean isAccepted

resource

protected WfResourceInternal resource

oldAssignee

protected java.lang.String oldAssignee

justCreated

protected boolean justCreated
Constructor Detail

WfAssignmentImpl

protected WfAssignmentImpl(WMSessionHandle shandle,
                           WfActivityInternal activity,
                           WfResourceInternal resource)
                    throws java.lang.Exception
Creates new WfAssignment.

Parameters:
activity - The Activity object for this assignment.
resource - The WfResource object this is assigned to.
Throws:
java.lang.Exception

WfAssignmentImpl

public WfAssignmentImpl(AssignmentPersistenceObject po,
                        WfResourceInternal res)
Used to create object when restoring it from database.

Method Detail

activity

public WfActivityInternal activity(WMSessionHandle shandle)
                            throws java.lang.Exception
Gets the activity object of this assignment.

Specified by:
activity in interface WfAssignmentInternal
Returns:
WfActivity The activity object of this assignment.
Throws:
java.lang.Exception

assignee

public WfResourceInternal assignee(WMSessionHandle shandle)
                            throws java.lang.Exception
Gets the assignee (resource) of this assignment.

Specified by:
assignee in interface WfAssignmentInternal
Returns:
WfResource The assignee of this assignment.
Throws:
java.lang.Exception

set_assignee

public void set_assignee(WMSessionHandle shandle,
                         WfResourceInternal new_value)
                  throws java.lang.Exception,
                         InvalidResource
Sets the assignee of this assignment.

Specified by:
set_assignee in interface WfAssignmentInternal
Throws:
java.lang.Exception
InvalidResource

get_accepted_status

public boolean get_accepted_status(WMSessionHandle shandle)
                            throws java.lang.Exception
Specified by:
get_accepted_status in interface WfAssignmentInternal
Throws:
java.lang.Exception

managerName

public java.lang.String managerName(WMSessionHandle shandle)
                             throws java.lang.Exception
Specified by:
managerName in interface WfAssignmentInternal
Throws:
java.lang.Exception

processId

public java.lang.String processId(WMSessionHandle shandle)
                           throws java.lang.Exception
Specified by:
processId in interface WfAssignmentInternal
Throws:
java.lang.Exception

activityId

public java.lang.String activityId(WMSessionHandle shandle)
                            throws java.lang.Exception
Specified by:
activityId in interface WfAssignmentInternal
Throws:
java.lang.Exception

resourceUsername

public java.lang.String resourceUsername(WMSessionHandle shandle)
                                  throws java.lang.Exception
Specified by:
resourceUsername in interface WfAssignmentInternal
Throws:
java.lang.Exception

toString

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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

persist

public void persist(WMSessionHandle shandle)
             throws java.lang.Exception
Specified by:
persist in interface PersistenceInterface
Throws:
java.lang.Exception

delete

public void delete(WMSessionHandle shandle)
            throws java.lang.Exception
Specified by:
delete in interface PersistenceInterface
Throws:
java.lang.Exception

createAndFillPersistentObject

protected AssignmentPersistenceObject createAndFillPersistentObject()

restore

protected void restore(AssignmentPersistenceObject po)