2 * Copyright (C) 2013 Red Hat, Inc.
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
8 * Authors : Madhu Venugopal
10 package org.opendaylight.ovsdb.lib.message.operations;
12 import java.util.ArrayList;
13 import java.util.List;
15 import org.opendaylight.ovsdb.lib.notation.UUID;
17 import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.fasterxml.jackson.annotation.JsonProperty;
20 // Section 5.2 of ovsdb draft covers the various response structures for
21 // each of the Operations covered by Transaction (Insert, Update, Delete, Mutate, etc...)
22 // It is better to have the OperationResult as an abstract parent class with individual
23 // concrete child classes for each of the operation response.
24 // TODO : But this needs proper response handling
25 // https://trello.com/c/mfTTS86k/28-generic-response-error-handling-especially-for-transact
26 // As a temporary measure, adding all the expected responses under the same response.
28 public class OperationResult {
29 //public abstract boolean isSuccess();
33 private ArrayList<Object> rows;
35 private String details;
37 public int getCount() {
40 public void setCount(int count) {
44 public UUID getUuid() {
47 public void setUuid(List<String> uuidList) {
48 this.uuid = new UUID(uuidList.get(1));
50 public ArrayList<Object> getRows() {
53 public void setRows(ArrayList<Object> rows) {
56 public String getError() {
59 public void setError(String error) {
62 public String getDetails() {
65 public void setDetails(String details) {
66 this.details = details;
70 public String toString() {
71 return "OperationResult [count=" + count + ", uuid=" + uuid + ", rows="
72 + rows + ", error=" + error + "]";