com.landawn.abacus.condition.Join Maven / Gradle / Ivy
/*
* Copyright (C) 2015 HaiYang Li
*
* 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.landawn.abacus.condition;
import static com.landawn.abacus.util.WD._SPACE;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.landawn.abacus.util.Array;
import com.landawn.abacus.util.N;
import com.landawn.abacus.util.NamingPolicy;
import com.landawn.abacus.util.Strings;
/**
*
*/
public class Join extends AbstractCondition {
private List joinEntities;
private Condition condition;
// For Kryo
Join() {
}
/**
*
*
* @param joinEntity
*/
public Join(final String joinEntity) {
this(Operator.JOIN, joinEntity);
}
protected Join(final Operator operator, final String joinEntity) {
this(operator, joinEntity, null);
}
/**
*
*
* @param joinEntity
* @param condition
*/
public Join(final String joinEntity, final Condition condition) {
this(Operator.JOIN, joinEntity, condition);
}
protected Join(final Operator operator, final String joinEntity, final Condition condition) {
this(operator, Array.asList(joinEntity), condition);
}
/**
*
*
* @param joinEntities
* @param condition
*/
public Join(final Collection joinEntities, final Condition condition) {
this(Operator.JOIN, joinEntities, condition);
}
protected Join(final Operator operator, final Collection joinEntities, final Condition condition) {
super(operator);
this.joinEntities = new ArrayList<>(joinEntities);
this.condition = condition;
}
/**
* Gets the join entities.
*
* @return
*/
public List getJoinEntities() {
return joinEntities;
}
/**
* Gets the condition.
*
* @param
* @return
*/
@SuppressWarnings("unchecked")
public T getCondition() {
return (T) condition;
}
/**
* Gets the parameters.
*
* @return
*/
@Override
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy