public interface JpaProvider
| Modifier and Type | Method and Description |
|---|---|
String |
escapeCharacter(char character)
The given escape character for a LIKE predicate as string.
|
String |
getBooleanConditionalExpression(boolean value)
The JPQL conditional expression to use for the given literal boolean value.
|
String |
getBooleanExpression(boolean value)
The JPQL expression to use for the given literal boolean value.
|
String |
getCollectionValueFunction()
Normally returns
VALUE, but since Hibernate does weird things when using that, it returns null. |
String |
getCustomFunctionInvocation(String functionName,
int argumentCount)
Returns the start of a JPQL representation of a function invocation for the given function name and argument count.
|
Class<?> |
getDefaultQueryResultType()
The default result type of a scalar query.
|
String |
getNullExpression()
The JPQL expression to use for the NULL literal.
|
String |
getOnClause()
The name of the clause that has the same semantics as the ON clause which was introduced in JPA 2.1.
|
boolean |
isBag(javax.persistence.metamodel.Attribute<?,?> attribute)
Whether the given attribute is a non-indexed and non-ordered collection a.k.a. a bag.
|
boolean |
isJoinTable(javax.persistence.metamodel.Attribute<?,?> attribute)
Whether the given attribute is a collection that uses a join table.
|
boolean |
needsBracketsForListParamter()
Whether brackets are needed around a list parameter.
|
boolean |
needsJoinSubqueryRewrite()
Returns whether key restricted left joins should be rewritten to subquery joins.
|
void |
renderNullPrecedence(StringBuilder sb,
String expression,
String resolvedExpression,
String order,
String nulls)
Renders the null precedence into the given string builder.
|
boolean |
supportsCollectionValueDereference()
Whether dereferencing a VALUE function expression is supported by the JPA provider.
|
boolean |
supportsCountStar()
Whether the
COUNT(*) syntax is supported. |
boolean |
supportsEntityJoin()
Whether Entity Joins are supported.
|
boolean |
supportsInsertStatement()
Whether Insert statements are supported.
|
boolean |
supportsJpa21()
Whether JPA 2.1 specification is supported.
|
boolean |
supportsNullPrecedenceExpression()
Whether the query language supports the null precedence clause.
|
boolean |
supportsRootTreat()
Whether treating a from/root alias is supported.
|
boolean |
supportsRootTreatJoin()
Whether a root treat in a treat join is supported.
|
boolean |
supportsSingleValuedAssociationIdExpressions()
Indicates if the provider supports expressions like
doc.owner.id
without generating an extra join.
|
boolean |
supportsSubtypePropertyResolving()
Whether properties accessed of a from node are implicitly resolved to properties of a subtype of the from node.
|
boolean |
supportsTreatJoin()
Whether a treat join is supported.
|
boolean supportsJpa21()
boolean supportsEntityJoin()
boolean supportsInsertStatement()
boolean needsBracketsForListParamter()
boolean needsJoinSubqueryRewrite()
String getBooleanExpression(boolean value)
value - The boolean valueString getBooleanConditionalExpression(boolean value)
value - The boolean valueString getNullExpression()
String getOnClause()
String getCollectionValueFunction()
VALUE, but since Hibernate does weird things when using that, it returns null.
Returning null results in omitting VALUE in the final query that is passed to the JPA provider.boolean supportsCollectionValueDereference()
Class<?> getDefaultQueryResultType()
String getCustomFunctionInvocation(String functionName, int argumentCount)
FUNCTION('functionName', but implementations may also allow to render the function name directly.functionName - The function nameargumentCount - The number of the arguments that the function is invoked withString escapeCharacter(char character)
character - The escape characterboolean supportsNullPrecedenceExpression()
void renderNullPrecedence(StringBuilder sb, String expression, String resolvedExpression, String order, String nulls)
sb - The builder to which the null precedence should be appended toexpression - The order by expression which might be a select aliasresolvedExpression - The resolved expression for a possible select alias or the expressionorder - The order as string (ASC or DESC)nulls - The null precedence as string (NULLS FIRST or NULLS LAST)boolean supportsRootTreat()
boolean supportsTreatJoin()
boolean supportsRootTreatJoin()
boolean supportsSubtypePropertyResolving()
boolean supportsCountStar()
COUNT(*) syntax is supported.COUNT(*) syntax is supported, false otherwiseboolean isJoinTable(javax.persistence.metamodel.Attribute<?,?> attribute)
attribute - The attribute to checkboolean isBag(javax.persistence.metamodel.Attribute<?,?> attribute)
attribute - The attribute to checkboolean supportsSingleValuedAssociationIdExpressions()
Copyright © 2014–2017 Blazebit. All rights reserved.