/**
   * Gets the names of the contexts that use this data element. The names of the contexts are are
   * comma separated.
   */
  public String getUsingContexts() throws Exception {
    NCIBC4JUtil bc4jUtil = new NCIBC4JUtil();
    String usingContext = "";
    StringBuffer sbuf = new StringBuffer("");

    try {
      oracle.jbo.ViewObject desView =
          getViewObject().getApplicationModule().findViewObject("DesignationsView");

      /*ViewObjectImpl desView1 = (DesignationsViewImpl)
      bc4jUtil.cloneViewObject(desView);*/
      desView.setWhereClause("AC_IDSEQ='" + getDeIdseq() + "' and DETL_NAME = 'USED_BY'");
      desView.executeQuery();

      DesignationsViewRowImpl desRow;
      String desContext;
      boolean multipleUsedBys = false;

      while (desView.hasNext()) {
        desRow = (DesignationsViewRowImpl) desView.next();
        desContext = (String) desRow.getContextsRow().getAttribute("Name");

        if (!multipleUsedBys) {
          sbuf.append(desContext);
          multipleUsedBys = true;
        } else {
          sbuf.append(" , " + desContext);
        }
      }
    } catch (Exception e) {
      throw e;
    }

    return sbuf.toString();
  }
  public List getDesignations() {
    List designations = new ArrayList(9);
    NCIBC4JUtil bc4jUtil = new NCIBC4JUtil();

    try {
      oracle.jbo.ViewObject desView =
          getViewObject().getApplicationModule().findViewObject("DesignationsView");

      /*ViewObjectImpl desView1 = (DesignationsViewImpl)
      bc4jUtil.cloneViewObject(desView);*/
      desView.setWhereClause("AC_IDSEQ='" + getDeIdseq() + "'");
      desView.executeQuery();

      while (desView.hasNext()) {
        designations.add(
            new BC4JDesignationTransferObject((DesignationsViewRowImpl) desView.next()));
      }
    } catch (Exception e) {
      log.error("Error in getDesignations(): ", e);
    }

    return designations;
  }