public abstract class JPQLContext extends Object implements JPQLContextView
JPQLStatement
. Extend this
class to implement specific implementations of JPQL context types (Select,
Join). A JPQL Context is constructed from an OData
request. Depending on OData CRUD operation performed on an Entity, a
corresponding JPQL context object is built. The JPQL context object thus
built can be used for constructing JPQL statements. JPQLStatement
,
JPQLContextType
,
JPQLBuilderFactory
Modifier and Type | Class and Description |
---|---|
static class |
JPQLContext.JPQLContextBuilder
The abstract class is extended by specific JPQLContext builder for
building JPQLContexts.
|
Modifier and Type | Field and Description |
---|---|
protected String |
jpaEntityAlias
An alias for Java Persistence Entity
|
protected String |
jpaEntityName
Java Persistence Entity name
|
protected boolean |
pagingRequested |
protected JPQLContextType |
type
The type of JPQL context.
|
Constructor and Description |
---|
JPQLContext() |
Modifier and Type | Method and Description |
---|---|
static JPQLContext.JPQLContextBuilder |
createBuilder(JPQLContextType contextType,
Object resultsView)
the method returns an instance of type
JPQLContext.JPQLContextBuilder based on the
JPQLContextType. |
static JPQLContext.JPQLContextBuilder |
createBuilder(JPQLContextType contextType,
Object resultsView,
boolean withPaging)
the method returns an instance of type
JPQLContext.JPQLContextBuilder based on the
JPQLContextType. |
String |
getJPAEntityAlias()
gets the JPA entity alias name set into the context
|
String |
getJPAEntityName()
gets the JPA entity name set into the context
|
JPQLContextType |
getType()
gets the JPQL context type set into the context
|
protected void |
isPagingRequested(boolean pagingRequested) |
protected void |
setJPAEntityAlias(String jpaEntityAlias)
sets JPA Entity alias name into the context
|
protected void |
setJPAEntityName(String jpaEntityName)
sets JPA Entity Name into the context
|
protected void |
setType(JPQLContextType type)
sets the JPQL context type into the context
|
protected String jpaEntityAlias
protected String jpaEntityName
protected JPQLContextType type
protected boolean pagingRequested
protected final void setJPAEntityName(String jpaEntityName)
jpaEntityName
- is the name of JPA Entityprotected final void setJPAEntityAlias(String jpaEntityAlias)
jpaEntityAlias
- is the JPA entity alias namepublic final String getJPAEntityAlias()
getJPAEntityAlias
in interface JPQLContextView
protected final void setType(JPQLContextType type)
type
- is JPQLContextTypepublic final String getJPAEntityName()
getJPAEntityName
in interface JPQLContextView
public final JPQLContextType getType()
getType
in interface JPQLContextView
JPQLContextType
protected void isPagingRequested(boolean pagingRequested)
public static final JPQLContext.JPQLContextBuilder createBuilder(JPQLContextType contextType, Object resultsView) throws ODataJPARuntimeException
JPQLContext.JPQLContextBuilder
based on the
JPQLContextType. The context builder can be used for
building different JPQL contexts.contextType
- is the JPQLContextTyperesultsView
- is the OData request viewJPQLContext.JPQLContextBuilder
ODataJPARuntimeException
public static final JPQLContext.JPQLContextBuilder createBuilder(JPQLContextType contextType, Object resultsView, boolean withPaging) throws ODataJPARuntimeException
JPQLContext.JPQLContextBuilder
based on the
JPQLContextType. The context builder can be used for
building different JPQL contexts.contextType
- is the JPQLContextTyperesultsView
- is the OData request viewwithPaging
- indicates whether to build the context with pagingJPQLContext.JPQLContextBuilder
ODataJPARuntimeException
Copyright © 2013-2017 The Apache Software Foundation. All Rights Reserved.