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

com.speedment.runtime.join.builder.JoinBuilder6 Maven / Gradle / Ivy

package com.speedment.runtime.join.builder;

import com.speedment.common.function.Function6;
import com.speedment.common.tuple.Tuple;
import com.speedment.common.tuple.TuplesOfNullables;
import com.speedment.common.tuple.nullable.Tuple6OfNullables;
import com.speedment.runtime.config.identifier.TableIdentifier;
import com.speedment.runtime.field.trait.HasComparableOperators;
import com.speedment.runtime.join.Join;
import com.speedment.runtime.join.trait.HasDefaultBuild;
import com.speedment.runtime.join.trait.HasJoins;
import com.speedment.runtime.join.trait.HasOnPredicates;
import com.speedment.runtime.join.trait.HasWhere;

/**
 * Join Builder stage used when only 6 tables has been specified so far.
 *
 * @param   the first entity type
 * @param   the second entity type
 * @param   the third entity type
 * @param   the fourth entity type
 * @param   the fifth entity type
 * @param   the sixth entity type
 *
 * @author Per Minborg
 * @author Emil Forslund
 * @since  3.1.1
 */
public interface JoinBuilder6
extends HasJoins, JoinBuilder7>,
        HasWhere>,
        HasDefaultBuild> {

    @Override
     AfterJoin innerJoinOn(HasComparableOperators joinedField);

    @Override
     AfterJoin leftJoinOn(HasComparableOperators joinedField);

    @Override
     AfterJoin rightJoinOn(HasComparableOperators joinedField);

    @Override
     JoinBuilder7 crossJoin(TableIdentifier joinedTable);

    @Override
    default Join> build() {
        return build(TuplesOfNullables::ofNullables);
    }

    /**
     * Creates and returns a new Join object where elements in the Join
     * object's stream method is created using the provided {@code
     * constructor}.
     *
     * @param          the type of element in the Join object's stream
     *                    method.
     * @param constructor to use to create stream elements.
     * @return a new Join object where elements in the Join object's stream
     *     method is of a default {@link Tuple} type
     *
     * @throws NullPointerException  if the provided {@code constructor } is
     *                               {@code null}
     * @throws IllegalStateException if fields that are added via the {@code
     *                               on() } method refers to tables that are
     *                               not a part of the join.
     */
     Join build(Function6 constructor);

    interface AfterJoin
    extends HasOnPredicates> {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy