Package org.eclipse.persistence.queries
Class StoredFunctionCall
- java.lang.Object
-
- org.eclipse.persistence.internal.databaseaccess.DatasourceCall
-
- org.eclipse.persistence.internal.databaseaccess.DatabaseCall
-
- org.eclipse.persistence.queries.StoredProcedureCall
-
- org.eclipse.persistence.queries.StoredFunctionCall
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Call
public class StoredFunctionCall extends StoredProcedureCall
Purpose: Used to define a platform independent function call. Note that not all platforms support stored functions. This supports output parameters. Functions can also be called through custom SQL.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.queries.StoredProcedureCall
optionalArguments, procedureArgumentNames, procedureName
-
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabaseCall
executeReturnValue, fields, fieldsArray, firstResult, FIRSTRESULT_FIELD, generatedKeys, hasAllocatedConnection, hasMultipleResultSets, hasOptimisticLock, ignoreFirstRowSetting, ignoreMaxResultsSetting, isBatchExecutionSupported, isCallableStatementRequired, isCursorOutputProcedure, isFieldMatchingRequired, isMultipleCursorOutputProcedure, isResultSetScrollable, MAXROW_FIELD, maxRows, queryTimeout, queryTimeoutUnit, result, resultSetConcurrency, resultSetFetchSize, resultSetType, returnMultipleResultSetCollections, returnsResultSet, shouldBuildOutputRow, shouldCacheStatement, shouldReturnGeneratedKeys, sqlString, statement, usesBinding
-
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
EXECUTE_UPDATE, isNativeConnectionRequired, isPrepared, NO_RETURN, outputCursors, parameterBindings, parameters, parameterTypes, query, RETURN_CURSOR, RETURN_MANY_ROWS, RETURN_ONE_ROW, returnType, shouldProcessTokenInQuotes
-
-
Constructor Summary
Constructors Constructor Description StoredFunctionCall()
StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.Class javaType)
StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.Class javaType, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.String javaTypeClassName)
StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.String javaTypeClassName, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCallHeader(org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
INTERNAL: Return call header for the call string.int
getFirstParameterIndexForCallString()
INTERNAL: Return the first index of parameter to be placed inside brackets in the call string.boolean
isStoredFunctionCall()
INTERNAL:void
prepareInternal(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:void
setResult(int type, java.lang.String typeName, java.lang.Class javaType)
PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return.void
setResult(int type, java.lang.String typeName, java.lang.Class javaType, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return.void
setResult(java.lang.String name)
PUBLIC: Define the field name to be substitute for the function return.void
setResult(java.lang.String name, int type)
PUBLIC: Define the field name to be substitute for the function return.void
setResult(java.lang.String name, int type, java.lang.String typeName)
PUBLIC: Define the field name to be substitute for the function return.void
setResult(java.lang.String name, java.lang.Class type)
PUBLIC: Define the field name to be substitute for the function return.void
setResultCursor()
PUBLIC: Define to return cursor as result.-
Methods inherited from class org.eclipse.persistence.queries.StoredProcedureCall
addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgument, addNamedArgumentValue, addNamedCursorOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgument, addNamedInOutputArgumentValue, addNamedOutputArgument, addNamedOutputArgument, addNamedOutputArgument, addNamedOutputArgument, addNamedOutputArgument, addNamedOutputArgument, addNamedOutputArgument, addOptionalArgument, addUnamedArgument, addUnamedArgument, addUnamedArgument, addUnamedArgument, addUnamedArgument, addUnamedArgumentValue, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgument, addUnamedInOutputArgumentValue, addUnamedOutputArgument, addUnamedOutputArgument, addUnamedOutputArgument, addUnamedOutputArgument, addUnamedOutputArgument, addUnamedOutputArgument, addUnnamedCursorOutputArgument, bindParameter, getLogString, getOptionalArguments, getOutputParameterValue, getProcedureArgumentNames, getProcedureName, hasOptionalArguments, isCallableStatementRequired, isStoredProcedureCall, prepareStatement, setHasMultipleResultSets, setOptionalArguments, setProcedureArgumentNames, setProcedureName, setReturnsResultSet, toString, useCursorOutputResultSet, useNamedCursorOutputAsResultSet, useUnnamedCursorOutputAsResultSet, useUnnamedCursorOutputAsResultSet
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabaseCall
addContext, appendLogParameters, appendParameter, buildNewQueryMechanism, buildOutputRow, buildQueryMechanism, createInOutParameter, getCallString, getContexts, getCursorOutIndex, getExecuteReturnValue, getFields, getFieldsArray, getFieldWithTypeFromDescriptor, getFirstResult, getGeneratedKeys, getMaxRows, getOutputParameterValue, getOutputRowFields, getQueryString, getQueryTimeout, getResult, getResultSetConcurrency, getResultSetFetchSize, getResultSetType, getReturnsResultSet, getSQLString, getStatement, hasAllocatedConnection, hasMultipleResultSets, hasOptimisticLock, isBatchExecutionSupported, isCursorOutputProcedure, isCursorReturned, isDynamicCall, isFieldMatchingRequired, isFinished, isLOBLocatorNeeded, isMultipleCursorOutputProcedure, isNonCursorOutputProcedure, isResultSetScrollable, matchFieldOrder, prepare, prepareInternalParameters, returnMultipleResultSetCollections, setBatchExecutionSupported, setContexts, setExecuteReturnValue, setFields, setFirstResult, setGeneratedKeys, setHasAllocatedConnection, setHasOptimisticLock, setIgnoreFirstRowSetting, setIgnoreMaxResultsSetting, setIsCallableStatementRequired, setIsCursorOutputProcedure, setIsFieldMatchingRequired, setIsMultipleCursorOutputProcedure, setIsResultSetScrollable, setMaxRows, setQueryString, setQueryTimeout, setQueryTimeoutUnit, setResult, setResultSetConcurrency, setResultSetFetchSize, setResultSetType, setReturnMultipleResultSetCollections, setShouldBuildOutputRow, setShouldCacheStatement, setShouldReturnGeneratedKeys, setSQLStringInternal, setStatement, shouldBuildOutputRow, shouldCacheStatement, shouldCacheStatement, shouldIgnoreFirstRowSetting, shouldIgnoreMaxResultsSetting, shouldReturnGeneratedKeys, translate
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
appendIn, appendIn, appendIn, appendInOut, appendInOut, appendInOut, appendInOut, appendInOut, appendLiteral, appendLiteral, appendLiteral, appendModify, appendModify, appendModify, appendOut, appendOut, appendOut, appendOutCursor, appendOutCursor, appendTranslation, appendTranslation, appendTranslation, areManyRowsReturned, argumentMarker, clone, createField, getOutputCursors, getParameterBindings, getParameters, getParameterTypes, getQuery, getReturnType, getValueForInOutParameter, getValueForInParameter, hasOutputCursors, hasParameters, isEISInteraction, isExecuteUpdate, isJPQLCall, isNativeConnectionRequired, isNothingReturned, isOneRowReturned, isOutputParameterType, isPrepared, isQueryStringCall, isReturnSet, isSQLCall, isStoredPLSQLFunctionCall, isStoredPLSQLProcedureCall, isUsesBindingSet, returnCursor, returnManyRows, returnNothing, returnOneRow, setExecuteUpdate, setIsNativeConnectionRequired, setIsPrepared, setParameterBindings, setParameters, setParameterTypes, setQuery, setReturnType, setUsesBinding, translateCustomQuery, translatePureSQLCustomQuery, translateQueryString, translateQueryStringAndBindParameters, translateQueryStringForParameterizedIN, usesBinding, usesBinding, usesBinding, whitespace
-
-
-
-
Constructor Detail
-
StoredFunctionCall
public StoredFunctionCall()
-
StoredFunctionCall
public StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.Class javaType)
-
StoredFunctionCall
public StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.Class javaType, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
-
StoredFunctionCall
public StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.String javaTypeClassName)
-
StoredFunctionCall
public StoredFunctionCall(int sqlType, java.lang.String sqlTypeName, java.lang.String javaTypeClassName, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
-
-
Method Detail
-
getCallHeader
public java.lang.String getCallHeader(org.eclipse.persistence.internal.databaseaccess.DatabasePlatform platform)
INTERNAL: Return call header for the call string.- Overrides:
getCallHeader
in classStoredProcedureCall
-
getFirstParameterIndexForCallString
public int getFirstParameterIndexForCallString()
INTERNAL: Return the first index of parameter to be placed inside brackets in the call string.- Overrides:
getFirstParameterIndexForCallString
in classStoredProcedureCall
-
isStoredFunctionCall
public boolean isStoredFunctionCall()
INTERNAL:- Overrides:
isStoredFunctionCall
in classorg.eclipse.persistence.internal.databaseaccess.DatasourceCall
-
prepareInternal
public void prepareInternal(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:- Overrides:
prepareInternal
in classStoredProcedureCall
-
setResult
public void setResult(java.lang.String name)
PUBLIC: Define the field name to be substitute for the function return.
-
setResult
public void setResult(java.lang.String name, java.lang.Class type)
PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
-
setResult
public void setResult(java.lang.String name, int type, java.lang.String typeName)
PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
-
setResult
public void setResult(int type, java.lang.String typeName, java.lang.Class javaType)
PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types. The javaType is the mapped Class that has an ObjectRelationalDataTypeDescriptor for the ARRAY or STRUCT type typeName
-
setResult
public void setResult(int type, java.lang.String typeName, java.lang.Class javaType, org.eclipse.persistence.internal.helper.DatabaseField nestedType)
PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return. This will typically be called for ARRAY types. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY types. The javaType is the mapped Class that has an ObjectRelationalDataTypeDescriptor for the ARRAY type typeName The nestedType is a database field representing the type the ARRAY holds onto.
-
setResult
public void setResult(java.lang.String name, int type)
PUBLIC: Define the field name to be substitute for the function return. The type is the type of Java class desired back from the function, this is dependent on the type returned from the function.
-
setResultCursor
public void setResultCursor()
PUBLIC: Define to return cursor as result.
-
-