com.partnersoft.job.model
Class JobDataComponent

java.lang.Object
  extended by com.partnersoft.job.model.JobDataComponent
All Implemented Interfaces:
Coggable
Direct Known Subclasses:
Alternative, Chain, Job, JobUnit, Location, LocationUnit, ReportConfig, Span, SpanUnit

public abstract class JobDataComponent
extends java.lang.Object
implements Coggable

Superclass for data objects at various levels in the job data structure. Handles the guid, name, type, and configurable data properties.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Constructor Summary
JobDataComponent()
           
 
Method Summary
 java.lang.Object copy()
          Deep-copies the object.
 void copyStateFrom(java.lang.Object nother)
          Subclass homework; copies state from other object.
 void generateGuid()
          Creates a new guid for this component.
abstract  void generateID()
          Subclass homework.
 void generateStandardIDs()
          Generates a new guid, id, and sets the name to the new id.
 Cog getData()
          Gets the value of data
 java.lang.String getGuid()
          Gets the value of guid
 int getID()
           
 java.lang.String getName()
          Gets the value of name
 Cog getState()
          Subclasses extend this by calling super.getState() and then adding their own state to the result.
 java.lang.String getType()
          Gets the value of type
abstract  void remove()
          More subclass homework.
 void setData(Cog argData)
          Sets the value of data
 void setGuid(java.lang.String argGuid)
          Sets the value of guid
 void setID(int newID)
           
 void setName(java.lang.String argName)
          Sets the value of name
 void setState(Cog state)
          Subclasses should extend this by calling super.setState() and then setting their own state from the input.
 void setType(java.lang.String argType)
          Sets the value of type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobDataComponent

public JobDataComponent()
Method Detail

generateStandardIDs

public void generateStandardIDs()
Generates a new guid, id, and sets the name to the new id.


generateGuid

public void generateGuid()
Creates a new guid for this component.


copy

public java.lang.Object copy()
Deep-copies the object. Subclasses do not need to implement this; it uses copyStateFrom.


copyStateFrom

public void copyStateFrom(java.lang.Object nother)
Subclass homework; copies state from other object. Subclasses should call super.copyStateFrom() first.


remove

public abstract void remove()
More subclass homework. Subclasses should do whatever is required to remove themselves from the job data object hierarchy.


generateID

public abstract void generateID()
Subclass homework. Component should assign itself a unique integer ID (often more useful than a GUID for dealing with legacy systems or in reports and such). Generally this is by consulting an ID registry; the job actually serves this purpose for all its components.


getState

public Cog getState()
Subclasses extend this by calling super.getState() and then adding their own state to the result.

Specified by:
getState in interface Coggable

setState

public void setState(Cog state)
Subclasses should extend this by calling super.setState() and then setting their own state from the input.

Specified by:
setState in interface Coggable

getName

public java.lang.String getName()
Gets the value of name

Returns:
the value of name

setName

public void setName(java.lang.String argName)
Sets the value of name

Parameters:
argName - Value to assign to this.name

getGuid

public java.lang.String getGuid()
Gets the value of guid

Returns:
the value of guid

setGuid

public void setGuid(java.lang.String argGuid)
Sets the value of guid

Parameters:
argGuid - Value to assign to this.guid

getType

public java.lang.String getType()
Gets the value of type

Returns:
the value of type

setType

public void setType(java.lang.String argType)
Sets the value of type

Parameters:
argType - Value to assign to this.type

getData

public Cog getData()
Gets the value of data

Returns:
the value of data

setData

public void setData(Cog argData)
Sets the value of data

Parameters:
argData - Value to assign to this.data

getID

public int getID()

setID

public void setID(int newID)