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.onap.vfc.nfvo.resmanagement.service.dao.impl;
19 import java.util.List;
22 import org.onap.vfc.nfvo.resmanagement.service.dao.impl.AbstractDao;
23 import org.onap.vfc.nfvo.resmanagement.service.dao.inf.LocationDao;
24 import org.onap.vfc.nfvo.resmanagement.service.entity.LocationEntity;
25 import org.onap.vfc.nfvo.resmanagement.service.mapper.LocationMapper;
29 * Location DAO implemetation class.<br>
34 * @version NFVO 0.5 Sep 10, 2016
36 public class LocationDaoImpl extends AbstractDao implements LocationDao {
39 public LocationEntity getLocation(String id) {
40 return getMapperManager(LocationMapper.class).getLocation(id);
44 public List<String> getCountry() {
45 return getMapperManager(LocationMapper.class).getCountry();
49 public List<String> getLocationByCountry(Map<String, Object> condition) {
50 return getMapperManager(LocationMapper.class).getLocationByCountry(condition);
54 public List<LocationEntity> getLocations(Map<String, Object> condition) {
55 return getMapperManager(LocationMapper.class).getLocations(condition);
59 public int deleteLocation(String id) {
60 return getMapperManager(LocationMapper.class).deleteLocation(id);
64 public int addLocation(LocationEntity locationEntity) {
65 return getMapperManager(LocationMapper.class).addLocation(locationEntity);
69 public int addLocationSelective(LocationEntity locationEntity) {
70 return getMapperManager(LocationMapper.class).addLocationSelective(locationEntity);
74 public int updateLocationSelective(LocationEntity locationEntity) {
75 return getMapperManager(LocationMapper.class).updateLocationSelective(locationEntity);
79 public int updateLocation(LocationEntity locationEntity) {
80 return getMapperManager(LocationMapper.class).updateLocation(locationEntity);