- Timestamp:
- 05/24/08 14:37:02 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/trunk/src/api/org/openmrs/ConceptStateConversion.java
r4095 r4358 17 17 import org.apache.commons.logging.LogFactory; 18 18 19 public class ConceptStateConversion { 19 /** 20 * ConceptStateConversion 21 */ 22 public class ConceptStateConversion implements java.io.Serializable { 20 23 21 private Log log = LogFactory.getLog(this.getClass()); 24 public static final long serialVersionUID = 3214511L; 25 protected final Log log = LogFactory.getLog(getClass()); 26 27 // ****************** 28 // Properties 29 // ****************** 22 30 23 31 private Integer conceptStateConversionId; … … 26 34 private ProgramWorkflowState programWorkflowState; 27 35 36 // ****************** 37 // Constructors 38 // ****************** 39 40 /** Default Constructor */ 28 41 public ConceptStateConversion() { } 42 43 /** Constructor with id */ 44 public ConceptStateConversion(Integer conceptStateConversionId) { 45 setConceptStateConversionId(conceptStateConversionId); 46 } 47 48 // ****************** 49 // Instance methods 50 // ****************** 51 52 /** @see Object#equals(Object) */ 53 public boolean equals(Object obj) { 54 if (obj != null && obj instanceof ConceptStateConversion) { 55 ConceptStateConversion p = (ConceptStateConversion)obj; 56 if (this.getConceptStateConversionId() == null) { 57 return p.getConceptStateConversionId() == null; 58 } 59 return (this.getConceptStateConversionId().equals(p.getConceptStateConversionId())); 60 } 61 return false; 62 } 29 63 64 /** @see Object#toString() */ 30 65 public String toString() { 31 66 return("ConceptStateConversion: Concept[" + concept + "] results in State [" + programWorkflowState + "] for workflow [" + programWorkflow + "]"); 32 67 } 33 68 34 public boolean equals(Object o) { 35 if (o instanceof ConceptStateConversion) { 36 ConceptStateConversion other = (ConceptStateConversion) o; 37 return getConceptStateConversionId() != null && other.getConceptStateConversionId() != null && getConceptStateConversionId().equals(other.getConceptStateConversionId()); 38 } 39 return false; 40 } 41 69 // ****************** 70 // Property Access 71 // ****************** 72 42 73 /** 43 74 * @return Returns the concept. … … 95 126 this.programWorkflowState = programWorkflowState; 96 127 } 97 98 128 }