Codota Logo
SearchResultCellInfo.getKey
Code IndexAdd Codota to your IDE (free)

How to use
getKey
method
in
org.kuali.student.r2.core.search.dto.SearchResultCellInfo

Best Java code snippets using org.kuali.student.r2.core.search.dto.SearchResultCellInfo.getKey (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: org.kuali.student.core/ks-common-ui

private int getAttrKeyNdx(List<SearchResultRowInfo> results, String keyAttrKey) {
  if (results != null && !results.isEmpty()){
    for (int i=0; i < results.get(0).getCells().size(); i++){
      if (results.get(0).getCells().get(i).getKey().equals(keyAttrKey)) {
        return i;
      }
    }
  }
  
  return 0;
}

origin: org.kuali.student.lum/ks-lum-rice

protected List<Map<String,String>> attributeSetFromSearchResult(List<SearchResultRowInfo> results, String orgIdKey) {
  List<Map<String,String>> returnAttrSetList = new ArrayList<Map<String,String>>();
  if (results != null) {
    for (SearchResultRowInfo result : results) {
      Map<String,String> attributeSet = new LinkedHashMap<String,String>();
      String resolvedOrgId = "";
      String resolvedOrgShortName = "";
      for (SearchResultCellInfo resultCell : result.getCells()) {
        if ("org.resultColumn.orgId".equals(resultCell.getKey())) {
          resolvedOrgId = resultCell.getValue();
        } else if ("org.resultColumn.orgShortName".equals(resultCell.getKey())) {
          resolvedOrgShortName = resultCell.getValue();
        }
      }
      if (orgIdKey != null) {
        attributeSet.put(orgIdKey, resolvedOrgId);
      }
      attributeSet.put(KualiStudentKimAttributes.QUALIFICATION_ORG_ID, resolvedOrgId);
      returnAttrSetList.add(attributeSet);
    }
  }
  return returnAttrSetList;
}
origin: org.kuali.student.lum/ks-lum-impl

@Override
public int compare(SearchResultRowInfo o1, SearchResultRowInfo o2) {
  String o1SortValue = null;
  String o2SortValue = null;
  for (SearchResultCellInfo cell : o1.getCells()) {
    if (sortColumn.equals(cell.getKey())) {
      o1SortValue = cell.getValue();
      break;
    }
  }
  for (SearchResultCellInfo cell : o2.getCells()) {
    if (sortColumn.equals(cell.getKey())) {
      o2SortValue = cell.getValue();
      break;
    }
  }
  if (o1SortValue != null) {
    if (o2SortValue == null) {
      return 1;
    }
    return o1SortValue.compareTo(o2SortValue);
  }
  if (o2SortValue == null) {
    return 0;
  }
  return -1;
}
origin: org.kuali.student.lum/ks-lum-rice

public List<KeyValue> getKeyValues() {
  List<KeyValue> departments = new ArrayList<KeyValue>();
  SearchRequestInfo searchRequest = new SearchRequestInfo();
  searchRequest.setSearchKey("org.search.generic");
  try {
    for (SearchResultRowInfo result : getOrganizationService().search(searchRequest, ContextUtils.getContextInfo()).getRows()) {
      String orgId = "";
      String orgShortName = "";
      String orgOptionalLongName = "";
      String orgType = "";
      for (SearchResultCellInfo resultCell : result.getCells()) {
        if ("org.resultColumn.orgId".equals(resultCell.getKey())) {
          orgId = resultCell.getValue();
        } else if ("org.resultColumn.orgShortName".equals(resultCell.getKey())) {
          orgShortName = resultCell.getValue();
        } else if ("org.resultColumn.orgOptionalLongName".equals(resultCell.getKey())) {
          orgOptionalLongName = resultCell.getValue();
        } else if ("org.resultColumn.orgType".equals(resultCell.getKey())) {
          orgType = resultCell.getValue();
        }
      }
      departments.add(buildKeyLabelPair(orgId, orgShortName, orgOptionalLongName, orgType));
    }
    return departments;
  } catch (Exception e) {
    LOG.error("Error building KeyValues List", e);
    throw new RuntimeException(e);
  }
}
origin: org.kuali.student.core/ks-common-ui

  @Override
  public void onSuccess(SearchResultInfo results) {
    resultRows.clear();
    if(results != null){
      for (SearchResultRowInfo r: results.getRows()){
        ResultRow theRow = new ResultRow();
        for(SearchResultCellInfo c: r.getCells()){
          if(c.getKey().equals(resultIdColumnKey)){
            theRow.setId(c.getValue());
          }
          theRow.setValue(c.getKey(), c.getValue());
        }
        resultRows.add(theRow);
      }
    }
    redraw();
  }
});
origin: org.kuali.student.core/ks-common-ui

  @Override
  public void onSuccess(SearchResultInfo results) {
    IdableSuggestion theSuggestion = null;
    if(results != null && !results.getRows().isEmpty()){
      SearchResultRowInfo r = results.getRows().get(0);
      theSuggestion = new IdableSuggestion();
      for(SearchResultCellInfo c: r.getCells()){
        if(c.getKey().equals(resultDisplayKey)){
          String itemText = c.getValue();
          theSuggestion.addAttr(c.getKey(), c.getValue());
          theSuggestion.setDisplayString(itemText);
          theSuggestion.setReplacementString(itemText);
        } else if(c.getKey().equals(resultIdKey)){
           theSuggestion.setId(c.getValue());
           theSuggestion.addAttr(c.getKey(), c.getValue());
        } else {
          theSuggestion.addAttr(c.getKey(), c.getValue());
        }
      }
    }
    callback.exec(theSuggestion);
  }
});
origin: org.kuali.student.lum/ks-lum-impl

  private List<String> getDepartments(List<String> departmentIds, ContextInfo contextInfo) throws MissingParameterException, PermissionDeniedException, OperationFailedException, InvalidParameterException {
    List<String> departments = new ArrayList<String>();
    SearchRequestInfo searchRequest = new SearchRequestInfo("org.search.generic");

    List<String> orgTypes = new ArrayList<String>();
    orgTypes.add("kuali.org.Department");

    searchRequest.addParam("org.queryParam.orgOptionalType", orgTypes);
    searchRequest.addParam("org.queryParam.orgOptionalIds", departmentIds);

    SearchResultInfo searchResult = getSearchDispatcher().search(searchRequest, contextInfo);

    if (null != searchResult) {
      for (SearchResultRowInfo result : searchResult.getRows()) {
        for (SearchResultCellInfo resultCell : result.getCells()) {
          if ("org.resultColumn.orgOptionalLongName".equals(resultCell.getKey())) {
            departments.add(resultCell.getValue());
          }
        }
      }
    }

    return departments;
  }
}
origin: org.kuali.student.lum/ks-lum-impl

