java.lang.Object
org.eclipse.persistence.queries.JPQLCall
- All Implemented Interfaces:
Serializable
,Cloneable
,Call
Purpose: Used as an abstraction of a database invocation.
A call is an JPQL string.
Responsibilities:
- Parse the JPQL String
- Populate the contained query's selection criteria. Add attributes to ReportQuery (if required).
- Since:
- TopLink 4.0
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionINTERNAL: Return the appropriate mechanism, with the call added as necessary.buildQueryMechanism
(DatabaseQuery query, DatabaseQueryMechanism mechanism) INTERNAL: Return the appropriate mechanism, with the call added as necessary.clone()
INTERNAL: Return a clone of the call.INTERNAL: Return the string for the callINTERNAL: Return the EJBQL string for this callINTERNAL: Return the EJBQL string for this callgetLogString
(Accessor accessor) INTERNAL: Return the SQL string for this call.getQuery()
Back reference to query, unfortunately required for events.INTERNAL: Return the SQL string for this call.boolean
Return whether all the results of the call have been returned.boolean
INTERNAL: Yes this is an JPQLCallboolean
The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.boolean
The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.boolean
isParsed()
INTERNAL Is this query Parsedvoid
populateQuery
(AbstractSession session) Populate the query using the information retrieved from parsing the EJBQL.prepareStatement
(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session) INTERNAL: Prepare the JDBC statement, this may be parameterize or a call statement.void
setEjbqlString
(String jpqlString) INTERNAL: Set the EJBQL string for this callvoid
setIsParsed
(boolean newIsParsed) INTERNAL Set the isParsed statevoid
setJPQLString
(String jpqlString) INTERNAL: Set the JPQL string for this callvoid
setQuery
(DatabaseQuery query) INTERNAL: Back reference to query, unfortunately required for events.toString()
INTERNAL: Print the JPQL string.void
translate
(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session) INTERNAL: translate method comment.
-
Field Details
-
query
-
jpqlString
-
isParsed
protected boolean isParsed
-
-
Constructor Details
-
JPQLCall
public JPQLCall()PUBLIC: Create a new JPQLCall. -
JPQLCall
PUBLIC: Create a new JPQLCall with an jpqlString.
-
-
Method Details
-
buildNewQueryMechanism
INTERNAL: Return the appropriate mechanism, with the call added as necessary.- Specified by:
buildNewQueryMechanism
in interfaceCall
-
buildQueryMechanism
public DatabaseQueryMechanism buildQueryMechanism(DatabaseQuery query, DatabaseQueryMechanism mechanism) INTERNAL: Return the appropriate mechanism, with the call added as necessary.- Specified by:
buildQueryMechanism
in interfaceCall
-
clone
Description copied from interface:Call
INTERNAL: Return a clone of the call. -
getCallString
INTERNAL: Return the string for the call -
getEjbqlString
INTERNAL: Return the EJBQL string for this call -
getJPQLString
INTERNAL: Return the EJBQL string for this call -
getQuery
Back reference to query, unfortunately required for events. -
getLogString
INTERNAL: Return the SQL string for this call. Always return null since this is an EJBQL call- Specified by:
getLogString
in interfaceCall
-
getSQLString
INTERNAL: Return the SQL string for this call. Always return null since this is an EJBQL call -
isJPQLCall
public boolean isJPQLCall()INTERNAL: Yes this is an JPQLCall -
isFinished
public boolean isFinished()Return whether all the results of the call have been returned.- Specified by:
isFinished
in interfaceCall
-
isParsed
public boolean isParsed()INTERNAL Is this query Parsed -
populateQuery
Populate the query using the information retrieved from parsing the EJBQL. -
prepareStatement
public PreparedStatement prepareStatement(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session) throws SQLException INTERNAL: Prepare the JDBC statement, this may be parameterize or a call statement. If caching statements this must check for the pre-prepared statement and re-bind to it.- Throws:
SQLException
-
setEjbqlString
INTERNAL: Set the EJBQL string for this call -
setJPQLString
INTERNAL: Set the JPQL string for this call -
setIsParsed
public void setIsParsed(boolean newIsParsed) INTERNAL Set the isParsed state -
setQuery
INTERNAL: Back reference to query, unfortunately required for events. -
translate
public void translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session) INTERNAL: translate method comment. -
isNothingReturned
public boolean isNothingReturned()The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.- Specified by:
isNothingReturned
in interfaceCall
-
isOneRowReturned
public boolean isOneRowReturned()The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.- Specified by:
isOneRowReturned
in interfaceCall
-
toString
INTERNAL: Print the JPQL string.
-