f558b5d2feb9502e59295e6a6c97c80708815e83
[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.openo.nfvo.resmanagement.service.dao.inf;
18
19 import java.util.List;
20 import java.util.Map;
21
22 import org.openo.nfvo.resmanagement.service.entity.PortEntity;
23
24 /**
25  * Port info interface.<br/>
26  * <p>
27  * </p>
28  *
29  * @author
30  * @version NFVO 0.5 Aug 24, 2016
31  */
32 public interface PortDao {
33
34     /**
35      * It is used to get Port info.<br/>
36      *
37      * @param id
38      * @return The get result
39      * @since NFVO 0.5
40      */
41     PortEntity getPort(String id);
42
43     /**
44      * It is used to get Ports info.<br/>
45      *
46      * @param condition
47      * @return The get result
48      * @since NFVO 0.5
49      */
50     List<PortEntity> getPorts(Map<String, Object> condition);
51
52     /**
53      * It is used to delete Ports info.<br/>
54      *
55      * @param id
56      * @return The delete result
57      * @since NFVO 0.5
58      */
59     int deletePort(String id);
60
61     /**
62      * It is used to delete Ports info.<br/>
63      *
64      * @param vimId
65      * @return The delete result
66      * @since NFVO 0.5
67      */
68     int deletePortByVimId(String vimId);
69
70     /**
71      * It is used to add Ports info. <br/>
72      *
73      * @param portEntity
74      * @return The add result
75      * @since NFVO 0.5
76      */
77     int addPort(PortEntity portEntity);
78
79     /**
80      * It is used to add Ports info. <br/>
81      *
82      * @param portEntity
83      * @return The add result
84      * @since NFVO 0.5
85      */
86     int addPortSelective(PortEntity portEntity);
87
88     /**
89      * It is used to update Ports info. <br/>
90      *
91      * @param portEntity
92      * @return The update result
93      * @since NFVO 0.5
94      */
95     int updatePortSelective(PortEntity portEntity);
96
97     /**
98      * It is used to update Ports info. <br/>
99      *
100      * @param portEntity
101      * @return The update result
102      * @since NFVO 0.5
103      */
104     int updatePort(PortEntity portEntity);
105
106     /**
107      * It is used to update Ports info. <br/>
108      *
109      * @param portEntity
110      * @return The update result
111      * @since NFVO 0.5
112      */
113     int updatePortByVimId(PortEntity portEntity);
114 }