Madan Jampani | 08822c4 | 2014-11-04 17:17:46 -0800 | [diff] [blame^] | 1 | package org.onlab.onos.store.service; |
| 2 | |
| 3 | /** |
| 4 | * Database read request. |
| 5 | */ |
| 6 | public class ReadRequest { |
| 7 | |
| 8 | private final String tableName; |
| 9 | private final String key; |
| 10 | |
| 11 | public ReadRequest(String tableName, String key) { |
| 12 | this.tableName = tableName; |
| 13 | this.key = key; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Return the name of the table. |
| 18 | * @return table name. |
| 19 | */ |
| 20 | public String tableName() { |
| 21 | return tableName; |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Returns the key. |
| 26 | * @return key. |
| 27 | */ |
| 28 | public String key() { |
| 29 | return key; |
| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public String toString() { |
| 34 | return "ReadRequest [tableName=" + tableName + ", key=" + key + "]"; |
| 35 | } |
| 36 | } |