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

public Class StoredFunctionCall

extends StoredProcedureCall
Class Inheritance
Imports
org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.databaseaccess.DatabasePlatform, org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.mappings.structures.ObjectRelationalDatabaseField

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.

Field Summary

Inherited from org.eclipse.persistence.queries.StoredProcedureCall:
optionalArgumentsprocedureArgumentNamesprocedureName

Constructor Summary

AccessConstructor and Description
public
public
StoredFunctionCall(int sqlType, String sqlTypeName, Class<?> javaType)

public
StoredFunctionCall(int sqlType, String sqlTypeName, Class<?> javaType, DatabaseField nestedType)

public
StoredFunctionCall(int sqlType, String sqlTypeName, String javaTypeClassName)

public
StoredFunctionCall(int sqlType, String sqlTypeName, String javaTypeClassName, DatabaseField nestedType)

Method Summary

Modifier and TypeMethod and Description
public String
getCallHeader(DatabasePlatform platform)

Overrides org.eclipse.persistence.queries.StoredProcedureCall.getCallHeader.

INTERNAL: Return call header for the call string.
public int
getFirstParameterIndexForCallString()

Overrides org.eclipse.persistence.queries.StoredProcedureCall.getFirstParameterIndexForCallString.

INTERNAL: Return the first index of parameter to be placed inside brackets in the call string.
public boolean
public void
public void
setResult(String name)

PUBLIC: Define the field name to be substitute for the function return.

public void
setResult(String name, Class<?> type)

PUBLIC: Define the field name to be substitute for the function return.

public void
setResult(String name, int type, String typeName)

PUBLIC: Define the field name to be substitute for the function return.

public void
setResult(int type, String typeName, Class<?> javaType)

PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return.

public void
setResult(int type, String typeName, Class<?> javaType, DatabaseField nestedType)

PUBLIC: Define the ObjectRelationalDatabaseField to be substituted for the function return.

public void
setResult(String name, int type)

PUBLIC: Define the field name to be substitute for the function return.

public void
setResultCursor()

PUBLIC: Define to return cursor as result.

Inherited from org.eclipse.persistence.queries.StoredProcedureCall:
addNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentaddNamedArgumentValueaddNamedCursorOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentaddNamedInOutputArgumentValueaddNamedOutputArgumentaddNamedOutputArgumentaddNamedOutputArgumentaddNamedOutputArgumentaddNamedOutputArgumentaddNamedOutputArgumentaddNamedOutputArgumentaddOptionalArgumentaddUnamedArgumentaddUnamedArgumentaddUnamedArgumentaddUnamedArgumentaddUnamedArgumentaddUnamedArgumentValueaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentaddUnamedInOutputArgumentValueaddUnamedOutputArgumentaddUnamedOutputArgumentaddUnamedOutputArgumentaddUnamedOutputArgumentaddUnamedOutputArgumentaddUnamedOutputArgumentaddUnnamedCursorOutputArgumentbindParametergetLogStringgetOptionalArgumentsgetOutputParameterValuegetProcedureArgumentNamesgetProcedureNamehasOptionalArgumentsisCallableStatementRequiredisStoredProcedureCallprepareStatementsetHasMultipleResultSetssetOptionalArgumentssetProcedureArgumentNamessetProcedureNamesetReturnsResultSettoStringuseCursorOutputResultSetuseNamedCursorOutputAsResultSetuseUnnamedCursorOutputAsResultSetuseUnnamedCursorOutputAsResultSet

Constructor Detail

StoredFunctionCallback to summary
public StoredFunctionCall()
StoredFunctionCallback to summary
public StoredFunctionCall(int sqlType, String sqlTypeName, Class<?> javaType)
StoredFunctionCallback to summary
public StoredFunctionCall(int sqlType, String sqlTypeName, Class<?> javaType, DatabaseField nestedType)
StoredFunctionCallback to summary
public StoredFunctionCall(int sqlType, String sqlTypeName, String javaTypeClassName)
StoredFunctionCallback to summary
public StoredFunctionCall(int sqlType, String sqlTypeName, String javaTypeClassName, DatabaseField nestedType)

Method Detail

getCallHeaderback to summary
public String getCallHeader(DatabasePlatform platform)

Overrides org.eclipse.persistence.queries.StoredProcedureCall.getCallHeader.

INTERNAL: Return call header for the call string.

Annotations
@Override
getFirstParameterIndexForCallStringback to summary
public int getFirstParameterIndexForCallString()

Overrides org.eclipse.persistence.queries.StoredProcedureCall.getFirstParameterIndexForCallString.

INTERNAL: Return the first index of parameter to be placed inside brackets in the call string.

Annotations
@Override
isStoredFunctionCallback to summary
public boolean isStoredFunctionCall()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.isStoredFunctionCall.

INTERNAL:

Annotations
@Override
prepareInternalback to summary
public void prepareInternal(AbstractSession session)

Overrides org.eclipse.persistence.queries.StoredProcedureCall.prepareInternal.

INTERNAL:

Annotations
@Override
setResultback to summary
public void setResult(String name)

PUBLIC: Define the field name to be substitute for the function return.

setResultback to summary
public void setResult(String name, 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.

setResultback to summary
public void setResult(String name, int type, 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.

setResultback to summary
public void setResult(int type, String typeName, 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

setResultback to summary
public void setResult(int type, String typeName, Class<?> javaType, 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.

setResultback to summary
public void setResult(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.

setResultCursorback to summary
public void setResultCursor()

PUBLIC: Define to return cursor as result.