2 * Copyright (c) 2014, 2015 EBay Software Foundation and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.ovsdb.lib.operations;
11 import org.opendaylight.ovsdb.lib.notation.Row;
12 import org.opendaylight.ovsdb.lib.schema.TableSchema;
13 import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
15 public class Operations {
16 public static Operations op = new Operations();
18 public <E extends TableSchema<E>> Insert<E> insert(TableSchema<E> schema) {
19 return new Insert<>(schema);
22 public <E extends TableSchema<E>> Insert<E> insert(TypedBaseTable<E> typedTable) {
23 return new Insert<>(typedTable);
26 public <E extends TableSchema<E>> Insert<E> insert(TableSchema<E> schema, Row<E> row) {
27 return new Insert<>(schema, row);
30 public <E extends TableSchema<E>> Update<E> update(TableSchema<E> schema) {
31 return new Update<>(schema);
34 public <E extends TableSchema<E>> Update<E> update(TypedBaseTable<E> typedTable) {
35 return new Update<>(typedTable);
38 public <E extends TableSchema<E>> Update<E> update(TableSchema<E> schema, Row<E> row) {
39 return new Update<>(schema, row);
42 public <E extends TableSchema<E>> Delete<E> delete(TableSchema<E> schema) {
43 return new Delete<>(schema);
46 public <E extends TableSchema<E>> Mutate<E> mutate(TableSchema<E> schema) {
47 return new Mutate<>(schema);
50 public <E extends TableSchema<E>> Mutate<E> mutate(TypedBaseTable<E> typedTable) {
51 return new Mutate<>(typedTable.getSchema());
54 public Commit commit(Boolean durable) {
55 return new Commit(durable);
58 public Abort abort() {
62 public <E extends TableSchema<E>> Select<E> select(TableSchema<E> schema) {
63 return new Select<>(schema);
66 public Comment comment(String comment) {
67 return new Comment(comment);
71 * Could not use Java keyword "assert" which clashes with the ovsdb json-rpc method.
72 * using assertion instead.
74 public Assert assertion(String lock) {
75 return new Assert(lock);