/**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetOrganizationTreeService#getSelectedOrgs(java.lang.String)
   */
  public List<BudgetConstructionPullup> getSelectedOrgs(String principalId) {

    if (StringUtils.isBlank(principalId)) {
      throw new IllegalArgumentException("String parameter principalId was null or blank.");
    }
    return (List<BudgetConstructionPullup>)
        budgetConstructionDao.getBudgetConstructionPullupFlagSetByUserId(principalId);
  }
  /**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetOrganizationTreeService#resetPullFlag(java.lang.String)
   */
  public void resetPullFlag(String principalId) {

    if (StringUtils.isBlank(principalId)) {
      throw new IllegalArgumentException("String parameter principalId was null or blank.");
    }
    List<BudgetConstructionPullup> results =
        budgetConstructionDao.getBudgetConstructionPullupFlagSetByUserId(principalId);
    if (!results.isEmpty()) {
      for (BudgetConstructionPullup selOrg : results) {
        selOrg.setPullFlag(OrgSelControlOption.NO.getKey());
      }
      businessObjectService.save(results);
    }
  }
  /**
   * @see
   *     org.kuali.kfs.module.bc.document.service.BudgetOrganizationTreeService#getPullupChildOrgs(java.lang.String,
   *     java.lang.String, java.lang.String)
   */
  public List<BudgetConstructionPullup> getPullupChildOrgs(
      String principalId, String chartOfAccountsCode, String organizationCode) {

    if (StringUtils.isBlank(principalId)) {
      throw new IllegalArgumentException("String parameter principalId was null or blank.");
    }
    if (StringUtils.isBlank(chartOfAccountsCode)) {
      throw new IllegalArgumentException("String parameter chartOfAccountsCode was null or blank.");
    }
    if (StringUtils.isBlank(organizationCode)) {
      throw new IllegalArgumentException("String parameter organizationCode was null or blank.");
    }

    return (List<BudgetConstructionPullup>)
        budgetConstructionDao.getBudgetConstructionPullupChildOrgs(
            principalId, chartOfAccountsCode, organizationCode);
  }