Make your own free website on Tripod.com

API cont... EntityExpr

You can also constrain your search with EntityExpr:

List expr = UtilMisc.toList(
    new EntityExpr("blacklistString", 
        EntityOperator.EQUALS, shippingAddress, true),
    new EntityExpr("orderBlacklistTypeId", 
        EndityOperator.EQUALS, "BLACKLIST_ADDRESS")
    new EntityExpr("blackliststring",
        EntityOperator.EQUALS, creditCardNumber));
List blacklistfound = delegator.findByOr("OrderBlacklist", exprs);

getRelated:

Collection cmPurpose = 
    partyContactMech.getRelated("PartyContactMechPurpose"));

GenericValue billingAddr =
    creditCard.getRelatedOne("PostalAddress");

Collection paymentPreferences =
    orderHeader.getRelatedByAnd("OrderPaymentPreference",
        UtilMisc.toMap("statusId", statusId));