Top Description Inners Fields Constructors Methods
org.eclipse.persistence.internal.databaseaccess

public abstract Class DatasourceCall

extends Object
implements Call
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.queries.Call, java.io.Serializable, java.lang.Cloneable
Known Direct Subclasses
org.eclipse.persistence.eis.interactions.EISInteraction, org.eclipse.persistence.internal.databaseaccess.DatabaseCall
Imports
java.io.CharArrayWriter, .IOException, .ObjectInputStream, .Writer, java.util.ArrayList, .Collection, .Iterator, .List, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.expressions.ParameterExpression, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.queries.DatabaseQueryMechanism, .DatasourceCallQueryMechanism, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.mappings.structures.ObjectRelationalDatabaseField, org.eclipse.persistence.queries.Call, .DatabaseQuery

INTERNAL: Purpose: Used as an abstraction of a datasource invocation.
Author
James Sutherland
Since
OracleAS TopLink 10g (10.0.3)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
protected static final int
protected boolean
isNativeConnectionRequired

Allow connection unwrapping to be configured.

protected boolean
protected static final int
protected List<DatabaseField>
outputCursors

Keep a list of the output cursors.

protected List<Boolean>
protected List<Object>
protected List<DatasourceCall.ParameterType>
protected transient DatabaseQuery
protected static final int
protected static final int
protected static final int
protected int
protected boolean
protected Boolean
usesBinding

The call may specify that all of its parameters should/shouldn't be bound.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
appendIn(Writer writer, DatabaseField field)

INTERNAL: All values are printed as ?

public void
appendIn(Object inObject)

INTERNAL:

public void
appendIn(Object inObject, Boolean shouldBind)

INTERNAL:

public void
appendInOut(Writer writer, DatabaseField inoutField)

INTERNAL: All values are printed as ?

public void
appendInOut(DatabaseField inoutField)

INTERNAL:

public void
appendInOut(DatabaseField inoutField, Boolean shouldBind)

INTERNAL:

public void
appendInOut(Object inValueOrField, DatabaseField outField)

INTERNAL:

public void
appendInOut(Object inValueOrField, DatabaseField outField, Boolean shouldBind)

INTERNAL:

public void
appendLiteral(Writer writer, Object literal)

INTERNAL: All values are printed as ?

public void
appendLiteral(Object literal)

INTERNAL:

public void
appendLiteral(Object literal, Boolean shouldBind)

INTERNAL:

public void
appendModify(Writer writer, DatabaseField modifyField)

INTERNAL: All values are printed as ?

public void
appendModify(DatabaseField modifyField)

INTERNAL:

public void
appendModify(DatabaseField modifyField, Boolean shouldBind)

INTERNAL:

public void
appendOut(Writer writer, DatabaseField outField)

INTERNAL: All values are printed as ?

public void
appendOut(DatabaseField outField)

INTERNAL:

public void
appendOut(DatabaseField outField, Boolean shouldBind)

INTERNAL:

public void
appendOutCursor(DatabaseField outField)

INTERNAL:

public void
appendOutCursor(DatabaseField outField, Boolean shouldBind)

INTERNAL:

public void
appendParameter(Writer writer, Object parameter, boolean shouldBind, AbstractSession session)

Add the parameter using the DatasourcePlatform.

public void
appendTranslation(Writer writer, DatabaseField modifyField)

INTERNAL: All values are printed as ?

public void
appendTranslation(DatabaseField modifyField)

INTERNAL:

public void
appendTranslation(DatabaseField modifyField, Boolean shouldBind)

INTERNAL:

public boolean
areManyRowsReturned()

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

protected char
argumentMarker()

INTERNAL: Return the character to use for the argument marker.

public DatabaseQueryMechanism
buildNewQueryMechanism(DatabaseQuery query)

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

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

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

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.
protected DatabaseField
createField(String fieldName)

INTERNAL: Create a new Database Field This method can be overridden by subclasses to return other field types

protected Object
createInOutParameter(Object inValue, Object outParameter, AbstractSession session)

INTERNAL: Returns INOUT parameter.

public abstract String
getLogString(Accessor accessor)

Redeclares org.eclipse.persistence.queries.Call.getLogString.

