Top Description Fields Constructors Methods
org.eclipse.persistence.queries

public Class JPQLCall

extends Object
implements Serializable, Call
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.queries.Call, java.io.Serializable, java.lang.Cloneable
Imports
java.io.Serializable, java.sql.PreparedStatement, .SQLException, org.eclipse.persistence.internal.databaseaccess.Accessor, .DatabaseAccessor, org.eclipse.persistence.internal.queries.DatabaseQueryMechanism, .JPQLCallQueryMechanism, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession

Purpose: Used as an abstraction of a database invocation. A call is an JPQL string.

Responsibilities:

Author
Jon Driscoll and Joel Lucuik
Since
TopLink 4.0

Field Summary

Modifier and TypeField and Description
protected boolean
protected String
protected transient DatabaseQuery

Constructor Summary

AccessConstructor and Description
public
JPQLCall()

PUBLIC: Create a new JPQLCall.

public
JPQLCall(String jpqlString)

PUBLIC: Create a new JPQLCall with an jpqlString.

Method Summary

Modifier and TypeMethod and Description
public DatabaseQueryMechanism
buildNewQueryMechanism(DatabaseQuery query)

Implements org.eclipse.persistence.queries.Call.buildNewQueryMechanism.

INTERNAL: Return the appropriate mechanism, with the call added as necessary.
public DatabaseQueryMechanism
buildQueryMechanism(DatabaseQuery query, DatabaseQueryMechanism mechanism)

Implements org.eclipse.persistence.queries.Call.buildQueryMechanism.

INTERNAL: Return the appropriate mechanism, with the call added as necessary.
public Object
clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.persistence.queries.Call.clone.

INTERNAL: Return a clone of the call.
public String
getCallString()

INTERNAL: Return the string for the call

public String
getEjbqlString()

INTERNAL: Return the EJBQL string for this call

private boolean
getIsParsed()

INTERNAL Return the isParsed state

public String
getJPQLString()

INTERNAL: Return the EJBQL string for this call

public String
getLogString(Accessor accessor)

Implements org.eclipse.persistence.queries.Call.getLogString.

INTERNAL: Return the SQL string for this call.
public DatabaseQuery
getQuery()

Back reference to query, unfortunately required for events.

public String
getSQLString()

INTERNAL: Return the SQL string for this call.

public boolean
isFinished()

Implements org.eclipse.persistence.queries.Call.isFinished.

Return whether all the results of the call have been returned.
public boolean
isJPQLCall()

INTERNAL: Yes this is an JPQLCall

public boolean
isNothingReturned()

Implements org.eclipse.persistence.queries.Call.isNothingReturned.

The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
public boolean
isOneRowReturned()

Implements org.eclipse.persistence.queries.Call.isOneRowReturned.

The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
public boolean
isParsed()

INTERNAL Is this query Parsed

public void
populateQuery(AbstractSession session)

Populate the query using the information retrieved from parsing the EJBQL.

public PreparedStatement
prepareStatement(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session)

INTERNAL: Prepare the JDBC statement, this may be parameterize or a call statement.

public void
setEjbqlString(String jpqlString)

INTERNAL: Set the EJBQL string for this call

public void
setIsParsed(boolean newIsParsed)

INTERNAL Set the isParsed state

public void
setJPQLString(String jpqlString)

INTERNAL: Set the JPQL string for this call

public void
setQuery(DatabaseQuery query)

INTERNAL: Back reference to query, unfortunately required for events.

public String
toString()

Overrides java.lang.Object.toString.

INTERNAL: Print the JPQL string.
public void
translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: translate method comment.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

isParsedback to summary
protected boolean isParsed
jpqlStringback to summary
protected String jpqlString
queryback to summary
protected transient DatabaseQuery query

Constructor Detail

JPQLCallback to summary
public JPQLCall()

PUBLIC: Create a new JPQLCall.

JPQLCallback to summary
public JPQLCall(String jpqlString)

PUBLIC: Create a new JPQLCall with an jpqlString.

Method Detail

buildNewQueryMechanismback to summary
public DatabaseQueryMechanism buildNewQueryMechanism(DatabaseQuery query)

Implements org.eclipse.persistence.queries.Call.buildNewQueryMechanism.

INTERNAL: Return the appropriate mechanism, with the call added as necessary.

Annotations
@Override
buildQueryMechanismback to summary
public DatabaseQueryMechanism buildQueryMechanism(DatabaseQuery query, DatabaseQueryMechanism mechanism)

Implements org.eclipse.persistence.queries.Call.buildQueryMechanism.

INTERNAL: Return the appropriate mechanism, with the call added as necessary.

Annotations
@Override
cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.persistence.queries.Call.clone.

Doc from org.eclipse.persistence.queries.Call.clone.

INTERNAL: Return a clone of the call.

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
getCallStringback to summary
public String getCallString()

INTERNAL: Return the string for the call

getEjbqlStringback to summary
public String getEjbqlString()

INTERNAL: Return the EJBQL string for this call

getIsParsedback to summary
private boolean getIsParsed()

INTERNAL Return the isParsed state

getJPQLStringback to summary
public String getJPQLString()

INTERNAL: Return the EJBQL string for this call

getLogStringback to summary
public String getLogString(Accessor accessor)

Implements org.eclipse.persistence.queries.Call.getLogString.

INTERNAL: Return the SQL string for this call. Always return null since this is an EJBQL call

Annotations
@Override
getQueryback to summary
public DatabaseQuery getQuery()

Back reference to query, unfortunately required for events.

getSQLStringback to summary
public String getSQLString()

INTERNAL: Return the SQL string for this call. Always return null since this is an EJBQL call

isFinishedback to summary
public boolean isFinished()

Implements org.eclipse.persistence.queries.Call.isFinished.

Return whether all the results of the call have been returned.

Annotations
@Override
isJPQLCallback to summary
public boolean isJPQLCall()

INTERNAL: Yes this is an JPQLCall

isNothingReturnedback to summary
public boolean isNothingReturned()

Implements org.eclipse.persistence.queries.Call.isNothingReturned.

The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.

Annotations
@Override
isOneRowReturnedback to summary
public boolean isOneRowReturned()

Implements org.eclipse.persistence.queries.Call.isOneRowReturned.

The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.

Annotations
@Override
isParsedback to summary
public boolean isParsed()

INTERNAL Is this query Parsed

populateQueryback to summary
public void populateQuery(AbstractSession session)

Populate the query using the information retrieved from parsing the EJBQL.

prepareStatementback to summary
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.

setEjbqlStringback to summary
public void setEjbqlString(String jpqlString)

INTERNAL: Set the EJBQL string for this call

setIsParsedback to summary
public void setIsParsed(boolean newIsParsed)

INTERNAL Set the isParsed state

setJPQLStringback to summary
public void setJPQLString(String jpqlString)

INTERNAL: Set the JPQL string for this call

setQueryback to summary
public void setQuery(DatabaseQuery query)

INTERNAL: Back reference to query, unfortunately required for events.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

INTERNAL: Print the JPQL string.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.

Annotations
@Override
translateback to summary
public void translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: translate method comment.