Package io.manebot.database.search
Interface SearchHandler.Clause<T>
-
- Type Parameters:
T- search entity type.
- Enclosing interface:
- SearchHandler<T>
public static interface SearchHandler.Clause<T>Represents a WHERE clause.
-
-
Method Summary
Modifier and Type Method Description voidaddPredicate(SearchOperator operator, javax.persistence.criteria.Predicate predicate)Adds a predicate to the query.javax.persistence.criteria.CriteriaBuildergetCriteriaBuilder()Gets the criteria builder instances associated with this execution.javax.persistence.criteria.RootgetRoot()Gets the root of this clause.SearchHandler<T>getSearchHandler()Gets the search handler associated with this execution.SearchHandler.Clause<T>pop()Pops a clause off of the stack.SearchHandler.Clause<T>push(SearchOperator operator)Pushes a new clause onto the stack.
-
-
-
Method Detail
-
getSearchHandler
SearchHandler<T> getSearchHandler()
Gets the search handler associated with this execution.- Returns:
- search handler.
-
getRoot
javax.persistence.criteria.Root getRoot()
Gets the root of this clause.- Returns:
- root instance.
-
getCriteriaBuilder
javax.persistence.criteria.CriteriaBuilder getCriteriaBuilder()
Gets the criteria builder instances associated with this execution.- Returns:
- criteria builder instance.
-
addPredicate
void addPredicate(SearchOperator operator, javax.persistence.criteria.Predicate predicate)
Adds a predicate to the query.- Parameters:
operator- operator used for this expression.predicate- predicate to push.
-
push
SearchHandler.Clause<T> push(SearchOperator operator)
Pushes a new clause onto the stack.- Parameters:
operator- prefixing clause operator.- Returns:
- clause instance to use for this clause.
-
pop
SearchHandler.Clause<T> pop() throws java.lang.IllegalArgumentException
Pops a clause off of the stack.- Returns:
- clause instance.
- Throws:
java.lang.IllegalArgumentException- if no clause is able to be popped.
-
-