blob: 05a0354fa34d31550e9953153af3f99b194207fd [file] [log] [blame]
YuanyouZhang362c7ab2015-08-03 17:07:20 +08001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.ovsdb.rfc.table;
17
18import java.util.Map;
19
20import org.onosproject.ovsdb.rfc.notation.Column;
21import org.onosproject.ovsdb.rfc.notation.Row;
22import org.onosproject.ovsdb.rfc.notation.UUID;
23import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
24import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
25import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
26
27/**
28 * This class provides operations of FlowSampleCollectorSet Table.
29 */
30public class FlowSampleCollectorSet extends AbstractOvsdbTableService {
31 /**
32 * FlowSampleCollectorSet table column name.
33 */
34 public enum FlowSampleCollectorSetColumn {
35 ID("id"), BRIDGE("bridge"), IPFIX("ipfix"), EXTERNALIDS("external_ids");
36
37 private final String columnName;
38
39 private FlowSampleCollectorSetColumn(String columnName) {
40 this.columnName = columnName;
41 }
42
43 /**
44 * Returns the table column name for FlowSampleCollectorSetColumn.
45 * @return the table column name
46 */
47 public String columnName() {
48 return columnName;
49 }
50 }
51
52 /**
53 * Constructs a FlowSampleCollectorSet object. Generate
54 * FlowSampleCollectorSet Table Description.
55 * @param dbSchema DatabaseSchema
56 * @param row Row
57 */
58 public FlowSampleCollectorSet(DatabaseSchema dbSchema, Row row) {
59 super(dbSchema, row, OvsdbTable.FLOWSAMPLECOLLECTORSET, VersionNum.VERSION710);
60 }
61
62 /**
63 * Get the Column entity which column name is "id" from the Row entity of
64 * attributes.
65 * @return the Column entity which column name is "id"
66 */
67 public Column getIdColumn() {
68 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.ID.columnName(),
69 "getIdColumn", VersionNum.VERSION710);
70 return (Column) super.getColumnHandler(columndesc);
71 }
72
73 /**
74 * Add a Column entity which column name is "id" to the Row entity of
75 * attributes.
76 * @param id the column data which column name is "id"
77 */
78 public void setId(Long id) {
79 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.ID.columnName(),
80 "setId", VersionNum.VERSION710);
81 super.setDataHandler(columndesc, id);
82 }
83
84 /**
85 * Get the Column entity which column name is "bridge" from the Row entity
86 * of attributes.
87 * @return the Column entity which column name is "bridge"
88 */
89 public Column getBridgeColumn() {
90 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
91 "getBridgeColumn", VersionNum.VERSION710);
92 return (Column) super.getColumnHandler(columndesc);
93 }
94
95 /**
96 * Add a Column entity which column name is "bridge" to the Row entity of
97 * attributes.
98 * @param bridge the column data which column name is "bridge"
99 */
100 public void setBridge(UUID bridge) {
101 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
102 "setBridge", VersionNum.VERSION710);
103 super.setDataHandler(columndesc, bridge);
104 }
105
106 /**
107 * Get the Column entity which column name is "ipfix" from the Row entity of
108 * attributes.
109 * @return the Column entity which column name is "ipfix"
110 */
111 public Column getIpfixColumn() {
112 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
113 "getIpfixColumn", VersionNum.VERSION710);
114 return (Column) super.getColumnHandler(columndesc);
115 }
116
117 /**
118 * Add a Column entity which column name is "ipfix" to the Row entity of
119 * attributes.
120 * @param ipfix the column data which column name is "ipfix"
121 */
122 public void setIpfix(UUID ipfix) {
123 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
124 "setIpfix", VersionNum.VERSION710);
125 super.setDataHandler(columndesc, ipfix);
126 }
127
128 /**
129 * Get the Column entity which column name is "external_ids" from the Row
130 * entity of attributes.
131 * @return the Column entity which column name is "external_ids"
132 */
133 public Column getExternalIdsColumn() {
134 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.EXTERNALIDS
135 .columnName(),
136 "getExternalIdsColumn", VersionNum.VERSION710);
137 return (Column) super.getColumnHandler(columndesc);
138 }
139
140 /**
141 * Add a Column entity which column name is "external_ids" to the Row entity
142 * of attributes.
143 * @param externalIds the column data which column name is "external_ids"
144 */
145 public void setExternalIds(Map<String, String> externalIds) {
146 ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.EXTERNALIDS
147 .columnName(),
148 "setExternalIds", VersionNum.VERSION710);
149 super.setDataHandler(columndesc, externalIds);
150 }
151}