com.speedment.runtime.join.JoinComponent Maven / Gradle / Ivy
Show all versions of runtime-deploy Show documentation
/**
*
* Copyright (c) 2006-2019, Speedment, Inc. All Rights Reserved.
*
* 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 com.speedment.runtime.join;
import com.speedment.common.injector.annotation.InjectKey;
import com.speedment.runtime.config.identifier.TableIdentifier;
import com.speedment.runtime.join.builder.JoinBuilder1;
/**
* a JoinComponent can be used to create builders for creating Join objects.
* Join objects, in turn, can be used to stream over joined tables.
*
* It is unspecified if objects returned by builder-type of objects return
* itself or a new builder. Users should make no assumption of either case and
* use a fluent API style of programming.
*
* All methods that takes objects will throw a {@code NullPointerException} if
* provided with one or several {@code null} values.
*
* Intermediate builder methods are not thread safe.
*
* Currently, this component can build joins of grade 2, 3, 4, 5, 6, 7, 8, 9 or
* 10.
*
* @author Per Minborg
* @since 3.1.0
*/
@InjectKey(JoinComponent.class)
public interface JoinComponent {
/**
* The maximum number of tables than can be joined.
*/
int MAX_DEGREE = 10;
/**
* Adds a provided {@code firstManager} to the collection of joined
* managers. Rows are joined from the provided {@code firstManager}
* depending on how subsequent managers are added to the builder.
*
* @param type of entities for the first manager
* @param firstManager to use
* @return a builder where the provided {@code firstManager} is added
*
* @throws NullPointerException if the provided {@code firstManager} is
* {@code null}
*/
JoinBuilder1 from(TableIdentifier firstManager);
}