wt.projmgmt.msproject.mppobject
Class MPPAssignment

java.lang.Object
  extended bywt.projmgmt.msproject.mppobject.MPPObject
      extended bywt.projmgmt.msproject.mppobject.MPPAssignment
All Implemented Interfaces:
Comparable

public class MPPAssignment
extends MPPObject

An object that represents data from a Microsoft Project Plan Assignment.


Field Summary
(package private)  MPPResource resource
           
private static String RESOURCE
           
(package private)  MPPTask task
           
 
Fields inherited from class wt.projmgmt.msproject.mppobject.MPPObject
 
Constructor Summary
MPPAssignment()
           
 
Method Summary
protected  Persistable createPersistable()
          Create a new Persistable that is of the correct type for this object.
protected  String getGenericName()
          Return a generic name fo the this object.
 String getName()
          Return the name assigned to this object.
protected  String getNameElement()
          Return the name of the XML element that should be used to obtain the value of this object's name.
 MPPResource getResource()
          Get the MPPResource associated with this assignment.
 MPPTask getTask()
          Get the MPPTask associated with this assignment.
protected  boolean isValidPersistable(Persistable p)
          Make sure that the specified Persistable is of the right type for this object.
protected  Persistable refreshPersistable()
          Retrieve the Persistable that corresponds to this object from the database.
 void setResource(MPPResource resource)
          Set the MPPResource associated with this assignment.
 void setTask(MPPTask task)
          Set the MPPTask associated with this assignment.
protected  Persistable updatePersistable(Persistable p)
          Update the specified Persistable with the data in this object.
 
Methods inherited from class wt.projmgmt.msproject.mppobject.MPPObject
compareTo, containsKey, entrySet, get, getCurrentDate, getID, getImportInfo, getObjectIdentifier, getPersistable, getPersistableClass, getPersistableID, getPlan, getProjectPlan, getUID, isContainer, keySet, print, printImpl, printMsg, printNoUpdate, printNoUpdate, printRollUp, printUpdate, printUpdate, put, savePersistable, setID, setPersistable, setPlan, toString, updatePersistableCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

resource

MPPResource resource

task

MPPTask task
Constructor Detail

MPPAssignment

public MPPAssignment()
Method Detail

getName

public String getName()
Description copied from class: MPPObject
Return the name assigned to this object.

Overrides:
getName in class MPPObject

getGenericName

protected final String getGenericName()
Description copied from class: MPPObject
Return a generic name fo the this object. The object's ID is appended to the result of this method to form the object's name when it doesn't have a name.

Specified by:
getGenericName in class MPPObject

getNameElement

protected final String getNameElement()
Description copied from class: MPPObject
Return the name of the XML element that should be used to obtain the value of this object's name.

Specified by:
getNameElement in class MPPObject

refreshPersistable

protected Persistable refreshPersistable()
                                  throws WTException
Description copied from class: MPPObject
Retrieve the Persistable that corresponds to this object from the database. Return null if no such persistable exists.

Overrides:
refreshPersistable in class MPPObject
Throws:
WTException

createPersistable

protected Persistable createPersistable()
                                 throws WTException
Description copied from class: MPPObject
Create a new Persistable that is of the correct type for this object.

Specified by:
createPersistable in class MPPObject
Throws:
WTException

updatePersistable

protected Persistable updatePersistable(Persistable p)
                                 throws WTException,
                                        WTPropertyVetoException
Description copied from class: MPPObject
Update the specified Persistable with the data in this object.

Specified by:
updatePersistable in class MPPObject
Throws:
WTException
WTPropertyVetoException

isValidPersistable

protected boolean isValidPersistable(Persistable p)
                              throws WTException
Description copied from class: MPPObject
Make sure that the specified Persistable is of the right type for this object. Return false if null is passed to the method.

This class's implementation of this method ensures that the perisitable is in the right ProjectPlan. Subclasses that override this method should be sure to make a call to super so that this code is executed.

Overrides:
isValidPersistable in class MPPObject
Throws:
WTException

getResource

public MPPResource getResource()
Get the MPPResource associated with this assignment.


setResource

public final void setResource(MPPResource resource)
Set the MPPResource associated with this assignment.


getTask

public final MPPTask getTask()
Get the MPPTask associated with this assignment.


setTask

public final void setTask(MPPTask task)
Set the MPPTask associated with this assignment.