All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dbflute.bhv.referrer.NestedReferrerListGateway Maven / Gradle / Ivy

There is a newer version: 1.2.8
Show newest version
/*
 * Copyright 2014-2021 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.bhv.referrer;

import org.dbflute.Entity;

/**
 * The gateway of list handling for nested referrer.
 * 
 * List<Member> memberList = memberBhv.selectList(cb -> {
 *     cb.query().set...
 * });
 * memberBhv.loadPurchaseList(memberList, new ReferrerConditionSetupper<PurchaseCB>() {
 *     public void setup(PurchaseCB cb) {
 *         cb.query().addOrderBy_PurchaseDatetime_Asc();
 *     }
 * }).withNestedReferrer(new ReferrerListHandler<Purchase>() {
 *     public void handle(List<Purchase> referrerList) {
 *         // you can call LoadReferrer here for nested referrer as you like it
 *         purchaseBhv.loadPurchasePaymentList(referrerList, new ReferrerConditionSetupper<PurchasePaymentCB>() {
 *             public void setup(PurchasePaymentCB cb) {
 *                 ...
 *             }
 *         });
 *         ...
 *     }
 * }
 * 
* @param The type of referrer entity. * @author jflute * @since 1.0.5J (2014/06/14 Saturday) */ @FunctionalInterface public interface NestedReferrerListGateway { /** * Set up nested referrer by the handler. *
     * List<Member> memberList = memberBhv.selectList(cb -> {
     *     cb.query().set...
     * });
     * memberBhv.loadPurchaseList(memberList, purchaseCB -> {
     *     purchaseCB.query().addOrderBy_PurchaseDatetime_Asc();
     * }).withNestedReferrer(purchaseList -> {
     *     // you can call LoadReferrer here for nested referrer as you like it
     *     purchaseBhv.loadPurchasePaymentList(purchaseList, paymentCB -> {
     *         paymentCB.query().addOrderBy_PaymentDatetime_Desc();
     *     });
     *     ...
     * });
     * 
* @param entityListLambda The callback for handler of referrer list to load nested referrer. (NotNull) */ void withNestedReferrer(ReferrerListHandler entityListLambda); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy