Cleaning up code for runtime, installer, RMI, compiler for the Java side
[iot2.git] / iotjava / iotinstaller / TableRelation.java
index 3b8f9accfa77b5448f7f0d5d7c622218ea060a65..57d0d91d3bafff51bc6cd2c4022ca937c6532fc8 100644 (file)
@@ -16,7 +16,7 @@ import iotruntime.master.RuntimeOutput;
  * @version     1.0
  * @since       2016-02-29
  */
-public class TableRelation extends TableSet {
+public final class TableRelation extends TableSet {
 
        /**
         * TableRelation class properties
@@ -97,8 +97,6 @@ public class TableRelation extends TableSet {
 
                        try {
                                String strCommand = "SELECT " + strTableName + ".* "
-                                                                                                               /*+ strOtherTableName + ".*, "
-                                                                                                                + STR_COMM_TABLE_NAME + ".ACCESS "*/
                                                                                                                + "FROM "
                                                                                                                + strTableName + ", "
                                                                                                                + strOtherTableName + ", "
@@ -143,7 +141,6 @@ public class TableRelation extends TableSet {
                        try {
                                String strCommand = "SELECT "/*+ strTableName + ".*, "*/
                                                                                                                + strOtherTableName + ".* "
-                                                                                                               /*+ STR_COMM_TABLE_NAME + ".ACCESS "*/
                                                                                                                + "FROM "
                                                                                                                + strTableName + ", "
                                                                                                                + strOtherTableName + ", "
@@ -207,7 +204,12 @@ public class TableRelation extends TableSet {
                                // Scan WHERE for either IoTSet or IoTRelation
                                if (strScan.equals("WHERE")) {
                                        // The next token is definitely the WHERE statement
-                                       strScan = scanFile.next();
+                                       strScan = "";
+                                       String strWhere = scanFile.next();
+                                       while (!strWhere.equals(";")) {
+                                               strScan = strScan + " " + strWhere;
+                                               strWhere = scanFile.next();
+                                       }
                                        this.setWhereCondition(strScan);
                                }
                        }