YuanyouZhang | 362c7ab | 2015-08-03 17:07:20 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame^] | 2 | * Copyright 2015-present Open Networking Laboratory |
YuanyouZhang | 362c7ab | 2015-08-03 17:07:20 +0800 | [diff] [blame] | 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 | package org.onosproject.ovsdb.rfc.table; |
| 17 | |
| 18 | import java.util.Map; |
| 19 | import java.util.Set; |
| 20 | |
| 21 | import org.onosproject.ovsdb.rfc.notation.Column; |
| 22 | import org.onosproject.ovsdb.rfc.notation.Row; |
| 23 | import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; |
| 24 | import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService; |
| 25 | import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription; |
| 26 | |
| 27 | /** |
| 28 | * This class provides operations of Manager Table. |
| 29 | */ |
| 30 | public class Manager extends AbstractOvsdbTableService { |
| 31 | /** |
| 32 | * Manager table column name. |
| 33 | */ |
| 34 | public enum ManagerColumn { |
| 35 | TARGET("target"), ISCONNECTED("is_connected"), CONNECTIONMODE("connection_mode"), |
| 36 | EXTERNALIDS("external_ids"), STATUS("status"), INACTIVITYPROBE("inactivity_probe"), |
| 37 | OTHERCONFIG("other_config"), MAXBACKOFF("max_backoff"); |
| 38 | |
| 39 | private final String columnName; |
| 40 | |
| 41 | private ManagerColumn(String columnName) { |
| 42 | this.columnName = columnName; |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Returns the table column name for ManagerColumn. |
| 47 | * @return the table column name |
| 48 | */ |
| 49 | public String columnName() { |
| 50 | return columnName; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Constructs a Manager object. Generate Manager Table Description. |
| 56 | * @param dbSchema DatabaseSchema |
| 57 | * @param row Row |
| 58 | */ |
| 59 | public Manager(DatabaseSchema dbSchema, Row row) { |
| 60 | super(dbSchema, row, OvsdbTable.MANAGER, VersionNum.VERSION100); |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Get the Column entity which column name is "target" from the Row entity |
| 65 | * of attributes. |
| 66 | * @return the Column entity which column name is "target" |
| 67 | */ |
| 68 | public Column getTargetColumn() { |
| 69 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.TARGET.columnName(), |
| 70 | "getTargetColumn", VersionNum.VERSION100); |
| 71 | return (Column) super.getColumnHandler(columndesc); |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Add a Column entity which column name is "target" to the Row entity of |
| 76 | * attributes. |
| 77 | * @param target the column data which column name is "target" |
| 78 | */ |
| 79 | public void setTarget(Set<String> target) { |
| 80 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.TARGET.columnName(), |
| 81 | "setTarget", |
| 82 | VersionNum.VERSION100); |
| 83 | super.setDataHandler(columndesc, target); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Get the Column entity which column name is "is_connected" from the Row |
| 88 | * entity of attributes. |
| 89 | * @return the Column entity which column name is "is_connected" |
| 90 | */ |
| 91 | public Column getIsConnectedColumn() { |
| 92 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.ISCONNECTED.columnName(), |
| 93 | "getIsConnectedColumn", VersionNum.VERSION110); |
| 94 | return (Column) super.getColumnHandler(columndesc); |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Add a Column entity which column name is "is_connected" to the Row entity |
| 99 | * of attributes. |
| 100 | * @param isConnected the column data which column name is "is_connected" |
| 101 | */ |
| 102 | public void setIsConnected(Boolean isConnected) { |
| 103 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.ISCONNECTED.columnName(), |
| 104 | "setIsConnected", VersionNum.VERSION110); |
| 105 | super.setDataHandler(columndesc, isConnected); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Get the Column entity which column name is "other_config" from the Row |
| 110 | * entity of attributes. |
| 111 | * @return the Column entity which column name is "other_config" |
| 112 | */ |
| 113 | public Column getOtherConfigColumn() { |
| 114 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.OTHERCONFIG.columnName(), |
| 115 | "getOtherConfigColumn", VersionNum.VERSION680); |
| 116 | return (Column) super.getColumnHandler(columndesc); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Add a Column entity which column name is "other_config" to the Row entity |
| 121 | * of attributes. |
| 122 | * @param otherConfig the column data which column name is "other_config" |
| 123 | */ |
| 124 | public void setOtherConfig(Map<String, String> otherConfig) { |
| 125 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.OTHERCONFIG.columnName(), |
| 126 | "setOtherConfig", VersionNum.VERSION680); |
| 127 | super.setDataHandler(columndesc, otherConfig); |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Get the Column entity which column name is "external_ids" from the Row |
| 132 | * entity of attributes. |
| 133 | * @return the Column entity which column name is "external_ids" |
| 134 | */ |
| 135 | public Column getExternalIdsColumn() { |
| 136 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.EXTERNALIDS.columnName(), |
| 137 | "getExternalIdsColumn", VersionNum.VERSION100); |
| 138 | return (Column) super.getColumnHandler(columndesc); |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Add a Column entity which column name is "external_ids" to the Row entity |
| 143 | * of attributes. |
| 144 | * @param externalIds the column data which column name is "external_ids" |
| 145 | */ |
| 146 | public void setExternalIds(Map<String, String> externalIds) { |
| 147 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.EXTERNALIDS.columnName(), |
| 148 | "setExternalIds", VersionNum.VERSION100); |
| 149 | super.setDataHandler(columndesc, externalIds); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Get the Column entity which column name is "max_backoff" from the Row |
| 154 | * entity of attributes. |
| 155 | * @return the Column entity which column name is "max_backoff" |
| 156 | */ |
| 157 | public Column getMaxBackoffColumn() { |
| 158 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.MAXBACKOFF.columnName(), |
| 159 | "getMaxBackoffColumn", VersionNum.VERSION100); |
| 160 | return (Column) super.getColumnHandler(columndesc); |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Add a Column entity which column name is "max_backoff" to the Row entity |
| 165 | * of attributes. |
| 166 | * @param maxBackoff the column data which column name is "max_backoff" |
| 167 | */ |
| 168 | public void setMaxBackoff(Set<Long> maxBackoff) { |
| 169 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.MAXBACKOFF.columnName(), |
| 170 | "setMaxBackoff", VersionNum.VERSION100); |
| 171 | super.setDataHandler(columndesc, maxBackoff); |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Get the Column entity which column name is "status" from the Row entity |
| 176 | * of attributes. |
| 177 | * @return the Column entity which column name is "status" |
| 178 | */ |
| 179 | public Column getStatusColumn() { |
| 180 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.STATUS.columnName(), |
| 181 | "getStatusColumn", VersionNum.VERSION110); |
| 182 | return (Column) super.getColumnHandler(columndesc); |
| 183 | } |
| 184 | |
| 185 | /** |
| 186 | * Add a Column entity which column name is "status" to the Row entity of |
| 187 | * attributes. |
| 188 | * @param status the column data which column name is "status" |
| 189 | */ |
| 190 | public void setStatus(Map<String, String> status) { |
| 191 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.STATUS.columnName(), |
| 192 | "setStatus", |
| 193 | VersionNum.VERSION110); |
| 194 | super.setDataHandler(columndesc, status); |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Get the Column entity which column name is "inactivity_probe" from the |
| 199 | * Row entity of attributes. |
| 200 | * @return the Column entity which column name is "inactivity_probe" |
| 201 | */ |
| 202 | public Column getInactivityProbeColumn() { |
| 203 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.INACTIVITYPROBE.columnName(), |
| 204 | "getInactivityProbeColumn", |
| 205 | VersionNum.VERSION100); |
| 206 | return (Column) super.getColumnHandler(columndesc); |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * Add a Column entity which column name is "inactivity_probe" to the Row |
| 211 | * entity of attributes. |
| 212 | * @param inactivityProbe the column data which column name is |
| 213 | * "inactivity_probe" |
| 214 | */ |
| 215 | public void setInactivityProbe(Set<Long> inactivityProbe) { |
| 216 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.INACTIVITYPROBE.columnName(), |
| 217 | "setInactivityProbe", VersionNum.VERSION100); |
| 218 | super.setDataHandler(columndesc, inactivityProbe); |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Get the Column entity which column name is "connection_mode" from the Row |
| 223 | * entity of attributes. |
| 224 | * @return the Column entity which column name is "connection_mode" |
| 225 | */ |
| 226 | public Column getConnectionModeColumn() { |
| 227 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.CONNECTIONMODE.columnName(), |
| 228 | "getConnectionModeColumn", VersionNum.VERSION100); |
| 229 | return (Column) super.getColumnHandler(columndesc); |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Add a Column entity which column name is "connection_mode" to the Row |
| 234 | * entity of attributes. |
| 235 | * @param connectionMode the column data which column name is |
| 236 | * "connection_mode" |
| 237 | */ |
| 238 | public void setConnectionMode(Set<String> connectionMode) { |
| 239 | ColumnDescription columndesc = new ColumnDescription(ManagerColumn.CONNECTIONMODE.columnName(), |
| 240 | "setConnectionMode", VersionNum.VERSION100); |
| 241 | super.setDataHandler(columndesc, connectionMode); |
| 242 | } |
| 243 | } |