blob: 3e2dff1fc77ced62ecbfe9693b5423ac631e91d6 [file] [log] [blame]
lishuai91d986c2015-07-28 09:45: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.operations;
17
18import org.onosproject.ovsdb.rfc.schema.TableSchema;
19
20/**
21 * Operation interface.
22 */
23public interface Operation {
24
25 /**
26 * Returns the op member of update operation.
27 * @return the op member of update operation
28 */
29 String getOp();
30
31 /**
32 * Returns TableSchema entity.
33 * @return TableSchema entity
34 */
35 TableSchema getTableSchema();
36
37 /**
38 * Operations must be "insert", "select", "update", "mutate", "delete",
39 * "commit", "abort", "comment", "assert". Refer to RFC 7047 Section 5.2.
40 */
41 public enum Operations {
42 INSERT("insert"), SELECT("select"), UPDATE("update"), MUTATE("mutate"),
43 DELETE("delete"), COMMIT("commit"), ABORT("abort"), COMMENT("comment"),
44 ASSERT("assert");
45
46 private String op;
47
48 private Operations(String op) {
49 this.op = op;
50 }
51
52 /**
53 * Returns the op for Operations.
54 * @return the op
55 */
56 public String op() {
57 return op;
58 }
59 }
60}