blob: a22464ad4ff2273a9e3c694b66738b31395792a0 [file] [log] [blame]
Madan Jampani08822c42014-11-04 17:17:46 -08001package org.onlab.onos.store.service;
2
Yuta HIGUCHI5e1cfe02014-11-04 21:22:45 -08003import com.google.common.base.MoreObjects;
4
Madan Jampani08822c42014-11-04 17:17:46 -08005/**
6 * Database read request.
7 */
8public class ReadRequest {
9
10 private final String tableName;
11 private final String key;
12
13 public ReadRequest(String tableName, String key) {
14 this.tableName = tableName;
15 this.key = key;
16 }
17
18 /**
19 * Return the name of the table.
20 * @return table name.
21 */
22 public String tableName() {
23 return tableName;
24 }
25
26 /**
27 * Returns the key.
28 * @return key.
29 */
30 public String key() {
31 return key;
32 }
33
34 @Override
35 public String toString() {
Yuta HIGUCHI5e1cfe02014-11-04 21:22:45 -080036 return MoreObjects.toStringHelper(getClass())
37 .add("tableName", tableName)
38 .add("key", key)
39 .toString();
Madan Jampani08822c42014-11-04 17:17:46 -080040 }
41}