ADF ViewObjectImpl 的 findByAltKey 方法使用例子

JAVA代碼如下:

    //定義VoImpl
    ViewObjectImpl vo = this.getExamSingleView();

    //將參數裝入Key中, 參數 userId,projectId 是定義在 Entity 中的兩個參數
    Key key =  new Key(new Object[] { userId,projectId });

    //AltKey 是定義在 Entity 中的 Alternate Key Name
    RowIterator rowIts = vo.findByAltKey("AltKey", key, -1, true);
    Row[] rows = rowIts.getAllRowsInRange();

Entity的 Alternate Key 及參數 如下圖:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章