void processMongoDBComand(Command cmd) {
        
        String sqlQuery = "";
        
        /**
         * Insert type of query.
         */
        if(cmd.getType().equals(SELECT))
        {
            sqlQuery += (SELECT + EMPTY_SPACE);
        }
        
        /**
         * Insert columns to filter.
         */
        ArrayList<String> columns = cmd.getColumns();
        if(columns.isEmpty() == false) {
            
            int i = 1;
            for (String value : columns) {
                sqlQuery += value;
                if(i < columns.size()) {
                    sqlQuery += COMMA;
                } else {
                    sqlQuery += EMPTY_SPACE;
                }
                i++;
            }
        } else {
            /**
             * No columns to filter, so selects all columns.
             */
            sqlQuery += (ALL + EMPTY_SPACE);
        }
        
        /**
         * From which table and with Where clause.
         */
        sqlQuery += (FROM + EMPTY_SPACE + cmd.getTableName() + EMPTY_SPACE + WHERE + EMPTY_SPACE);
        
        /**
         * Parses type of operator.
         */
        HashMap<String, Condition> columnsConditions = cmd.getColumnsConditions();
        Iterator it = columnsConditions.entrySet().iterator(); 
        int i = 1;
        while (it.hasNext()) {
            Map.Entry pairs = (Map.Entry) it.next();
            Condition cond = (Condition) pairs.getValue();
            
            /**
             * Reads command value fmor Hash.
             */
            String commandValue = cond.getValue();
            
            /**
             * Converts IN braces to curved parentheses.
             */
            if(cond.getRestriction().contains(IN.toLowerCase())) {
                commandValue = commandValue.replaceAll("\\[", "\\(").replaceAll("\\]", "\\)");
            }
            sqlQuery += pairs.getKey() + EMPTY_SPACE + getQualifier(cond.getRestriction()) + EMPTY_SPACE + commandValue + EMPTY_SPACE;
            
            /**
             * Assesses AND and OR clause for aggregation.
             */
            if(i < columnsConditions.size()) {
                if(cmd.isAndClause()){
                    sqlQuery += AND+EMPTY_SPACE;
                }
                if(cmd.isOrClause()){
                    sqlQuery += OR+EMPTY_SPACE;
                }
            } // No need for else
                    
            i++;
            it.remove(); // avoids a ConcurrentModificationException
        }
        
        /**
         * Write SQL query to file.
         */
        writeSQLQuery(sqlQuery);
    }