• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openmrs / openmrs-core / 8240141295

11 Mar 2024 09:46PM CUT coverage: 64.693% (-0.01%) from 64.705%
8240141295

push

github

web-flow
maven(deps): bump jacksonVersion from 2.16.1 to 2.16.2 (#4582)

Bumps `jacksonVersion` from 2.16.1 to 2.16.2.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.16.1 to 2.16.2
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.16.1...jackson-core-2.16.2)

Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.16.1 to 2.16.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.16.1 to 2.16.2
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.16.1 to 2.16.2

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-annotations
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

22763 of 35186 relevant lines covered (64.69%)

0.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/api/src/main/java/org/openmrs/api/db/hibernate/HibernateOpenmrsObjectDAO.java
1
/**
2
 * This Source Code Form is subject to the terms of the Mozilla Public License,
3
 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
4
 * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
5
 * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
6
 *
7
 * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
8
 * graphic logo is a trademark of OpenMRS Inc.
9
 */
10
package org.openmrs.api.db.hibernate;
11

12
import java.io.Serializable;
13

14
import org.hibernate.SessionFactory;
15
import org.openmrs.BaseOpenmrsObject;
16
import org.openmrs.api.db.OpenmrsObjectDAO;
17
import org.springframework.beans.factory.annotation.Autowired;
18

19
/**
20
 * 
21
 * Generic base class for all OpenMrs DAOs
22
 * @since 1.10
23
 *
24
 */
25
public class HibernateOpenmrsObjectDAO<T extends BaseOpenmrsObject> implements OpenmrsObjectDAO<T> {
×
26
        
27
        @Autowired
28
        protected SessionFactory sessionFactory;
29
        
30
        protected Class<T> mappedClass;
31
        
32
        public void setSessionFactory(SessionFactory sessionFactory) {
33
                this.sessionFactory = sessionFactory;
×
34
        }
×
35
        
36
        @Override
37
        public T getById(Serializable id) {
38
                return (T) sessionFactory.getCurrentSession().get(mappedClass, id);
×
39
        }
40
        
41
        /**
42
         * @see org.openmrs.api.db.OpenmrsObjectDAO#getByUuid(java.lang.String)
43
         */
44
        @Override
45
        public T getByUuid(String uuid) {
46
                return HibernateUtil.getUniqueEntityByUUID(sessionFactory, mappedClass, uuid);
×
47
        }
48

49

50
        /** 
51
         * @see org.openmrs.api.db.OpenmrsObjectDAO#delete(org.openmrs.BaseOpenmrsObject)
52
         */
53
        @Override
54
        public void delete(T persistent) {
55
                sessionFactory.getCurrentSession().delete(persistent);
×
56
        }
×
57
        
58
        /**
59
         * @see org.openmrs.api.db.OpenmrsObjectDAO#saveOrUpdate(org.openmrs.BaseOpenmrsObject)
60
         */
61
        @Override
62
        public T saveOrUpdate(T persistent) {
63
                sessionFactory.getCurrentSession().saveOrUpdate(persistent);
×
64
                return persistent;
×
65
        }
66
        
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc