Archive for June, 2013

ADF Criteria

private Number findBsnInterSpecId(Number bsnInterSpecExtRsnId) {
Number bsnInterSpecId;
bsnInterSpecId = null;
BsnInterSpecExtRsnWithSpecVOImpl bsnInterSpecExtRsnWithSpecVO = (BsnInterSpecExtRsnWithSpecVOImpl)CommonOperations.getView(“BsnInterSpecExtRsnWithSpecVOIterator”);
ViewCriteria bsnInterSpecExtRsnWithSpecViewCriteria = bsnInterSpecExtRsnWithSpecVO.createViewCriteria();

ViewCriteriaRow bsnInterSpecExtRsnWithSpecViewCriteriaRow = bsnInterSpecExtRsnWithSpecViewCriteria.createViewCriteriaRow();

bsnInterSpecExtRsnWithSpecViewCriteriaRow.setAttribute(“BsnInterSpecExtRsnId”, bsnInterSpecExtRsnId);
bsnInterSpecExtRsnWithSpecViewCriteria.add(bsnInterSpecExtRsnWithSpecViewCriteriaRow);
bsnInterSpecExtRsnWithSpecVO.applyViewCriteria(bsnInterSpecExtRsnWithSpecViewCriteria);
bsnInterSpecExtRsnWithSpecVO.getQuery();
bsnInterSpecExtRsnWithSpecVO.executeQuery();

RowSetIterator interSpecExtRsnIterator = bsnInterSpecExtRsnWithSpecVO.createRowSetIterator(null);
while (interSpecExtRsnIterator.hasNext()) {
BsnInterSpecExtRsnWithSpecVORowImpl prodSpecCharRow = (BsnInterSpecExtRsnWithSpecVORowImpl)interSpecExtRsnIterator.next();
bsnInterSpecId =prodSpecCharRow.getBsnInterSpecId();

}
bsnInterSpecExtRsnWithSpecVO.clearViewCriterias();
bsnInterSpecExtRsnWithSpecVO.executeQuery();

return bsnInterSpecId;
}

Leave a comment