public SavedQueryResults queryItems(String[] keys, String[] values, String searchName) { ImanQuery query = null; SavedQueryService queryService = SavedQueryService .getService(AppXSession.getConnection()); try { GetSavedQueriesResponse savedQueries = queryService .getSavedQueries(); if (savedQueries.queries.length == 0) { } for (int i = 0; i < savedQueries.queries.length; i++) { if (savedQueries.queries[i].name.equals(searchName)) { query = savedQueries.queries[i].query; break; } } } catch (ServiceException e) { e.printStackTrace(); return null; } if (query == null) { } else { } try { SavedQueryInput[] savedQueryInput = new SavedQueryInput[1]; savedQueryInput[0] = new SavedQueryInput(); savedQueryInput[0].query = query; savedQueryInput[0].entries = keys; savedQueryInput[0].values = new String[values.length]; for (int i = 0; i < values.length; i++) { savedQueryInput[0].values[i] = values[i]; } ExecuteSavedQueriesResponse savedQueryResult = queryService .executeSavedQueries(savedQueryInput); SavedQueryResults found = savedQueryResult.arrayOfResults[0]; return found; } catch (Exception e) { e.printStackTrace(); return null; } } ———————————————— 版权声明:本文为CSDN博主「叮当LIU」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_36880602/article/details/100741042