示例#1
0
  /**
   * @param dataSetHandle
   * @return
   */
  public OdaDesignSession createOdaDesignSession(OdaDataSetHandle dataSetHandle) {
    OdaDesignSession session = designFactory.createOdaDesignSession();
    DataSetDesign setDesign = createDataSetDesign(dataSetHandle);
    DesignSessionRequest request = designFactory.createDesignSessionRequest();
    request.setNewDataAccessDesign(setDesign);
    request.setDesignerState(
        DesignerStateAdapter.createOdaDesignState(dataSetHandle.getDesignerState()));

    session.setRequest(request);
    return session;
  }
示例#2
0
  /**
   * @param dataSetHandle
   * @param completedSession
   * @throws SemanticException
   */
  public void updateDataSetHandle(OdaDataSetHandle dataSetHandle, OdaDesignSession completedSession)
      throws SemanticException {
    if (completedSession == null || dataSetHandle == null) return;

    DataSetDesign responseDesign = completedSession.getResponseDataSetDesign();
    DataSetDesign requestDesign = completedSession.getRequestDataSetDesign();

    updateDataSetHandle(
        responseDesign,
        dataSetHandle,
        false,
        SchemaConversionUtil.convertToAdapterParameters(requestDesign.getParameters()),
        requestDesign.getResultSets());

    DesignerStateAdapter.updateROMDesignerState(
        completedSession.getResponse().getDesignerState(), dataSetHandle);
    ;
  }