|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.internal.databaseaccess.DatasourceCall org.eclipse.persistence.internal.databaseaccess.DatabaseCall org.eclipse.persistence.queries.SQLCall
public class SQLCall
Purpose: Used as an abstraction of an SQL call. A call is an SQL string with parameters.
Field Summary | |
---|---|
protected boolean |
hasCustomSQLArguments
|
protected boolean |
isTranslatedCustomQuery
|
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabaseCall |
---|
fields, firstResult, FIRSTRESULT_FIELD, hasOptimisticLock, ignoreFirstRowSetting, ignoreMaxResultsSetting, isCallableStatementRequired, isCursorOutputProcedure, isFieldMatchingRequired, isResultSetScrollable, MAXROW_FIELD, maxRows, queryTimeout, result, resultSetConcurrency, resultSetFetchSize, resultSetType, returnsResultSet, shouldBuildOutputRow, shouldCacheStatement, sqlString, statement, usesBinding |
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall |
---|
CUSTOM_MODIFY, IN, INOUT, isNativeConnectionRequired, isPrepared, LITERAL, MODIFY, NO_RETURN, OUT, OUT_CURSOR, parameters, parameterTypes, query, RETURN_CURSOR, RETURN_MANY_ROWS, RETURN_ONE_ROW, returnType, shouldProcessTokenInQuotes, TRANSLATION |
Constructor Summary | |
---|---|
SQLCall()
PUBLIC: Create a new SQL call. |
|
SQLCall(java.lang.String sqlString)
PUBLIC: Create a new SQL call. |
Method Summary | |
---|---|
protected void |
afterTranslateCustomQuery(java.util.Vector updatedParameters,
java.util.Vector updatedParameterTypes)
INTERNAL: Set the data passed through setCustomSQLArgumentType and useCustomSQLCursorOutputAsResultSet methods. |
protected org.eclipse.persistence.internal.helper.DatabaseField |
afterTranslateCustomQueryUpdateParameter(org.eclipse.persistence.internal.helper.DatabaseField field,
int index,
java.lang.Integer parameterType,
java.util.Vector updatedParameters,
java.util.Vector updatedParameterTypes)
INTERNAL: Set the data passed through setCustomSQLArgumentType and useCustomSQLCursorOutputAsResultSet methods. |
void |
appendTranslationParameter(java.io.Writer writer,
org.eclipse.persistence.internal.expressions.ParameterExpression expression,
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform,
org.eclipse.persistence.internal.sessions.AbstractRecord record)
INTERNAL: All values are printed as ? |
boolean |
hasCustomSQLArguments()
INTERNAL: Used to avoid misinterpreting the # in custom SQL. |
boolean |
isQueryStringCall()
|
boolean |
isSQLCall()
|
protected void |
prepareInternal(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Called by prepare method only. |
void |
setCustomSQLArgumentType(java.lang.String customParameterName,
java.lang.Class type)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setCustomSQLArgumentType(java.lang.String argumentFieldName,
int type)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setCustomSQLArgumentType(java.lang.String argumentFieldName,
int type,
java.lang.String typeName)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setCustomSQLArgumentType(java.lang.String argumentFieldName,
int type,
java.lang.String typeName,
java.lang.Class javaType)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setCustomSQLArgumentType(java.lang.String argumentFieldName,
int type,
java.lang.String typeName,
java.lang.Class javaType,
org.eclipse.persistence.internal.helper.DatabaseField nestedType)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setCustomSQLArgumentType(java.lang.String argumentFieldName,
int type,
java.lang.String typeName,
org.eclipse.persistence.internal.helper.DatabaseField nestedType)
PUBLIC: This method should only be used with custom SQL: it sets a type to IN, OUT or INOUT parameter (prefixed with #, ### or #### in custom SQL string). |
void |
setHasCustomSQLArguments(boolean hasCustomSQLArguments)
INTERNAL: Used to avoid misinterpreting the # in custom SQL. |
void |
setSQLString(java.lang.String sqlString)
Set the SQL string. |
void |
translateCustomQuery()
INTERNAL: Keep track of the fact that this call has been translated. |
void |
translatePureSQLCustomQuery()
INTERNAL: Only translate the call if it was not previously translated This code ensures the translation code for a custom SQLCall is only run once In the case of inheritance we will try to call the translation code once to get the list of types and again for each subclass |
void |
useCustomSQLCursorOutputAsResultSet(java.lang.String customParameterName)
PUBLIC: This method should only be used with custom SQL: Used for Oracle result sets through procedures. |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabaseCall |
---|
addContext, appendIn, appendInOut, appendInOut, appendLogParameters, appendOut, appendOutCursor, appendParameter, bindParameter, buildNewQueryMechanism, buildOutputRow, buildQueryMechanism, createInOutParameter, getCallString, getContexts, getCursorOutIndex, getFields, getFieldWithTypeFromDescriptor, getFirstResult, getLogString, getMaxRows, getOutputRowFields, getQueryString, getQueryTimeout, getResult, getResultSetConcurrency, getResultSetFetchSize, getResultSetType, getReturnsResultSet, getSQLString, getStatement, hasOptimisticLock, isCallableStatementRequired, isCursorOutputProcedure, isCursorReturned, isDynamicCall, isFieldMatchingRequired, isFinished, isLOBLocatorNeeded, isNonCursorOutputProcedure, isResultSetScrollable, isUsesBindingSet, matchFieldOrder, prepare, prepareInternalParameters, prepareStatement, setContexts, setFields, setFirstResult, setHasOptimisticLock, setIgnoreFirstRowSetting, setIgnoreMaxResultsSetting, setIsCallableStatementRequired, setIsCursorOutputProcedure, setIsFieldMatchingRequired, setIsResultSetScrollable, setMaxRows, setQueryString, setQueryTimeout, setResult, setResultSetConcurrency, setResultSetFetchSize, setResultSetType, setReturnsResultSet, setShouldBuildOutputRow, setShouldCacheStatement, setSQLStringInternal, setStatement, setUsesBinding, shouldBuildOutputRow, shouldCacheStatement, shouldCacheStatement, shouldIgnoreFirstRowSetting, shouldIgnoreMaxResultsSetting, toString, translate, translateQueryStringForParameterizedIN, usesBinding, usesBinding, useUnnamedCursorOutputAsResultSet |
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall |
---|
appendIn, appendInOut, appendLiteral, appendModify, appendOut, appendTranslation, areManyRowsReturned, argumentMarker, clone, createField, getParameters, getParameterTypes, getQuery, getReturnType, getValueForInOutParameter, getValueForInParameter, hasParameters, isEISInteraction, isJPQLCall, isNativeConnectionRequired, isNothingReturned, isOneRowReturned, isOutputParameterType, isPrepared, isReturnSet, isStoredFunctionCall, isStoredProcedureCall, returnCursor, returnManyRows, returnNothing, returnOneRow, setIsNativeConnectionRequired, setIsPrepared, setParameters, setParameterTypes, setQuery, setReturnType, translateQueryString, whitespace |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.QueryStringCall |
---|
appendLiteral, appendModify, appendParameter, appendTranslation, getParameters, getParameterTypes, getQueryString, hasParameters, prepare, setQueryString, translate, translateQueryString |
Methods inherited from interface org.eclipse.persistence.queries.Call |
---|
buildNewQueryMechanism, buildQueryMechanism, clone, getLogString, isFinished, isNothingReturned, isOneRowReturned |
Field Detail |
---|
protected boolean hasCustomSQLArguments
protected transient boolean isTranslatedCustomQuery
Constructor Detail |
---|
public SQLCall()
public SQLCall(java.lang.String sqlString)
Method Detail |
---|
protected void afterTranslateCustomQuery(java.util.Vector updatedParameters, java.util.Vector updatedParameterTypes)
protected org.eclipse.persistence.internal.helper.DatabaseField afterTranslateCustomQueryUpdateParameter(org.eclipse.persistence.internal.helper.DatabaseField field, int index, java.lang.Integer parameterType, java.util.Vector updatedParameters, java.util.Vector updatedParameterTypes)
public boolean hasCustomSQLArguments()
public boolean isSQLCall()
isSQLCall
in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
public boolean isQueryStringCall()
isQueryStringCall
in interface org.eclipse.persistence.internal.databaseaccess.QueryStringCall
isQueryStringCall
in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
protected void prepareInternal(org.eclipse.persistence.internal.sessions.AbstractSession session)
prepareInternal
in class org.eclipse.persistence.internal.databaseaccess.DatabaseCall
public void setHasCustomSQLArguments(boolean hasCustomSQLArguments)
public void setCustomSQLArgumentType(java.lang.String customParameterName, java.lang.Class type)
public void setCustomSQLArgumentType(java.lang.String argumentFieldName, int type)
public void setCustomSQLArgumentType(java.lang.String argumentFieldName, int type, java.lang.String typeName)
public void setCustomSQLArgumentType(java.lang.String argumentFieldName, int type, java.lang.String typeName, java.lang.Class javaType)
public void setCustomSQLArgumentType(java.lang.String argumentFieldName, int type, java.lang.String typeName, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
public void setCustomSQLArgumentType(java.lang.String argumentFieldName, int type, java.lang.String typeName, java.lang.Class javaType, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
public void setSQLString(java.lang.String sqlString)
public void translateCustomQuery()
translateCustomQuery
in interface org.eclipse.persistence.internal.databaseaccess.QueryStringCall
translateCustomQuery
in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
public void translatePureSQLCustomQuery()
translatePureSQLCustomQuery
in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
public void appendTranslationParameter(java.io.Writer writer, org.eclipse.persistence.internal.expressions.ParameterExpression expression, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform, org.eclipse.persistence.internal.sessions.AbstractRecord record) throws java.io.IOException
java.io.IOException
public void useCustomSQLCursorOutputAsResultSet(java.lang.String customParameterName)
|
EclipseLink 2.2.0, build 'v20110202-r8913' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |