Support for generic table IDs in flow rules

This change is needed to let appications specify tables in flow rules
using indentifiers that are not numeric, e.g. using table names as in a
P4 program.

This change deprecates the FlowRule.tableId() method, in favor of
FlowRule.table(), which returns an object of type TableId. However, it
does not deprecate the .forTable(int tableId) builder method, since it
is used extensivelly in the ONOS code base and from external
applications.

Deprecating FlowRule.tableId() does not seem to be such a painful move
since it is used less frequently, e.g. only 22 usages in the ONOS tree.

Change-Id: Idaaaab53d0c1e20a1f9c7de84de09ec3a42648b5
diff --git a/core/api/src/main/java/org/onosproject/net/flow/TableId.java b/core/api/src/main/java/org/onosproject/net/flow/TableId.java
new file mode 100644
index 0000000..0207f84
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/flow/TableId.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.net.flow;
+
+/**
+ * Match+action table identifier.
+ */
+public interface TableId {
+
+    /**
+     * Types of table identifier.
+     */
+    enum Type {
+        /**
+         * Signifies that the table identifier corresponds to the position of the table in the pipeline.
+         */
+        INDEX,
+
+        /**
+         * Signifies that the table identifier is pipeline-independent.
+         */
+        PIPELINE_INDEPENDENT
+    }
+
+    Type type();
+}