code: public static String serializeServiceInstanceQuery(ServiceInstanceQuery query){
          List<QueryCriterion> criteria = query.getCriteria();
          StringBuilder sb = new StringBuilder();
          for(QueryCriterion criterion : criteria){
              String statement = serialize(criterion);
              if(statement != null && ! statement.isEmpty()){
                  sb.append(statement).append(";");
              }
          }
          return sb.toString();
      }
docs: Serialze the ServiceInstanceQuery to the command line string expression.
  
  @param query
  the ServiceInstanceQuery.
  @return
  the string expression.