private List<String> getDepartmentRelatedColleges(List<String> departmentIds, ContextInfo contextInfo) throws MissingParameterException, PermissionDeniedException, OperationFailedException, InvalidParameterException {
  List<String> departmentRelatedCollegeIds = new ArrayList<String>();
  SearchRequestInfo searchRequest = new SearchRequestInfo("org.search.orgQuickViewByRelationTypeOrgTypeRelatedOrgIds");
  List<String> orgTypes = new ArrayList<String>();
  orgTypes.add("kuali.org.College");
  searchRequest.addParam("org.queryParam.optionalOrgTypeList", orgTypes);
  searchRequest.addParam("org.queryParam.optionalRelationType", "kuali.org.Contain");
  searchRequest.addParam("org.queryParam.relatedOrgIds", departmentIds);
  SearchResultInfo searchResult = getSearchDispatcher().search(searchRequest, contextInfo);
  if (null != searchResult) {
    for (SearchResultRowInfo row : searchResult.getRows()) {
      for (SearchResultCellInfo cell : row.getCells()) {
        if ("org.resultColumn.orgId".equals(cell.getKey())) {
          departmentRelatedCollegeIds.add(cell.getValue());
        }
      }
    }
  }
  return departmentRelatedCollegeIds;
}
origin: org.kuali.student.lum/ks-lum-impl

