Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame] | 1 | package org.onlab.onos.store.service; |
| 2 | |
Yuta HIGUCHI | 5e1cfe0 | 2014-11-04 21:22:45 -0800 | [diff] [blame^] | 3 | import com.google.common.base.MoreObjects; |
| 4 | |
Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame] | 5 | /** |
| 6 | * Database read request. |
| 7 | */ |
| 8 | public 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 HIGUCHI | 5e1cfe0 | 2014-11-04 21:22:45 -0800 | [diff] [blame^] | 36 | return MoreObjects.toStringHelper(getClass()) |
| 37 | .add("tableName", tableName) |
| 38 | .add("key", key) |
| 39 | .toString(); |
Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame] | 40 | } |
| 41 | } |