当前位置: 首页>>代码示例>>Java>>正文


Java PersistenceBroker.getReportQueryIteratorByQuery方法代码示例

本文整理汇总了Java中org.apache.ojb.broker.PersistenceBroker.getReportQueryIteratorByQuery方法的典型用法代码示例。如果您正苦于以下问题:Java PersistenceBroker.getReportQueryIteratorByQuery方法的具体用法?Java PersistenceBroker.getReportQueryIteratorByQuery怎么用?Java PersistenceBroker.getReportQueryIteratorByQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ojb.broker.PersistenceBroker的用法示例。


在下文中一共展示了PersistenceBroker.getReportQueryIteratorByQuery方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPositionAssociatedWithFundingLock

import org.apache.ojb.broker.PersistenceBroker; //导入方法依赖的package包/类
/**
 * @see org.kuali.kfs.module.bc.document.dataaccess.BudgetConstructionDao#getPositionAssociatedWithFundingLock(org.kuali.kfs.module.bc.businessobject.BudgetConstructionFundingLock)
 */
public String getPositionAssociatedWithFundingLock(BudgetConstructionFundingLock budgetConstructionFundingLock) {

    String positionNumber = BCConstants.POSITION_NUMBER_NOT_FOUND; // default if there is no associated position that is locked
    // (orphaned)

    Criteria criteria = new Criteria();
    criteria.addEqualTo("pendingBudgetConstructionAppointmentFunding.chartOfAccountsCode", budgetConstructionFundingLock.getChartOfAccountsCode());
    criteria.addEqualTo("pendingBudgetConstructionAppointmentFunding.accountNumber", budgetConstructionFundingLock.getAccountNumber());
    criteria.addEqualTo("pendingBudgetConstructionAppointmentFunding.subAccountNumber", budgetConstructionFundingLock.getSubAccountNumber());
    criteria.addEqualTo("pendingBudgetConstructionAppointmentFunding.universityFiscalYear", budgetConstructionFundingLock.getUniversityFiscalYear());
    criteria.addEqualTo("positionLockUserIdentifier", budgetConstructionFundingLock.getAppointmentFundingLockUserId());
    String[] columns = new String[] { "positionNumber" };
    ReportQueryByCriteria q = QueryFactory.newReportQuery(BudgetConstructionPosition.class, columns, criteria, true);
    PersistenceBroker pb = getPersistenceBroker(true);

    Iterator<Object[]> iter = pb.getReportQueryIteratorByQuery(q);

    if (iter.hasNext()) {
        Object[] objs = TransactionalServiceUtils.retrieveFirstAndExhaustIterator(iter);
        if (objs[0] != null) {
            positionNumber = (String) objs[0];
        }
    }
    return positionNumber;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:29,代码来源:BudgetConstructionDaoOjb.java


注:本文中的org.apache.ojb.broker.PersistenceBroker.getReportQueryIteratorByQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。