code: public List<ModelServiceInstance> queryModelInstances(ServiceInstanceQuery query){
          List<StringCommand> commands = new ArrayList<StringCommand>(query.getCriteria().size());
          for(QueryCriterion q : query.getCriteria()){
              commands.add((StringCommand) q);
          }
          List<ModelServiceInstance> instances = getDirectoryServiceClient().queryService(commands);
          return instances;
  
      }
docs: Query the ModelServiceInstance.
  
  @param query
  the query criteria.
  @return
  the ModelServiceInstance list.