[ONOS-5916] Implement DefaultMapping and DefaultMappingEntry

Change-Id: Icc4b8021e49e5cdfdcf7a0868df4dc5d041d5127
diff --git a/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/Mapping.java b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/Mapping.java
index 1233020..8688894 100644
--- a/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/Mapping.java
+++ b/apps/mappingmanagement/api/src/main/java/org/onosproject/mapping/Mapping.java
@@ -45,14 +45,28 @@
     DeviceId deviceId();
 
     /**
-     * {@inheritDoc}
+     * Obtains the mapping key that is used for query the mapping entry.
      *
+     * @return mapping key
+     */
+    MappingKey key();
+
+    /**
+     * Obtains the mapping value that is queried using the mapping key.
+     *
+     * @return mapping value
+     */
+    MappingValue value();
+
+    /**
+     * {@inheritDoc}
+     * <p>
      * Equality for mappings only considers 'match equality'. This means that
      * two mappings with the same match conditions will be equal.
      *
-     * @param   obj   the reference object with which to compare.
-     * @return  {@code true} if this object is the same as the obj
-     *          argument; {@code false} otherwise.
+     * @param obj the reference object with which to compare.
+     * @return {@code true} if this object is the same as the obj
+     * argument; {@code false} otherwise.
      */
     boolean equals(Object obj);
 
@@ -62,6 +76,14 @@
     interface Builder {
 
         /**
+         * Assigns an id value to this mapping.
+         *
+         * @param id a long value
+         * @return this builder object
+         */
+        Builder withId(long id);
+
+        /**
          * Assigns the application that built this mapping to this object.
          * The short value of the appId will be used as a basis for the
          * cookie value computation. It is expected that application use this
@@ -81,6 +103,22 @@
         Builder forDevice(DeviceId deviceId);
 
         /**
+         * Sets the mapping key for this mapping.
+         *
+         * @param key mapping key
+         * @return this builder object
+         */
+        Builder withKey(MappingKey key);
+
+        /**
+         * Sets the mapping value for this mapping.
+         *
+         * @param value mapping value
+         * @return this builder object
+         */
+        Builder withValue(MappingValue value);
+
+        /**
          * Builds a mapping object.
          *
          * @return a mapping object