blob: 0db5dfedf82287a751565c1217e8adb2bfeedd3d [file] [log] [blame]
Madan Jampani08822c42014-11-04 17:17:46 -08001package org.onlab.onos.store.service;
2
Madan Jampani08822c42014-11-04 17:17:46 -08003
4/**
5 * Database read result.
6 */
7public class ReadResult {
8
9 private final String tableName;
10 private final String key;
11 private final VersionedValue value;
12
13 public ReadResult(String tableName, String key, VersionedValue value) {
14 this.tableName = tableName;
15 this.key = key;
16 this.value = value;
17 }
18
19 /**
20 * Database table name.
21 * @return
22 */
23 public String tableName() {
24 return tableName;
25 }
26
27 /**
28 * Database table key.
29 * @return key.
30 */
31 public String key() {
32 return key;
33 }
34
35 /**
36 * value associated with the key.
37 * @return non-null value if the table contains one, null otherwise.
38 */
39 public VersionedValue value() {
40 return value;
41 }
42}