• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java QueryByCriteria类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



QueryByCriteria类属于org.apache.ojb.broker.query包,在下文中一共展示了QueryByCriteria类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: findByDocumentHeaderIds

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Retrieve a List of Document instances with the given ids
 *
 * @param clazz
 * @param idList
 * @return List
 */
@Override
public <T extends Document> List<T> findByDocumentHeaderIds(Class<T> clazz, List<String> idList) {
    Criteria criteria = new Criteria();
    criteria.addIn(KRADPropertyConstants.DOCUMENT_NUMBER, idList);

    QueryByCriteria query = QueryFactory.newQuery(clazz, criteria);
    
    // this cast is correct because OJB produces a collection which contains elements of the class defined on the query
    @SuppressWarnings("unchecked")
    List<T> tempList = new ArrayList<T>(this.getPersistenceBrokerTemplate().getCollectionByQuery(query));
    
    for (T doc : tempList) {
    	documentAdHocService.addAdHocs(doc);
    }
    return tempList;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:DocumentDaoOjb.java


示例2: testComplexCriteriaWithPathClasses_1

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public void testComplexCriteriaWithPathClasses_1()
{
    Criteria criteria         = new Criteria();
    Criteria categoryCriteria = new Criteria();
    Criteria topicCriteria    = new Criteria();

    topicCriteria.addEqualTo("qualifiers.importance", "important");
    topicCriteria.addPathClass("qualifiers", Topic.class);
    criteria.addOrCriteria(topicCriteria);
    categoryCriteria.addNotNull("qualifiers.description");
    categoryCriteria.addPathClass("qualifiers", Category.class);
    criteria.addOrCriteria(categoryCriteria);

    QueryByCriteria query   = QueryFactory.newQuery(BaseContentImpl.class, criteria, true);
    List            content = (List)broker.getCollectionByQuery(query);

    assertEquals(1, content.size());
    assertEquals(2, ((News)content.get(0)).getId());
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:20,代码来源:ExtentAwarePathExpressionsTest.java


示例3: testAddPathClasses

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * The order of criteria elements influences the use of parenthesis, 
 *  If we add the Like element before the NotNull one we get the wrong query 
 * Right clause : WHERE WHERE (A2.NAME IS NOT NULL  OR A2E1.NAME IS NOT NULL ) AND A0.HEADLINE LIKE  'Bra%
 * Wrong clause : WHERE (A0.HEADLINE LIKE  'Bra%' ) AND A2.NAME IS NOT NULL  OR A2E1.NAME IS NOT NULL 
 */
public void testAddPathClasses()
{
    Criteria criteria = new Criteria();

    criteria.addLike("headline","Bra%");
    criteria.addNotNull("qualifiers.name");
    QueryByCriteria query = new QueryByCriteria(BaseContentImpl.class, criteria, true);
    query.addPathClass("qualifiers",Qualifier.class);
    query.addPathClass("qualifiers",Topic.class);
    query.addPathClass("qualifiers",Category.class);

    List content = (List) broker.getCollectionByQuery(query);
    assertEquals(1,content.size());
    assertEquals(3,((News)content.get(0)).getId());
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:22,代码来源:ExtentAwarePathExpressionsTest.java


示例4: getByTransaction

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Queries the database to find the expenditure transaction in the database that would be affected if the given transaction is
 * posted
 * 
 * @param t a transaction to find a related expenditure transaction for
 * @return the expenditure transaction if found, null otherwise
 * @see org.kuali.ole.gl.dataaccess.ExpenditureTransactionDao#getByTransaction(org.kuali.ole.gl.businessobject.Transaction)
 */
public ExpenditureTransaction getByTransaction(Transaction t) {
    LOG.debug("getByTransaction() started");

    Criteria crit = new Criteria();
    crit.addEqualTo(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, t.getUniversityFiscalYear());
    crit.addEqualTo(OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE, t.getChartOfAccountsCode());
    crit.addEqualTo(OLEPropertyConstants.ACCOUNT_NUMBER, t.getAccountNumber());
    crit.addEqualTo(OLEPropertyConstants.SUB_ACCOUNT_NUMBER, t.getSubAccountNumber());
    crit.addEqualTo(OLEPropertyConstants.OBJECT_CODE, t.getFinancialObjectCode());
    crit.addEqualTo(OLEPropertyConstants.SUB_OBJECT_CODE, t.getFinancialSubObjectCode());
    crit.addEqualTo(OLEPropertyConstants.BALANCE_TYPE_CODE, t.getFinancialBalanceTypeCode());
    crit.addEqualTo(OLEPropertyConstants.OBJECT_TYPE_CODE, t.getFinancialObjectTypeCode());
    crit.addEqualTo(OLEPropertyConstants.UNIVERSITY_FISCAL_ACCOUNTING_PERIOD, t.getUniversityFiscalPeriodCode());
    crit.addEqualTo(OLEPropertyConstants.PROJECT_CODE, t.getProjectCode());

    if (StringUtils.isBlank(t.getOrganizationReferenceId())) {
        crit.addEqualTo(OLEPropertyConstants.ORGANIZATION_REFERENCE_ID, GeneralLedgerConstants.getDashOrganizationReferenceId());
    }
    else {
        crit.addEqualTo(OLEPropertyConstants.ORGANIZATION_REFERENCE_ID, t.getOrganizationReferenceId());
    }

    QueryByCriteria qbc = QueryFactory.newQuery(ExpenditureTransaction.class, crit);
    return (ExpenditureTransaction) getPersistenceBrokerTemplate().getObjectByQuery(qbc);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:34,代码来源:ExpenditureTransactionDaoOjb.java


示例5: getVoteRecordMostCurrentRound

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public EdoVoteRecordBo getVoteRecordMostCurrentRound(String edoDossierID, String edoReviewLayerDefinitionId) {
    EdoVoteRecordBo voteRecord = new EdoVoteRecordBo();

    if (ObjectUtils.isNotNull(edoDossierID) && edoReviewLayerDefinitionId != null) {
        Criteria criteria = new Criteria();
        criteria.addEqualTo("edoDossierId", edoDossierID);
        criteria.addEqualTo("edoReviewLayerDefinitionId", edoReviewLayerDefinitionId);

        QueryByCriteria query = QueryFactory.newQuery(EdoVoteRecordBo.class, criteria);
        query.addOrderByDescending("vote_round");
        query.addOrderByDescending("vote_subround");

        Collection c = this.getPersistenceBrokerTemplate().getCollectionByQuery(query);

        if (CollectionUtils.isNotEmpty(c)) {
            voteRecord = (EdoVoteRecordBo)c.toArray()[0];
        }
    }

    return voteRecord;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:22,代码来源:EdoVoteRecordDaoImpl.java


示例6: getOpenByCustomerType

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
@Override
public Collection getOpenByCustomerType(String customerTypeCode) {
    // select i.*
    // from ar_doc_hdr_t h inner join ar_inv_doc_t i
    //   on h.fdoc_nbr = i.fdoc_nbr
    //   inner join ar_cust_t c
    //   on h.cust_nbr = c.cust_nbr
    // where c.cust_typ_cd = ?

    //  OJB deals with the inner join automatically, because we have it setup with
    // accountsReceivableDocumentHeader as a ReferenceDescriptor to Invoice, and Customer
    // as a referencedescriptor to accountsReceivableDocumentHeader.
    Criteria criteria = new Criteria();
    criteria.addEqualTo("accountsReceivableDocumentHeader.customer.customerTypeCode", customerTypeCode);
    criteria.addEqualTo("openInvoiceIndicator", "true");
    criteria.addEqualTo("documentHeader.financialDocumentStatusCode", KFSConstants.DocumentStatusCodes.APPROVED);


    QueryByCriteria qbc = QueryFactory.newQuery(CustomerInvoiceDocument.class, criteria);

    Collection customerinvoicedocuments = getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
    List invoiceList = new ArrayList(customerinvoicedocuments);
    return invoiceList;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:25,代码来源:CustomerInvoiceDocumentDaoOjb.java


示例7: testQueryCommutative21

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public void testQueryCommutative21()
{
    Collection result;
    Criteria crit1 = new Criteria();
    crit1.addEqualTo("articleName", "Hamlet");
    crit1.addEqualTo("productGroup.description", "Strange Books...");

    Criteria crit2 = new Criteria();
    crit2.addEqualTo("stock", new Integer(32));

    Criteria crit3 = new Criteria();
    crit3.addEqualTo("stock", new Integer(42));

    crit2.addOrCriteria(crit3);
    crit2.addAndCriteria(crit1);
    QueryByCriteria qry21 = QueryFactory.newQuery(Article.class, crit2);
    qry21.setPathOuterJoin("productGroup");

    result = broker.getCollectionByQuery(qry21);
    assertNotNull(result);

    int count = broker.getCount(qry21);
    assertEquals(count, result.size());
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:25,代码来源:QueryTest.java


示例8: getPersons

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * @ejb:interface-method
 */
public Collection getPersons(String firstname, String lastname)
{
    PersistenceBroker broker = getBroker();
    Criteria criteria = new Criteria();
    if (firstname != null) criteria.addEqualTo("firstname", firstname);
    if (lastname != null) criteria.addEqualTo("firstname", lastname);
    Query q = new QueryByCriteria(PersonVO.class);
    Collection result = broker.getCollectionByQuery(q);
    broker.close();
    return result;
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:15,代码来源:PersonManagerPBBean.java


示例9: deleteGroups

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Delete all the groups in the list. This will delete the entries. The OriginEntryGroupDao has a method to delete the groups,
 * and one has to use both to really delete the whole group
 * 
 * @param groups a Collection of Origin Entry Groups to delete entries in
 * @see org.kuali.kfs.gl.dataaccess.OriginEntryDao#deleteGroups(java.util.Collection)
 */
public void deleteGroups(Collection<OriginEntryGroup> groups) {
    LOG.debug("deleteGroups() started");

    if (groups == null || groups.size() <= 0) {
        return;
    }

    List ids = new ArrayList();
    for (Iterator iter = groups.iterator(); iter.hasNext();) {
        OriginEntryGroup element = (OriginEntryGroup) iter.next();
        ids.add(element.getId());
    }

    Criteria criteria = new Criteria();
    criteria.addIn(ENTRY_GROUP_ID, ids);

    QueryByCriteria qbc = QueryFactory.newQuery(entryClass, criteria);
    getPersistenceBrokerTemplate().deleteByQuery(qbc);

    // This is required because deleteByQuery leaves the cache alone so future queries
    // could return origin entries that don't exist. Clearing the cache makes OJB
    // go back to the database for everything to make sure valid data is returned.
    getPersistenceBrokerTemplate().clearCache();
}
 
开发者ID:kuali,项目名称:kfs,代码行数:32,代码来源:OriginEntryDaoOjb.java


示例10: orderClause

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public final void orderClause(
	QueryByCriteria query
) throws RecognitionException, TokenStreamException {
	
	
	try {      // for error handling
		sortCriterion(query);
		{
		_loop83:
		do {
			if ((LA(1)==TOK_COMMA)) {
				match(TOK_COMMA);
				sortCriterion(query);
			}
			else {
				break _loop83;
			}
			
		} while (true);
		}
	}
	catch (RecognitionException ex) {
		reportError(ex);
		recover(ex,_tokenSet_2);
	}
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:27,代码来源:OQLParser.java


示例11: testMultipleClassPath_2a

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public void testMultipleClassPath_2a()
{
    Criteria criteria = new Criteria();
    criteria.addLike("headline", "SAL%");
    criteria.addEqualTo("qualifiers.importance", "unimportant");
    criteria.addEqualTo("qualifiers.name", "Sellers");
    criteria.addPathClass("qualifiers", Qualifier.class);
    criteria.addPathClass("qualifiers", TopicExt.class);
    criteria.addPathClass("qualifiers", Topic.class);
    QueryByCriteria query = QueryFactory.newQuery(BaseContentImpl.class, criteria, true);
    List content = (List) broker.getCollectionByQuery(query);

    assertEquals(1, content.size());
    assertEquals(11, ((Paper)content.get(0)).getId());
    assertNotNull(((Paper)content.get(0)).getQualifiers());
    assertEquals(2, ((Paper)content.get(0)).getQualifiers().size());
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:18,代码来源:ExtentAwarePathExpressionsTest.java


示例12: getAllObjects

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Return all objects for the given class.
 */
public Collection getAllObjects(Class target)
{
    PersistenceBroker broker = getBroker();
    Collection result;
    try
    {
        Query q = new QueryByCriteria(target);
        result = broker.getCollectionByQuery(q);
    }
    finally
    {
        if (broker != null) broker.close();
    }
    return result;
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:19,代码来源:PBBaseBeanImpl.java


示例13: createChartForNextBudgetCycle

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
public void createChartForNextBudgetCycle() {
    // first we have to remove what's there
    // (the documentation says deleteByQuery (1) ignores object references and (2) does
    //  not synchronize the cache.  so, we clear the cache before and after.)
    getPersistenceBrokerTemplate().clearCache();
    Criteria criteriaID = QueryByCriteria.CRITERIA_SELECT_ALL;
    QueryByCriteria killAcctQuery = new QueryByCriteria(BudgetConstructionAccountReports.class);
    killAcctQuery.setCriteria(criteriaID);
    getPersistenceBrokerTemplate().deleteByQuery(killAcctQuery);
    QueryByCriteria killOrgQuery = new QueryByCriteria(BudgetConstructionOrganizationReports.class);
    killOrgQuery.setCriteria(criteriaID);
    getPersistenceBrokerTemplate().deleteByQuery(killOrgQuery);
    getPersistenceBrokerTemplate().clearCache();
    // build the organization table  
    buildNewOrganizationReportsTo();
    // build the account table
    buildNewAccountReportsTo();
}
 
开发者ID:kuali,项目名称:kfs,代码行数:19,代码来源:GenesisDaoOjb.java


示例14: getInvoicesToExtractForVendor

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * @see org.kuali.ole.module.purap.document.dataaccess.InvoiceDao#getInvoicesToExtractForVendor(String,
 *      org.kuali.ole.module.purap.util.VendorGroupingHelper, Date)
 */
public Collection<InvoiceDocument> getInvoicesToExtractForVendor(String campusCode, VendorGroupingHelper vendor, Date onOrBeforeInvoicePayDate) {
    LOG.debug("getInvoicesToExtract() started");

    Criteria criteria = new Criteria();
    criteria.addEqualTo("processingCampusCode", campusCode);
    //criteria.addIn(PurapPropertyConstants.STATUS_CODE, statuses);
    criteria.addIsNull("extractedTimestamp");
    criteria.addEqualTo("holdIndicator", Boolean.FALSE);

    Criteria c1 = new Criteria();
    c1.addLessOrEqualThan("invoicePayDate", onOrBeforeInvoicePayDate);

    Criteria c2 = new Criteria();
    c2.addEqualTo("immediatePaymentIndicator", Boolean.TRUE);

    c1.addOrCriteria(c2);
    criteria.addAndCriteria(c1);

    criteria.addEqualTo("vendorHeaderGeneratedIdentifier", vendor.getVendorHeaderGeneratedIdentifier());
    criteria.addEqualTo("vendorDetailAssignedIdentifier", vendor.getVendorDetailAssignedIdentifier());
    criteria.addEqualTo("vendorCountryCode", vendor.getVendorCountry());
    criteria.addLike("vendorPostalCode", vendor.getVendorPostalCode() + "%");

    return getPersistenceBrokerTemplate().getCollectionByQuery(new QueryByCriteria(InvoiceDocument.class, criteria));
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:30,代码来源:InvoiceDaoOjb.java


示例15: duplicateExists

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * @see edu.iu.uis.pur.cm.dao.CreditMemoDao#duplicateExists(java.lang.String, java.lang.String)
 */
@Override
public boolean duplicateExists(Integer vendorNumberHeaderId, Integer vendorNumberDetailId, String creditMemoNumber) {
    LOG.debug("duplicateExists() started");

    // criteria: vendorNumberHeader AND vendorNumberDetail AND creditMemoNumber
    Criteria criteria = new Criteria();
    criteria.addEqualTo("vendorHeaderGeneratedIdentifier", vendorNumberHeaderId);
    criteria.addEqualTo("vendorDetailAssignedIdentifier", vendorNumberDetailId);
    criteria.addEqualTo("creditMemoNumber", creditMemoNumber);

    // use the criteria to do a Count against the DB, and return the resulting
    // number. Any positive non-zero result means that a potential duplicate
    // exists and we return true, otherwise, return false.
    int cmCount = getPersistenceBrokerTemplate().getCount(new QueryByCriteria(VendorCreditMemoDocument.class, criteria));
    if (cmCount > 0) {
        return true;
    } else {
        return false;
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:24,代码来源:CreditMemoDaoOjb.java


示例16: apply

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/** perform this use case*/
public void apply()
{
    System.out.println("The list of available products:");
    // build a query that select all objects of Class Product, without any further criteria
    // according to ODMG the Collection containing all instances of a persistent class is called "Extent"
    Query query = new QueryByCriteria(Product.class, null);
    try
    {
        // ask the broker to retrieve the Extent collection
        Collection allProducts = broker.getCollectionByQuery(query);
        // now iterate over the result to print each product
        java.util.Iterator iter = allProducts.iterator();
        while (iter.hasNext())
        {
            System.out.println(iter.next());
        }
    }
    catch (Throwable t)
    {
        t.printStackTrace();
    }
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:24,代码来源:UCListAllProducts.java


示例17: getGroupWithMaxIdFromSource

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Given an origin entry group source type (defined in OriginEntrySource)
 * 
 * @param sourceCode the source code of the groups to find
 * @return a OriginEntryGroup with the given source code and max ORIGIN_ENTRY_GRP_ID
 * @see org.kuali.kfs.gl.businessobject.OriginEntrySource
 * @see org.kuali.kfs.gl.dataaccess.OriginEntryGroupDao#getGroupWithMaxIdFromSource(java.lang.String)
 */
public OriginEntryGroup getGroupWithMaxIdFromSource(String sourceCode) {
    LOG.debug("getGroupWithMaxIdFromSource() started");
    
    Criteria crit = new Criteria();
    
    Criteria subCrit = new Criteria();
    subCrit.addEqualTo(SOURCE_CODE, sourceCode);
    ReportQueryByCriteria subQuery = new ReportQueryByCriteria(OriginEntryGroup.class, subCrit);
    subQuery.setAttributes(new String[]{MAX_ORIGIN_ENTRY_GRP_ID});
    
    crit.addGreaterOrEqualThan(ORIGIN_ENTRY_GRP_ID, subQuery);
    
    QueryByCriteria qbc = QueryFactory.newQuery(OriginEntryGroup.class, crit);
    
    return (OriginEntryGroup) getPersistenceBrokerTemplate().getObjectByQuery(qbc);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:25,代码来源:OriginEntryGroupDaoOjb.java


示例18: getCountQuery

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Build a Count-Query based on aQuery
 * @param aQuery
 * @return The count query
 */
public Query getCountQuery(Query aQuery)
{
    if(aQuery instanceof QueryBySQL)
    {
        return getQueryBySqlCount((QueryBySQL) aQuery);
    }
    else if(aQuery instanceof ReportQueryByCriteria)
    {
        return getReportQueryByCriteriaCount((ReportQueryByCriteria) aQuery);
    }
    else
    {
        return getQueryByCriteriaCount((QueryByCriteria) aQuery);
    }
}
 
开发者ID:KualiCo,项目名称:ojb,代码行数:21,代码来源:BrokerHelper.java


示例19: getBalanceByTransaction

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * Using values from the transaction as keys, lookup the balance the transaction would affect were it posted
 * 
 * @t a transaction to look up the related balance for
 * @return a Balance that the given transaction would affect
 * @see org.kuali.ole.gl.dataaccess.BalanceDao#getBalanceByTransaction(org.kuali.ole.gl.businessobject.Transaction)
 */
public Balance getBalanceByTransaction(Transaction t) {
    LOG.debug("getBalanceByTransaction() started");

    Criteria crit = new Criteria();
    crit.addEqualTo(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, t.getUniversityFiscalYear());
    crit.addEqualTo(OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE, t.getChartOfAccountsCode());
    crit.addEqualTo(OLEPropertyConstants.ACCOUNT_NUMBER, t.getAccountNumber());
    crit.addEqualTo(OLEPropertyConstants.SUB_ACCOUNT_NUMBER, t.getSubAccountNumber());
    crit.addEqualTo(OLEPropertyConstants.OBJECT_CODE, t.getFinancialObjectCode());
    crit.addEqualTo(OLEPropertyConstants.SUB_OBJECT_CODE, t.getFinancialSubObjectCode());
    crit.addEqualTo(OLEPropertyConstants.BALANCE_TYPE_CODE, t.getFinancialBalanceTypeCode());
    crit.addEqualTo(OLEPropertyConstants.OBJECT_TYPE_CODE, t.getFinancialObjectTypeCode());

    QueryByCriteria qbc = QueryFactory.newQuery(Balance.class, crit);
    return (Balance) getPersistenceBrokerTemplate().getObjectByQuery(qbc);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:24,代码来源:BalanceDaoOjb.java


示例20: getDebarredVendorsUnmatched

import org.apache.ojb.broker.query.QueryByCriteria; //导入依赖的package包/类
/**
 * @see org.kuali.ole.vnd.batch.dataaccess.DebarredVendorMatchDao.getDebarredVendorsUnmatched()
 */
@Override
public List<VendorDetail> getDebarredVendorsUnmatched() {

    Criteria subcr = new Criteria();
    subcr.addEqualToField("vendorHeaderGeneratedIdentifier", Criteria.PARENT_QUERY_PREFIX + "vendorHeaderGeneratedIdentifier");
    subcr.addEqualToField("vendorDetailAssignedIdentifier", Criteria.PARENT_QUERY_PREFIX + "vendorDetailAssignedIdentifier");
    Criteria orcr = new Criteria();
    orcr.addEqualTo("confirmStatusCode", "C");
    Criteria orcr2 = new Criteria();
    orcr2.addEqualTo("confirmStatusCode", "U");
    orcr.addOrCriteria(orcr2);
    subcr.addAndCriteria(orcr);
    QueryByCriteria subqr = QueryFactory.newQuery(DebarredVendorMatch.class, subcr);

    Criteria criteria = new Criteria();
    criteria.addEqualTo("vendorHeader.vendorDebarredIndicator", "Y");
    criteria.addNotExists(subqr);
    QueryByCriteria query = QueryFactory.newQuery(VendorDetail.class, criteria);
    List<VendorDetail> vendors = (List<VendorDetail>) getPersistenceBrokerTemplate().getCollectionByQuery(query);

    return vendors;
  }
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:26,代码来源:DebarredVendorMatchDaoOjb.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ProgressWheel类代码示例发布时间:2022-05-23
下一篇:
Java Cache类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap