public class SpecCommon extends Object
构造器和说明 |
---|
SpecCommon() |
限定符和类型 | 方法和说明 |
---|---|
protected static <E,A> org.springframework.data.jpa.domain.Specification<E> |
$spec(Operators.Logical logical,
String attributeName,
A... attributes) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
and(Collection<org.springframework.data.jpa.domain.Specification<T>> specList) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
and(org.springframework.data.jpa.domain.Specification<T>... specifications) |
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
between(String attributeName,
A min,
A max)
where E.attribute between min and max
|
static <E> org.springframework.data.jpa.domain.Specification<E> |
customLike(String attributeName,
String value)
where E.attribute like value
|
static <E> org.springframework.data.jpa.domain.Specification<E> |
distinct(org.springframework.data.jpa.domain.Specification<E> specification) |
static <E> org.springframework.data.jpa.domain.Specification<E> |
endWith(String attributeName,
String value)
where E.attribute like %value
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
equals(String attributeName,
A value)
where E.attribute = value
|
static <ATTR,E> javax.persistence.criteria.Path<ATTR> |
getPath(javax.persistence.criteria.Root<E> root,
String attrName) |
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
greaterThen(String attributeName,
A value)
where E.attribute > value
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
greaterThenEquals(String attributeName,
A value)
where E.attribute >= value
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
in(String attributeName,
A... values)
where E.attribute in (values)
|
static <E> org.springframework.data.jpa.domain.Specification<E> |
isNull(String attributeName)
where E.attribute is NULL
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
lessThen(String attributeName,
A value)
where E.attribute < value
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
lessThenEquals(String attributeName,
A value)
where E.attribute <= value
|
static <E> org.springframework.data.jpa.domain.Specification<E> |
like(String attributeName,
String value)
where E.attribute like %value%
|
static <ENTITY,ATTR> |
memberOf(String attributeName,
ATTR attr)
where attr in E.attribute
|
static <T> org.springframework.data.jpa.domain.Specification<T> |
not(org.springframework.data.jpa.domain.Specification<T> spec) |
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
notEquals(String attributeName,
A value)
where E.attribute <> value
|
static <E,A> org.springframework.data.jpa.domain.Specification<E> |
notIn(String attributeName,
A... values)
where E.attribute not in (values)
|
static <E> org.springframework.data.jpa.domain.Specification<E> |
notNull(String attributeName)
where E.attribute is not NULL
|
static <T> org.springframework.data.jpa.domain.Specification<T> |
or(Collection<org.springframework.data.jpa.domain.Specification<T>> specList) |
static <T> org.springframework.data.jpa.domain.Specification<T> |
or(org.springframework.data.jpa.domain.Specification<T>... specifications) |
static <E> org.springframework.data.jpa.domain.Specification<E> |
startWith(String attributeName,
String value)
where E.attribute like value%
|
static <ENTITY> org.springframework.data.jpa.domain.Specification<ENTITY> |
wrapper(org.springframework.data.jpa.domain.Specification<ENTITY> specifications) |
public static <E> org.springframework.data.jpa.domain.Specification<E> distinct(org.springframework.data.jpa.domain.Specification<E> specification)
public static <ATTR,E> javax.persistence.criteria.Path<ATTR> getPath(javax.persistence.criteria.Root<E> root, String attrName)
public static <T> org.springframework.data.jpa.domain.Specification<T> not(org.springframework.data.jpa.domain.Specification<T> spec)
public static <T> org.springframework.data.jpa.domain.Specification<T> and(org.springframework.data.jpa.domain.Specification<T>... specifications)
public static <T> org.springframework.data.jpa.domain.Specification<T> or(org.springframework.data.jpa.domain.Specification<T>... specifications)
public static <T> org.springframework.data.jpa.domain.Specification<T> and(Collection<org.springframework.data.jpa.domain.Specification<T>> specList)
public static <T> org.springframework.data.jpa.domain.Specification<T> or(Collection<org.springframework.data.jpa.domain.Specification<T>> specList)
protected static <E,A> org.springframework.data.jpa.domain.Specification<E> $spec(Operators.Logical logical, String attributeName, A... attributes)
public static <ENTITY,ATTR> org.springframework.data.jpa.domain.Specification<ENTITY> memberOf(String attributeName, ATTR attr)
ENTITY
- ATTR
- attributeName
- attr
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> lessThen(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> lessThenEquals(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> equals(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> notEquals(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> greaterThen(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> greaterThenEquals(String attributeName, A value)
E
- A
- attributeName
- value
- public static <E> org.springframework.data.jpa.domain.Specification<E> like(String attributeName, String value)
E
- attributeName
- value
- public static <E> org.springframework.data.jpa.domain.Specification<E> startWith(String attributeName, String value)
E
- attributeName
- value
- public static <E> org.springframework.data.jpa.domain.Specification<E> endWith(String attributeName, String value)
E
- attributeName
- value
- public static <E> org.springframework.data.jpa.domain.Specification<E> customLike(String attributeName, String value)
E
- attributeName
- value
- public static <E> org.springframework.data.jpa.domain.Specification<E> isNull(String attributeName)
E
- attributeName
- public static <E> org.springframework.data.jpa.domain.Specification<E> notNull(String attributeName)
E
- attributeName
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> in(String attributeName, A... values)
E
- A
- attributeName
- values
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> notIn(String attributeName, A... values)
E
- A
- attributeName
- values
- public static <E,A> org.springframework.data.jpa.domain.Specification<E> between(String attributeName, A min, A max)
E
- A
- attributeName
- min
- max
- public static <ENTITY> org.springframework.data.jpa.domain.Specification<ENTITY> wrapper(org.springframework.data.jpa.domain.Specification<ENTITY> specifications)
Copyright © 2020. All rights reserved.