2 * Copyright 2016 Huawei Technologies Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org.openo.nfvo.resmanagement.service.dao.impl;
19 import java.util.List;
22 import org.openo.nfvo.resmanagement.service.dao.impl.AbstractDao;
23 import org.openo.nfvo.resmanagement.service.dao.inf.PortDao;
24 import org.openo.nfvo.resmanagement.service.entity.PortEntity;
25 import org.openo.nfvo.resmanagement.service.mapper.PortMapper;
29 * Port DAO implementation class.<br>
34 * @version NFVO 0.5 Sep 10, 2016
36 public class PortDaoImpl extends AbstractDao implements PortDao {
39 public PortEntity getPort(String id) {
40 return getMapperManager(PortMapper.class).getPort(id);
44 public List<PortEntity> getPorts(Map<String, Object> condition) {
45 return getMapperManager(PortMapper.class).getPorts(condition);
49 public int deletePort(String id) {
50 return getMapperManager(PortMapper.class).deletePort(id);
54 public int deletePortByVimId(String vimId) {
55 return getMapperManager(PortMapper.class).deletePortByVimId(vimId);
59 public int addPort(PortEntity portEntity) {
60 return getMapperManager(PortMapper.class).addPort(portEntity);
64 public int addPortSelective(PortEntity portEntity) {
65 return getMapperManager(PortMapper.class).addPortSelective(portEntity);
69 public int updatePortSelective(PortEntity portEntity) {
70 return getMapperManager(PortMapper.class).updatePortSelective(portEntity);
74 public int updatePort(PortEntity portEntity) {
75 return getMapperManager(PortMapper.class).updatePort(portEntity);
79 public int updatePortByVimId(PortEntity portEntity) {
80 return getMapperManager(PortMapper.class).updatePortByVimId(portEntity);