org.openmrs
Class Program

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.BaseOpenmrsMetadata
          extended by org.openmrs.Program
All Implemented Interfaces:
java.io.Serializable, Auditable, OpenmrsMetadata, OpenmrsObject, Retireable

public class Program
extends BaseOpenmrsMetadata
implements java.io.Serializable

Program

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
Program()
          Default Constructor
Program(java.lang.Integer programId)
          Constructor with id
 
Method Summary
 void addWorkflow(ProgramWorkflow workflow)
          Adds a new ProgramWorkflow to this Program
 boolean equals(java.lang.Object obj)
           
 java.util.Set<ProgramWorkflow> getAllWorkflows()
          Get all workflows...including the retired ones
 Concept getConcept()
           
 java.lang.Integer getId()
           
 java.lang.Integer getProgramId()
           
 ProgramWorkflow getWorkflow(java.lang.Integer programWorkflowId)
          Get the workflow with the specified ID
 ProgramWorkflow getWorkflowByName(java.lang.String name)
          Returns a ProgramWorkflow whose Concept has any ConceptName that matches the given name
 java.util.Set<ProgramWorkflow> getWorkflows()
          Get only the non-retired workflows
 void removeWorkflow(ProgramWorkflow workflow)
          Removes a ProgramWorkflow from this Program
 void retireWorkflow(ProgramWorkflow workflow)
          Retires a ProgramWorkflow
 void setAllWorkflows(java.util.Set<ProgramWorkflow> allWorkflows)
           
 void setConcept(Concept concept)
           
 void setId(java.lang.Integer id)
           
 void setProgramId(java.lang.Integer programId)
           
 java.lang.String toString()
           
 
Methods inherited from class org.openmrs.BaseOpenmrsMetadata
getChangedBy, getCreator, getDateChanged, getDateCreated, getDateRetired, getDescription, getName, getRetired, getRetiredBy, getRetireReason, isRetired, setChangedBy, setCreator, setDateChanged, setDateCreated, setDateRetired, setDescription, setName, setRetired, setRetiredBy, setRetireReason
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getUuid, setUuid
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

Program

public Program()
Default Constructor


Program

public Program(java.lang.Integer programId)
Constructor with id

Method Detail

addWorkflow

public void addWorkflow(ProgramWorkflow workflow)
Adds a new ProgramWorkflow to this Program

Parameters:
workflow - - the ProgramWorkflow to add

removeWorkflow

public void removeWorkflow(ProgramWorkflow workflow)
Removes a ProgramWorkflow from this Program

Parameters:
workflow - - the ProgramWorkflow to remove

retireWorkflow

public void retireWorkflow(ProgramWorkflow workflow)
Retires a ProgramWorkflow

Parameters:
workflow - - the ProgramWorkflow to retire

getWorkflowByName

public ProgramWorkflow getWorkflowByName(java.lang.String name)
Returns a ProgramWorkflow whose Concept has any ConceptName that matches the given name

Parameters:
name - the ProgramWorkflow name, in any Locale
Returns:
a ProgramWorkflow which has the passed name in any Locale

equals

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

toString

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

getConcept

public Concept getConcept()

setConcept

public void setConcept(Concept concept)

getProgramId

public java.lang.Integer getProgramId()

setProgramId

public void setProgramId(java.lang.Integer programId)

getWorkflows

public java.util.Set<ProgramWorkflow> getWorkflows()
Get only the non-retired workflows

Returns:
Returns a Set of all non-retired workflows

getWorkflow

public ProgramWorkflow getWorkflow(java.lang.Integer programWorkflowId)
Get the workflow with the specified ID

Returns:
the workflow matching the given id or null if none found
Since:
1.6

getAllWorkflows

public java.util.Set<ProgramWorkflow> getAllWorkflows()
Get all workflows...including the retired ones

Returns:
Returns a Set of all workflows

setAllWorkflows

public void setAllWorkflows(java.util.Set<ProgramWorkflow> allWorkflows)

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change