forked from fanruan/finekit
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
146 lines
4.7 KiB
146 lines
4.7 KiB
package com.fanruan.api.query; |
|
|
|
import com.fr.stable.query.data.SubQuery; |
|
import com.fr.stable.query.data.column.Column; |
|
import com.fr.stable.query.restriction.Restriction; |
|
import com.fr.stable.query.restriction.RestrictionFactory; |
|
|
|
import java.util.List; |
|
import java.util.Set; |
|
|
|
/** |
|
* @author richie |
|
* @version 10.0 |
|
* Created by richie on 2019/9/25 |
|
* 查询限制条件 |
|
*/ |
|
public class RestrictionKit { |
|
|
|
private RestrictionKit() { |
|
|
|
} |
|
|
|
public static Restriction eq(String columnName, Object columnValue) { |
|
return RestrictionFactory.eq(columnName, columnValue); |
|
} |
|
|
|
public static Restriction eq(Column column, Object columnValue) { |
|
return RestrictionFactory.eq(column, columnValue); |
|
} |
|
|
|
public static Restriction gt(String columnName, Object columnValue) { |
|
return RestrictionFactory.gt(columnName, columnValue); |
|
} |
|
|
|
public static Restriction gt(Column column, Object columnValue) { |
|
return RestrictionFactory.gt(column, columnValue); |
|
} |
|
|
|
public static Restriction gte(String columnName, Object columnValue) { |
|
return RestrictionFactory.gte(columnName, columnValue); |
|
} |
|
|
|
public static Restriction gte(Column column, Object columnValue) { |
|
return RestrictionFactory.gte(column, columnValue); |
|
} |
|
|
|
public static Restriction lt(String columnName, Object columnValue) { |
|
return RestrictionFactory.lt(columnName, columnValue); |
|
} |
|
|
|
public static Restriction lt(Column column, Object columnValue) { |
|
return RestrictionFactory.lt(column, columnValue); |
|
} |
|
|
|
public static Restriction lte(String columnName, Object columnValue) { |
|
return RestrictionFactory.lte(columnName, columnValue); |
|
} |
|
|
|
public static Restriction lte(Column column, Object columnValue) { |
|
return RestrictionFactory.lte(column, columnValue); |
|
} |
|
|
|
public static Restriction neq(String columnName, Object columnValue) { |
|
return RestrictionFactory.neq(columnName, columnValue); |
|
} |
|
|
|
public static Restriction neq(Column column, Object columnValue) { |
|
return RestrictionFactory.neq(column, columnValue); |
|
} |
|
|
|
public static Restriction like(String columnName, Object columnValue) { |
|
return RestrictionFactory.like(columnName, columnValue); |
|
} |
|
|
|
public static Restriction like(Column column, Object columnValue) { |
|
return RestrictionFactory.like(column, columnValue); |
|
} |
|
|
|
public static Restriction startWith(String columnName, Object columnValue) { |
|
return RestrictionFactory.startWith(columnName, columnValue); |
|
} |
|
|
|
public static Restriction startWith(Column column, Object columnValue) { |
|
return RestrictionFactory.startWith(column, columnValue); |
|
} |
|
|
|
public static Restriction endWith(String columnName, Object columnValue) { |
|
return RestrictionFactory.endWith(columnName, columnValue); |
|
} |
|
|
|
public static Restriction endWith(Column column, Object columnValue) { |
|
return RestrictionFactory.endWith(column, columnValue); |
|
} |
|
|
|
public static Restriction in(String columnName, Set<?> columnValues) { |
|
return RestrictionFactory.in(columnName, columnValues); |
|
} |
|
|
|
public static Restriction in(Column column, Set<?> columnValues) { |
|
return RestrictionFactory.in(column, columnValues); |
|
} |
|
|
|
public static Restriction inQuery(String columnName, SubQuery query) { |
|
return RestrictionFactory.inQuery(columnName, query); |
|
} |
|
|
|
public static Restriction inQuery(Column column, SubQuery query) { |
|
return RestrictionFactory.inQuery(column, query); |
|
} |
|
|
|
public static Restriction notIn(String columnName, Set<?> columnValues) { |
|
return RestrictionFactory.notIn(columnName, columnValues); |
|
} |
|
|
|
public static Restriction notIn(Column column, Set<?> columnValues) { |
|
return RestrictionFactory.notIn(column, columnValues); |
|
} |
|
|
|
public static Restriction notInQuery(String columnName, SubQuery query) { |
|
return RestrictionFactory.notInQuery(columnName, query); |
|
} |
|
|
|
public static Restriction notInQuery(Column column, SubQuery query) { |
|
return RestrictionFactory.notInQuery(column, query); |
|
} |
|
|
|
public static Restriction or(Restriction... restrictions) { |
|
return RestrictionFactory.or(restrictions); |
|
} |
|
|
|
public static Restriction or(List<Restriction> restrictionList) { |
|
return RestrictionFactory.or(restrictionList); |
|
} |
|
|
|
public static Restriction and(Restriction... restrictions) { |
|
return RestrictionFactory.and(restrictions); |
|
} |
|
|
|
public static Restriction and(List<Restriction> restrictionList) { |
|
return RestrictionFactory.and(restrictionList); |
|
} |
|
|
|
public static Restriction not(Restriction restriction) { |
|
return RestrictionFactory.not(restriction); |
|
} |
|
}
|
|
|