private String getCollegeName(String collegeId, ContextInfo contextInfo) throws MissingParameterException, PermissionDeniedException, OperationFailedException, InvalidParameterException {
  String collegeName = "";
  SearchRequestInfo searchRequest = new SearchRequestInfo("org.search.generic");
  List<String> orgTypes = new ArrayList<String>();
  orgTypes.add("kuali.org.College");
  searchRequest.addParam("org.queryParam.orgOptionalType", orgTypes);
  searchRequest.addParam("org.queryParam.orgOptionalId", collegeId);
  SearchResultInfo searchResult = getSearchDispatcher().search(searchRequest, contextInfo);
  if (null != searchResult) {
    for (SearchResultRowInfo result : searchResult.getRows()) {
      for (SearchResultCellInfo resultCell : result.getCells()) {
        if ("org.resultColumn.orgOptionalLongName".equals(resultCell.getKey())) {
          collegeName = resultCell.getValue();
        }
      }
    }
  }
  return collegeName;
}
origin: org.kuali.student.core/ks-common-impl

public IdTranslation getTranslation(LookupMetadata lookupMetadata, String id) throws AssemblyException {
  SearchRequestInfo searchRequest = buildSearchRequestById(lookupMetadata, id);
  SearchResultInfo searchResults = null;
  try {
    searchResults = searchDispatcher.search(searchRequest, ContextUtils.getContextInfo());
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
  IdTranslation result = null; 
  if(searchResults != null && searchResults.getRows().size() > 0){
    result = new IdTranslation();
    result.setId(id);
    
    SearchResultRowInfo r = searchResults.getRows().get(0);
    for(SearchResultCellInfo c: r.getCells()){
      if(c.getKey().equals(lookupMetadata.getResultDisplayKey())){
        result.addAttribute(c.getKey(), c.getValue());
        result.setDisplay(c.getValue());
      } else {
        result.addAttribute(c.getKey(), c.getValue());
      }
    }
  }
  return result;
  
}
origin: org.kuali.student.lum/ks-lum-ui-common

curSearchResultCellKEY= curSearchResultCell.getKey();
if(curSearchResultCellKEY.equals("lo.resultColumn.categoryId")){
  curCatID= curSearchResultCell.getValue();
origin: org.kuali.student.core/ks-common-impl

  public String getTranslationForAtp(String value, ContextInfo contextInfo) {
    SearchRequestInfo searchRequest = new SearchRequestInfo();
    searchRequest.setSearchKey("atp.search.advancedAtpSearch");
    ArrayList<SearchParamInfo> searchParams = new ArrayList<SearchParamInfo>();
    SearchParamInfo searchParam = new SearchParamInfo();
    searchParam.setKey("atp.advancedAtpSearchParam.atpId");
    searchParam.getValues().add(value);
    searchParams.add(searchParam);
    searchRequest.setParams(searchParams);
    SearchResultInfo searchResult = null;
    try {
      searchResult = searchDispatcher.search(searchRequest, contextInfo);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    if(searchResult!= null){
      for (SearchResultRowInfo resultRow : searchResult.getRows()) {
        for (SearchResultCellInfo searchResultCell : resultRow.getCells()) {
          if(searchResultCell.getKey().equals("atp.resultColumn.atpDescrPlain")){
            return searchResultCell.getValue();
          }
        }
      }
    }
    return null;
  }
}
origin: org.kuali.student.lum/ks-lum-impl

private List<String> getMembershipQuerySearchResult(MembershipQueryInfo query, ContextInfo contextInfo) throws MissingParameterException, OperationFailedException, PermissionDeniedException, InvalidParameterException {
  if (query == null) {
    return null;
  }
  SearchRequestInfo request = new SearchRequestInfo();
  request.setSearchKey(query.getSearchTypeKey());
  request.setParams(query.getQueryParamValues());
  SearchResultInfo result = search(request, contextInfo);
  Set<String> cluIds = new HashSet<String>();
  List<SearchResultRowInfo> rows = result.getRows();
  for (SearchResultRowInfo row : rows) {
    List<SearchResultCellInfo> cells = row.getCells();
    for (SearchResultCellInfo cell : cells) {
      if (cell.getKey().equals("lu.resultColumn.luOptionalVersionIndId") && cell.getValue() != null) {
        cluIds.add(cell.getValue());
      }
    }
  }
  return new ArrayList<String>(cluIds);
}
origin: org.kuali.student.lum/ks-lum-rice

String orgLongName = "";
for (SearchResultCellInfo resultCell : result.getCells()) {
  if ("org.resultColumn.orgId".equals(resultCell.getKey())) {
    orgId = resultCell.getValue();
  } else if("org.resultColumn.orgOptionalLongName".equals(resultCell.getKey())){
    orgLongName = resultCell.getValue();
origin: org.kuali.student.lum/ks-lum-program

if (srCells != null && srCells.size() > 0) {
  for (SearchResultCellInfo srcell : srCells) {
    if (srcell.getKey().equals("lu.resultColumn.luOptionalLongName")) {
      result.add(srcell.getValue());
origin: org.kuali.student.core/ks-common-impl

private SearchResultRowInfo mapResultRow(
    String subSearchKey, SearchResultRowInfo row,
    CrossSearchTypeInfo crossSearchType) {
  SearchResultRowInfo resultRow = new SearchResultRowInfo();
  
  for(JoinResultMappingInfo resultMapping: crossSearchType.getJoinResultMappings()){
    if(subSearchKey.equals(resultMapping.getSubSearchKey())){
      for(SearchResultCellInfo cell: row.getCells()){
        if(resultMapping.getSubSearchResultParam().equals(cell.getKey())){
          SearchResultCellInfo mappedCell = new SearchResultCellInfo();
          mappedCell.setKey(resultMapping.getResultParam());
          mappedCell.setValue(cell.getValue());
          resultRow.getCells().add(mappedCell);
          break;//FIXME breaks are bad... but there is no map in the cells
        }
      }
    }
  }
  return resultRow;
}
/**
origin: org.kuali.student.core/ks-common-impl

/**
 * Maps results from multiple searches into a single result row
 *
 * @param permutation
 * @param crossSearchType
 * @return a mapped SearchResultRowInfo
 */
private SearchResultRowInfo mapResultRow(
    Map<String, SearchResultRowInfo> permutation,
    CrossSearchTypeInfo crossSearchType) {
  //FIXME this is pretty inefficient to loop through everything... a map structure for the cells might be better
  SearchResultRowInfo resultRow = new SearchResultRowInfo();
  for(JoinResultMappingInfo resultMapping: crossSearchType.getJoinResultMappings()){
    for(SearchResultCellInfo cell: permutation.get(resultMapping.getSubSearchKey()).getCells()){
      if(resultMapping.getSubSearchResultParam().equals(cell.getKey())){
        SearchResultCellInfo mappedCell = new SearchResultCellInfo();
        mappedCell.setKey(resultMapping.getResultParam());
        mappedCell.setValue(cell.getValue());
        resultRow.getCells().add(mappedCell);
        break;//FIXME breaks are bad... but there is no map in the cells
      }
    }
  }
  return resultRow;
  
}
origin: org.kuali.student.lum/ks-lum-ui-common

if(cell.getKey().equals(GRADE_TYPE_ID_CELL_KEY)) {
  selectedGradeTypeId = cell.getValue();
origin: org.kuali.student.lum/ks-lum-program

if(srCells != null && srCells.size() > 0){
  for(SearchResultCellInfo srcell : srCells){
    if (srcell.getKey().equals("lu.resultColumn.cluId")) {
      coreProgramId = srcell.getValue();
      break;
origin: org.kuali.student.core/ks-common-ui

ResultRow theRow = new ResultRow();
for(SearchResultCellInfo c: r.getCells()){
  if(c.getKey().equals(resultIdColumnKey)){
    theRow.setId(c.getValue());
  theRow.setValue(c.getKey(), c.getValue());
org.kuali.student.r2.core.search.dtoSearchResultCellInfogetKey

Popular methods of SearchResultCellInfo

  • getValue
  • setValue
  • <init>
  • setKey

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Reference (javax.naming)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now