Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This Source Code Form is subject to the terms of the Mozilla Public License,
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
- * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
- * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
- *
- * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
- * graphic logo is a trademark of OpenMRS Inc.
- */
- package org.openmrs.module.receivedrugs.api.impl;
- import java.util.List;
- import org.openmrs.api.APIException;
- import org.openmrs.api.UserService;
- import org.openmrs.api.impl.BaseOpenmrsService;
- import org.openmrs.module.receivedrugs.Item;
- import org.openmrs.module.receivedrugs.api.ReceivedrugsService;
- import org.openmrs.module.receivedrugs.api.dao.ReceivedrugsDao;
- import org.openmrs.module.receivedrugs.api.pojo.ReceiveDrugDetails;
- import org.openmrs.module.receivedrugs.api.pojo.ReceiveDrugs;
- public class ReceivedrugsServiceImpl extends BaseOpenmrsService implements ReceivedrugsService {
- ReceivedrugsDao dao;
- UserService userService;
- /**
- * Injected in moduleApplicationContext.xml
- */
- public void setDao(ReceivedrugsDao dao) {
- this.dao = dao;
- }
- /**
- * Injected in moduleApplicationContext.xml
- */
- public void setUserService(UserService userService) {
- this.userService = userService;
- }
- @Override
- public Item getItemByUuid(String uuid) throws APIException {
- return dao.getItemByUuid(uuid);
- }
- @Override
- public Item saveItem(Item item) throws APIException {
- if (item.getOwner() == null) {
- item.setOwner(userService.getUser(1));
- }
- return dao.saveItem(item);
- }
- @Override
- public ReceiveDrugs SaveReceiveDrugs(ReceiveDrugs t) {
- return dao.SaveReceiveDrugs(t);
- }
- @Override
- public ReceiveDrugDetails SaveReceiveDrugDetails(ReceiveDrugDetails t) {
- return dao.SaveReceiveDrugDetails(t);
- }
- @Override
- public List<ReceiveDrugs> GetGrnList(String uuid) {
- return dao.GetGrnList(uuid);
- }
- @Override
- public List<ReceiveDrugDetails> GetReceiveDrugDetails(String id) {
- return dao.GetReceiveDrugDetails(id);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement