Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/24/08 14:37:02 (8 months ago)
Author:
bwolfe
Message:

Merging api-refactoring to trunk [3595]:[4355]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/src/api/org/openmrs/ConceptStateConversion.java

    r4095 r4358  
    1717import org.apache.commons.logging.LogFactory; 
    1818 
    19 public class ConceptStateConversion { 
     19/** 
     20 * ConceptStateConversion 
     21 */ 
     22public class ConceptStateConversion implements java.io.Serializable { 
    2023         
    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        // ****************** 
    2230         
    2331        private Integer conceptStateConversionId; 
     
    2634        private ProgramWorkflowState programWorkflowState; 
    2735         
     36        // ****************** 
     37        // Constructors 
     38        // ****************** 
     39         
     40        /** Default Constructor */ 
    2841        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        } 
    2963 
     64        /** @see Object#toString() */ 
    3065        public String toString() { 
    3166                return("ConceptStateConversion: Concept[" + concept + "] results in State [" + programWorkflowState + "] for workflow [" + programWorkflow + "]"); 
    3267        } 
    3368         
    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         
    4273        /** 
    4374         * @return Returns the concept. 
     
    95126                this.programWorkflowState = programWorkflowState; 
    96127        } 
    97          
    98128}