Class AbstractSqlLikeQueryBuilder.QueryState
- java.lang.Object
-
- io.micronaut.data.model.query.builder.AbstractSqlLikeQueryBuilder.QueryState
-
- Enclosing class:
- AbstractSqlLikeQueryBuilder
@Internal protected final class AbstractSqlLikeQueryBuilder.QueryState extends java.lang.Object
The state of the query.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
addAdditionalRequiredParameter(java.lang.String name)
Add a required parameter.java.lang.String
applyJoin(JoinPath jp)
Applies a join for the given association.java.lang.String
computeAlias(java.lang.String associationPath)
Computes the alias for the given association path given the current state of the joins.@NotNull java.util.Map<java.lang.String,java.lang.String>
getAdditionalRequiredParameters()
The additional required parameters.PersistentEntity
getEntity()
java.lang.String
getFinalQuery()
java.util.List<JoinPath>
getJoinPaths()
java.util.List<QueryParameterBinding>
getParameterBindings()
The parameter binding.java.lang.StringBuilder
getQuery()
QueryModel
getQueryModel()
java.util.List<java.lang.String>
getQueryParts()
java.lang.String
getRootAlias()
boolean
isAllowJoins()
boolean
isJoined(java.lang.String associationPath)
Checks if the path is joined already.void
pushParameter(@NotNull BindingParameter bindingParameter, BindingParameter.BindingContext bindingContext)
void
setJoinPaths(java.util.List<JoinPath> joinPaths)
boolean
shouldEscape()
-
-
-
Method Detail
-
getRootAlias
@Nullable public java.lang.String getRootAlias()
- Returns:
- The root alias
-
getEntity
public PersistentEntity getEntity()
- Returns:
- The entity
-
addAdditionalRequiredParameter
public java.lang.String addAdditionalRequiredParameter(@NonNull java.lang.String name)
Add a required parameter.- Parameters:
name
- The name- Returns:
- name A placeholder in a query
-
getFinalQuery
public java.lang.String getFinalQuery()
-
getQueryParts
public java.util.List<java.lang.String> getQueryParts()
-
getQuery
public java.lang.StringBuilder getQuery()
- Returns:
- The query string
-
isAllowJoins
public boolean isAllowJoins()
- Returns:
- Does the query allow joins
-
getQueryModel
public QueryModel getQueryModel()
- Returns:
- The query model object
-
applyJoin
public java.lang.String applyJoin(@NonNull JoinPath jp)
Applies a join for the given association.- Parameters:
jp
- The join path- Returns:
- The alias
-
computeAlias
@NonNull public java.lang.String computeAlias(java.lang.String associationPath)
Computes the alias for the given association path given the current state of the joins.- Parameters:
associationPath
- The association path.- Returns:
- The alias
-
isJoined
public boolean isJoined(java.lang.String associationPath)
Checks if the path is joined already.- Parameters:
associationPath
- The association path.- Returns:
- true if joined
-
shouldEscape
public boolean shouldEscape()
- Returns:
- Should escape the query
-
getAdditionalRequiredParameters
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.String> getAdditionalRequiredParameters()
The additional required parameters.- Returns:
- The parameters
-
getParameterBindings
public java.util.List<QueryParameterBinding> getParameterBindings()
The parameter binding.- Returns:
- The parameter binding
-
pushParameter
public void pushParameter(@NotNull @NotNull BindingParameter bindingParameter, @NotNull BindingParameter.BindingContext bindingContext)
-
getJoinPaths
public java.util.List<JoinPath> getJoinPaths()
-
setJoinPaths
public void setJoinPaths(java.util.List<JoinPath> joinPaths)
-
-