e72f426f97842c3faddff0163ed0a38b71bd7b1f
[vfc/nfvo/resmanagement.git] /
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.onap.vfc.nfvo.resmanagement.service.dao.impl;
18
19 import java.util.List;
20 import java.util.Map;
21
22 import org.onap.vfc.nfvo.resmanagement.service.dao.impl.AbstractDao;
23 import org.onap.vfc.nfvo.resmanagement.service.dao.inf.HostDao;
24 import org.onap.vfc.nfvo.resmanagement.service.entity.HostEntity;
25 import org.onap.vfc.nfvo.resmanagement.service.mapper.HostMapper;
26
27 /**
28  *
29  * Host DAO implementation class.<br>
30  * <p>
31  * </p>
32  *
33  * @author
34  * @version     NFVO 0.5  Sep 10, 2016
35  */
36 public class HostDaoImpl extends AbstractDao implements HostDao {
37
38     @Override
39     public HostEntity getHost(String id) {
40         return getMapperManager(HostMapper.class).getHost(id);
41     }
42
43     @Override
44     public List<HostEntity> getHosts(Map<String, Object> condition) {
45         return getMapperManager(HostMapper.class).getHosts(condition);
46     }
47
48     @Override
49     public int deleteHost(String id) {
50         return getMapperManager(HostMapper.class).deleteHost(id);
51     }
52
53     @Override
54     public int deleteHostByVimId(String vimId) {
55         return getMapperManager(HostMapper.class).deleteHostByVimId(vimId);
56     }
57
58     @Override
59     public int addHost(HostEntity hostEntity) {
60         return getMapperManager(HostMapper.class).addHost(hostEntity);
61     }
62
63     @Override
64     public int addHostSelective(HostEntity hostEntity) {
65         return getMapperManager(HostMapper.class).addHostSelective(hostEntity);
66     }
67
68     @Override
69     public int updateHostSelective(HostEntity hostEntity) {
70         return getMapperManager(HostMapper.class).updateHostSelective(hostEntity);
71     }
72
73     @Override
74     public int updateHost(HostEntity hostEntity) {
75         return getMapperManager(HostMapper.class).updateHost(hostEntity);
76     }
77
78     @Override
79     public int updateHostByVimId(HostEntity hostEntity) {
80         return getMapperManager(HostMapper.class).updateHostByVimId(hostEntity);
81     }
82
83 }