Return the SQL string for logging purposes.
public List<DatabaseField>
getOutputCursors()

INTERNAL: Return the output cursors for this stored procedure call.

public List<Boolean>
getParameterBindings()

The parameter binding determines if the specific parameter should be bound.

public List<E>
getParameters()

The parameters are the values in order of occurrence in the SQL statement.

public List<DatasourceCall.ParameterType>
getParameterTypes()

The parameter types determine if the parameter is a modify, translation or literal type.

public DatabaseQuery
getQuery()

Back reference to query, unfortunately required for events.

public String
getQueryString()

Return the query string of the call.

public int
getReturnType()

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

protected Object
getValueForInOutParameter(Object parameter, AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: Returns value for INOUT parameter.

protected Object
getValueForInParameter(Object parameter, AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session, boolean shouldBind)

INTERNAL: Returns value for IN parameter.

private boolean
hasArgumentMark(String
string to search
string
,
char
mark to find
mark
,
char
quote char (usually ' or ")
quote
)

Return true if the specific mark is existing and not quoted around.

public boolean
hasOutputCursors()

Return true if there are output cursors on this call.

public boolean
hasParameters()

The parameters are the values in order of occurrence in call.

public boolean
isCursorReturned()

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

public boolean
public boolean
isExecuteUpdate()

Returns true if this call returns from a statement.execute call.

public boolean
isFinished()

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

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

Return if the call requires usage of a native (unwrapped) JDBC connection.

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 static boolean
public boolean
isPrepared()

Bound calls can have the SQL pre generated.

public boolean
public boolean
isReturnSet()

Return if the call's return type has been set.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
isUsesBindingSet()

INTERNAL Indicates whether usesBinding has been set.

public void
prepare(AbstractSession session)

Allow pre-printing of the query/SQL string for fully bound calls, to save from reprinting.

private void
readObject(ObjectInputStream in)

INTERNAL: This method is used to correct parameterTypes which are compared to static values using == equality, which changes during serialization/deserialization.

public void
returnCursor()

Cursor return is used for cursored streams.

public void
returnManyRows()

Many rows are returned for read-all queries.

public void
returnNothing()

No return is used for modify calls like insert / update / delete.

public void
returnOneRow()

One row is returned for read-object queries.

public void
setExecuteUpdate()

Indicates that this call will return a boolean value from an execute() call.

public void
setIsNativeConnectionRequired(boolean isNativeConnectionRequired)

Set if the call requires usage of a native (unwrapped) JDBC connection.

public void
setIsPrepared(boolean isPrepared)

Bound calls can have the SQL pre generated.

public void
setParameterBindings(List<Boolean> parameterBindings)

The parameter binding determines if the specific parameter should be bound.

public void
setParameters(List<E> parameters)

The parameters are the values in order of occurrence in the SQL statement.

public void
setParameterTypes(List<DatasourceCall.ParameterType> parameterTypes)

The parameter types determine if the parameter is a modify, translation or literal type.

public void
setQuery(DatabaseQuery query)

Back reference to query, unfortunately required for events.

public void
setQueryString(String queryString)

Set the query string of the call.

public void
setReturnType(int returnType)

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

public void
setUsesBinding(boolean usesBinding)

Set that this call should or shouldn't bind all parameters

public void
translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

Allow the call to translate from the translation for predefined calls.

public void
translateCustomQuery()

INTERNAL: Parse the query string for # markers for custom query based on a query language.

public void
translatePureSQLCustomQuery()

INTERNAL: Parse the query string for ?

public void
translateQueryString(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: Allow the call to translate from the translation for predefined calls.

public void
translateQueryStringAndBindParameters(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: Allow the call to translate from the translation for predefined calls.

public void
translateQueryStringForParameterizedIN(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

INTERNAL: Translate only IN() parameter values (List parameters).

public boolean
usesBinding(AbstractSession session)

Convenience method

public boolean
usesBinding(DatabasePlatform databasePlatform)

Determines if this call should bind all parameters.

public Boolean
usesBinding()

INTERNAL Indicates whether usesBinding has been set.

protected String
whitespace()

INTERNAL: Return the characters that represent non-arguments names.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait