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/api/db/PersonDAO.java

    r4158 r4358  
    2525/** 
    2626 * Person-related database functions 
    27  * @version 1.0 
     27 * This is used by the PersonService.  This should not be used directly, 
     28 * but rather used through the methods on the PersonService. 
     29 *  
     30 * Use case: 
     31 * <code> 
     32 *   PersonService ps = Context.getPersonService(); 
     33 *   ps.... 
     34 *    
     35 * </code> 
     36 *  
     37 * @see org.openmrs.api.PersonService 
     38 * @see org.openmrs.api.context.Context 
    2839 */ 
    2940public interface PersonDAO { 
     
    3445        public Set<Person> getSimilarPeople(String name, Integer birthyear, String gender) throws DAOException; 
    3546         
    36         public List<Person> findPeople(String name, boolean includeRetired) throws DAOException; 
    37          
    38         public void createPersonAttributeType(PersonAttributeType type); 
     47        /** 
     48     * @see org.openmrs.api.PersonService#getPeople(String, Boolean)) 
     49     */ 
     50    public List<Person> getPeople(String searchPhrase, Boolean dead) throws DAOException; 
     51     
     52        /** 
     53     * @see org.openmrs.api.PersonService#savePersonAttributeType(org.openmrs.PersonAttributeType) 
     54     */ 
     55    public PersonAttributeType savePersonAttributeType(PersonAttributeType type) throws DAOException; 
    3956 
    40         public void deletePersonAttributeType(PersonAttributeType type); 
     57    /** 
     58     * @see org.openmrs.api.PersonService#purgePersonAttributeType(org.openmrs.PersonAttributeType) 
     59     */ 
     60    public void deletePersonAttributeType(PersonAttributeType type) throws DAOException; 
     61     
     62    /** 
     63     * @see org.openmrs.api.PersonService#getPersonAttributeTypes(java.lang.String, java.lang.String, java.lang.Integer, java.lang.Boolean) 
     64     */ 
     65    public List<PersonAttributeType> getPersonAttributeTypes(String exactName, 
     66            String format, Integer foreignKey, Boolean searchable) throws DAOException; 
    4167 
    42         public void updatePersonAttributeType(PersonAttributeType type); 
     68    /** 
     69     * @see org.openmrs.api.PersonService#getAllPersonAttributeTypes() 
     70     * @see org.openmrs.api.PersonService#getAllPersonAttributeTypes(boolean) 
     71     */ 
     72    public List<PersonAttributeType> getAllPersonAttributeTypes(boolean includeRetired) throws DAOException; 
    4373 
    44         public List<PersonAttributeType> getPersonAttributeTypes(); 
    45  
    46         public PersonAttributeType getPersonAttributeType(Integer typeId); 
    47          
    48         public PersonAttribute getPersonAttribute(Integer id); 
    49  
    50         public PersonAttributeType getPersonAttributeType(String s); 
     74    /** 
     75         * @see org.openmrs.api.PersonService#getPersonAttributeType(java.lang.Integer) 
     76         */ 
     77        public PersonAttributeType getPersonAttributeType(Integer typeId) throws DAOException; 
    5178         
    5279        /** 
    53          * Get relationship by internal relationship identifier 
    54          *  
    55          * @return Relationship 
    56          * @param relationshipId  
    57          * @throws DAOException 
     80         * @see org.openmrs.api.PersonService#getPersonAttribute(java.lang.Integer) 
     81         */ 
     82        public PersonAttribute getPersonAttribute(Integer id) throws DAOException; 
     83 
     84        /** 
     85         * @see org.openmrs.api.PersonService#getRelationship(java.lang.Integer) 
    5886         */ 
    5987        public Relationship getRelationship(Integer relationshipId) throws DAOException; 
    6088         
    6189        /** 
    62          * Get list of relationships that are not retired 
    63          *  
    64          * @return non-voided Relationship list 
    65          * @throws DAOException 
    66          */ 
    67         public List<Relationship> getRelationships() throws DAOException; 
     90     * @see org.openmrs.api.PersonService#getAllRelationships(boolean) 
     91     */ 
     92    public List<Relationship> getAllRelationships(boolean includeVoided) throws DAOException; 
    6893         
    69         /** 
    70          * Get list of relationships containing Person  
    71          *  
    72          * @return Relationship list 
    73          * @throws DAOException 
    74          */ 
    75         public List<Relationship> getRelationships(Person p, boolean showVoided) throws DAOException; 
    76          
    77         /** 
    78          * Get all relationshipTypes 
    79          *  
    80          * @return relationshipType list 
    81          * @throws DAOException 
    82          */ 
    83         public List<RelationshipType> getRelationshipTypes() throws DAOException; 
     94    /** 
     95     * @see org.openmrs.api.PersonService#getAllRelationshipTypes(boolean) 
     96     */ 
     97    public List<RelationshipType> getAllRelationshipTypes(boolean includeRetired) throws DAOException; 
    8498 
    85         /** 
    86          * Get relationshipType by internal identifier 
    87          *  
    88          * @param relationshipType id 
    89          * @return relationshipType with given internal identifier 
    90          * @throws DAOException 
     99    /** 
     100         * @see org.openmrs.api.PersonService#getRelationshipType(java.lang.Integer) 
    91101         */ 
    92102        public RelationshipType getRelationshipType(Integer relationshipTypeId) throws DAOException; 
    93103         
     104    /** 
     105     * @see org.openmrs.api.PersonService#getRelationshipTypes(java.lang.String, java.lang.Boolean) 
     106     */ 
     107    public List<RelationshipType> getRelationshipTypes(String relationshipTypeName, 
     108            Boolean preferred) throws DAOException; 
     109             
     110    /** 
     111     * @see org.openmrs.api.PersonService#savePerson(org.openmrs.Person) 
     112     */ 
     113    public Person savePerson(Person person) throws DAOException; 
     114 
     115    /** 
     116     * @see org.openmrs.api.PersonService#deletePerson(org.openmrs.Person) 
     117     */ 
     118    public void deletePerson(Person person) throws DAOException; 
     119         
     120    /** 
     121     * @see org.openmrs.api.PersonService#getPerson(java.lang.Integer) 
     122     */ 
     123    public Person getPerson(Integer personId) throws DAOException; 
     124 
     125    /** 
     126     * @see org.openmrs.api.PersonService#saveRelationship(org.openmrs.Relationship) 
     127     */ 
     128    public Relationship saveRelationship(Relationship relationship) throws DAOException; 
     129 
     130    /** 
     131     * @see org.openmrs.api.PersonService#purgeRelationship(org.openmrs.Relationship) 
     132     */ 
     133    public void deleteRelationship(Relationship relationship) throws DAOException;       
     134 
     135    /** 
     136     * @see org.openmrs.api.PersonService#getRelationships(org.openmrs.Person, org.openmrs.Person, org.openmrs.RelationshipType) 
     137     */ 
     138    public List<Relationship> getRelationships(Person fromPerson, 
     139            Person toPerson, RelationshipType relType) throws DAOException; 
     140     
    94141        /** 
    95          * Get relationshipType by name 
    96          *  
    97          * @throws DAOException 
    98          */ 
    99         public RelationshipType findRelationshipType(String relationshipTypeName) throws DAOException; 
    100  
    101         /** 
    102          * Create a new Person 
    103          * @param Person to create 
    104          * @throws DAOException 
    105          * @return Person created 
    106          */ 
    107         public Person createPerson(Person person) throws DAOException; 
    108  
    109         /** 
    110          * Update a person 
    111          * @param Person to update 
    112          * @throws DAOException 
    113          */ 
    114         public void updatePerson(Person person) throws DAOException; 
    115  
    116         /** 
    117          * Delete a person 
    118          * @param Person to delete 
    119          * @throws DAOException 
    120          */ 
    121         public void deletePerson(Person person) throws DAOException; 
    122          
    123         /** 
    124          *  
    125          * @param personId of the Person to retrieve 
    126          * @return Person 
    127          * @throws DAOException 
    128          */ 
    129         public Person getPerson(Integer personId) throws DAOException; 
    130  
    131         /** 
    132          * Create a new Relationship 
    133          * @param Relationship to create 
    134          * @throws DAOException 
    135          */ 
    136         public void createRelationship(Relationship relationship) throws DAOException; 
    137  
    138         /** 
    139          * Update Relationship 
    140          * @param Relationship to update 
    141          * @throws DAOException 
    142          */ 
    143         public void updateRelationship(Relationship relationship) throws DAOException; 
    144  
    145         /** 
    146          * Delete Relationship 
    147          * @param Relationship to delete 
    148          * @throws DAOException 
    149          */ 
    150         public void deleteRelationship(Relationship relationship) throws DAOException;   
    151          
    152         /** 
    153          * Retire Relationship 
    154          * @param Relationship to void 
    155          * @throws DAOException 
    156          */ 
    157         public void voidRelationship(Relationship relationship) throws DAOException;     
    158  
    159         /** 
    160          * Unretire Relationship 
    161          * @param Relationship to unvoid 
    162          * @throws DAOException 
    163          */ 
    164         public void unvoidRelationship(Relationship relationship) throws DAOException;           
    165  
    166         /** 
    167          * Create a new RelationshipType 
    168          * @param RelationshipType to create 
    169          * @throws DAOException 
    170          */ 
    171         public void createRelationshipType(RelationshipType relationshipType) throws DAOException; 
    172  
    173         /** 
    174          * Update RelationshipType 
    175          * @param RelationshipType to update 
    176          * @throws DAOException 
    177          */ 
    178         public void updateRelationshipType(RelationshipType relationshipType) throws DAOException; 
    179  
    180         /** 
    181          * Delete RelationshipType 
    182          * @param RelationshipType to delete 
    183          * @throws DAOException 
    184          */ 
    185         public void deleteRelationshipType(RelationshipType relationshipType) throws DAOException;       
    186          
     142     * @see org.openmrs.api.PersonService#saveRelationshipType(org.openmrs.RelationshipType) 
     143     */ 
     144    public RelationshipType saveRelationshipType(RelationshipType relationshipType) throws DAOException; 
     145     
     146    /** 
     147     * @see org.openmrs.api.PersonService#deleteRelationshipType(org.openmrs.RelationshipType) 
     148     */ 
     149    public void deleteRelationshipType(RelationshipType relationshipType) throws DAOException; 
    187150}