package org.onlab.onos.store.service;

import com.google.common.base.MoreObjects;

/**
 * Database read request.
 */
public class ReadRequest {

    private final String tableName;
    private final String key;

    public ReadRequest(String tableName, String key) {
        this.tableName = tableName;
        this.key = key;
    }

    /**
     * Return the name of the table.
     * @return table name.
     */
    public String tableName() {
        return tableName;
    }

    /**
     * Returns the key.
     * @return key.
     */
    public String key() {
        return key;
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(getClass())
                .add("tableName", tableName)
                .add("key", key)
                .toString();
    }
}
@@ -32,16 +32,82 @@
 rvice;%0A%0A
+import static com.google.common.base.Preconditions.checkNotNull;%0A%0A
 import c
@@ -271,16 +271,363 @@
 g key;%0A%0A
+%0A    /**%0A     * Creates a read request,%0A     * which will retrieve the specified key from the table.%0A     *%0A     * @param tableName name of the table%0A     * @param key       key in the table%0A     * @return ReadRequest%0A     */%0A    public static ReadRequest get(String tableName, String key) %7B%0A        return new ReadRequest(tableName, key);%0A    %7D%0A%0A
     publ
@@ -698,16 +698,29 @@
 eName = 
+checkNotNull(
 tableNam
@@ -716,24 +716,25 @@
 ll(tableName
+)
 ;%0A        th
@@ -742,19 +742,33 @@
 s.key = 
+checkNotNull(
 key
+)
 ;%0A    %7D%0A

add Factory method to ReadRequest