Skip navigation links
org.eclipse.persistence.internal.databaseaccess

Class DatabaseCall

    • Field Detail

      • MAXROW_FIELD

        public static DatabaseField MAXROW_FIELD
        Following fields are used to bind MaxResults and FirstRow settings into the query instead of using the values stored in the call.
      • FIRSTRESULT_FIELD

        public static DatabaseField FIRSTRESULT_FIELD
    • Constructor Detail

      • DatabaseCall

        public DatabaseCall()
    • Method Detail

      • hasMultipleResultSets

        public boolean hasMultipleResultSets()
        Return if the call returns multiple result sets.
      • setHasMultipleResultSets

        public void setHasMultipleResultSets(boolean hasMultipleResultSets)
        Set if the call returns multiple result sets.
      • appendIn

        public void appendIn(Object inObject)
        INTERNAL:
      • appendInOut

        public void appendInOut(DatabaseField inoutField)
        INTERNAL:
      • appendInOut

        public void appendInOut(Object inValueOrField,
                                DatabaseField outField)
        INTERNAL:
      • appendOut

        public void appendOut(DatabaseField outField)
        INTERNAL:
      • appendOutCursor

        public void appendOutCursor(DatabaseField outField)
        INTERNAL:
      • appendParameter

        public void appendParameter(Writer writer,
                                    Object parameter,
                                    AbstractSession session)
        Add the parameter. If using binding bind the parameter otherwise let the platform print it. The platform may also decide to bind the value.
        Overrides:
        appendParameter in class DatasourceCall
      • bindParameter

        public void bindParameter(Writer writer,
                                  Object parameter)
        Bind the parameter. Binding is determined by the call and second the platform.
      • getCallString

        public String getCallString()
        INTERNAL: Return the SQL string for the call.
      • getFields

        public Vector getFields()
        The fields expected by the calls result set. null means that the fields are unknown and should be built from the result set.
      • getFieldsArray

        public DatabaseField[] getFieldsArray()
        INTERNAL: The array of fields returned by the call.
      • getCursorOutIndex

        public int getCursorOutIndex()
        INTERNAL: Return 1-based index of out cursor parameter, or -1.
      • getExecuteReturnValue

        public boolean getExecuteReturnValue()
        After an execute call the return value can be retrieved here.
      • getFirstResult

        public int getFirstResult()
        get first result
      • getMaxRows

        public int getMaxRows()
        get max rows returned from the call
      • getOutputRowFields

        public Vector getOutputRowFields()
        INTERNAL Returns the fields to be used in output row.
      • getOutputCursors

        public List<DatabaseField> getOutputCursors()
        INTERNAL: Return the output cursors for this stored procedure call.
      • getQueryTimeout

        public int getQueryTimeout()
        Get timeout limit from the call
      • getResult

        public ResultSet getResult()
        The result set is stored for the return value of cursor selects.
      • getReturnsResultSet

        public boolean getReturnsResultSet()
        ADVANCED: This method returns a value that represents if the customer has set whether or not EclipseLink should expect the stored procedure to returning a JDBC ResultSet. The result of the method corresponds to false, true.
      • getResultSetConcurrency

        public int getResultSetConcurrency()
      • getResultSetFetchSize

        public int getResultSetFetchSize()
      • getResultSetType

        public int getResultSetType()
      • getSQLString

        public String getSQLString()
        Return the SQL string that will be executed.
      • getStatement

        public Statement getStatement()
        The statement is stored for the return value of cursor selects.
      • hasOptimisticLock

        public boolean hasOptimisticLock()
        This check is needed only when doing batch writing.
      • hasOutputCursors

        public boolean hasOutputCursors()
        Return true if there are output cursors on this call.
      • isCursorOutputProcedure

        public boolean isCursorOutputProcedure()
        Used for Oracle result sets through procedures.
      • isCursorReturned

        public boolean isCursorReturned()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
        Overrides:
        isCursorReturned in class DatasourceCall
      • isFieldMatchingRequired

        public boolean isFieldMatchingRequired()
        Return if field matching is required. Field matching is required for custom SQL statements where the result set field order is not known.
      • isFinished

        public boolean isFinished()
        Return whether all the results of the call have been returned.
        Specified by:
        isFinished in interface Call
        Overrides:
        isFinished in class DatasourceCall
      • isMultipleCursorOutputProcedure

        public boolean isMultipleCursorOutputProcedure()
        Used for Oracle result sets through procedures.
      • isNonCursorOutputProcedure

        public boolean isNonCursorOutputProcedure()
        Return true for procedures with any output (or in/out) parameters and no cursors
      • isResultSetScrollable

        public boolean isResultSetScrollable()
      • matchFieldOrder

        public void matchFieldOrder(ResultSet resultSet,
                                    DatabaseAccessor accessor,
                                    AbstractSession session)
        Allow for the field order to be matched if required. This is required for custom SQL.
      • prepare

        public void prepare(AbstractSession session)
        INTERNAL: Allow pre-printing of the SQL string for fully bound calls, to save from reprinting. Should be called before translation.
        Overrides:
        prepare in class DatasourceCall
      • returnMultipleResultSetCollections

        public boolean returnMultipleResultSetCollections()
        Return true if the multiple results 'lists' should be returned.
      • setFields

        public void setFields(Vector fields)
        The fields expected by the calls result set.
      • setFirstResult

        public void setFirstResult(int firstResult)
        The firstResult set on the result set
      • setHasOptimisticLock

        public void setHasOptimisticLock(boolean hasOptimisticLock)
        This check is needed only when doing batch writing and we hit on optimistic locking.
      • setIgnoreFirstRowSetting

        public void setIgnoreFirstRowSetting(boolean ignoreFirstRowSetting)
        INTERNAL: Sets the ignoreFirstRowSetting flag. If true, FirstResult option are assumed built into the SQL string and ignored if set in the call, and instead are added as query arguments. Default is false.
      • setIgnoreMaxResultsSetting

        public void setIgnoreMaxResultsSetting(boolean ignoreMaxResultsSetting)
        INTERNAL: Sets the ignoreMaxResultsSetting flag. If true, MaxRows option are assumed built into the SQL string and ignored if set in the call, and instead are added as query arguments. Default is false.
      • setIsCursorOutputProcedure

        public void setIsCursorOutputProcedure(boolean isCursorOutputProcedure)
        Used for Oracle result sets through procedures.
      • setIsFieldMatchingRequired

        public void setIsFieldMatchingRequired(boolean isFieldMatchingRequired)
        Field matching is required for custom SQL statements where the result set field order is not known.
      • setIsMultipleCursorOutputProcedure

        public void setIsMultipleCursorOutputProcedure(boolean isMultipleCursorOutputProcedure)
        Used for Oracle result sets through procedures.
      • setIsResultSetScrollable

        public void setIsResultSetScrollable(boolean isResultSetScrollable)
      • setMaxRows

        public void setMaxRows(int maxRows)
        set query max returned row size to the JDBC Statement
      • setQueryTimeout

        public void setQueryTimeout(int queryTimeout)
        set query timeout limit to the JDBC Statement
      • setResult

        public void setResult(ResultSet result)
        The result set is stored for the return value of cursor selects.
      • setResultSetConcurrency

        public void setResultSetConcurrency(int resultSetConcurrency)
      • setResultSetFetchSize

        public void setResultSetFetchSize(int resultSetFetchSize)
      • setResultSetType

        public void setResultSetType(int resultSetType)
      • setReturnsResultSet

        public void setReturnsResultSet(boolean returnsResultSet)
        PUBLIC: Use this method to tell EclipseLink that the stored procedure will be returning a JDBC ResultSet
      • setReturnMultipleResultSetCollections

        public void setReturnMultipleResultSetCollections(boolean returnMultipleResultSetCollections)
        Set if the call returns multiple result sets.
      • setShouldCacheStatement

        public void setShouldCacheStatement(boolean shouldCacheStatement)
        Bound calls can use prepared statement caching.
      • setStatement

        public void setStatement(Statement statement)
        The statement is stored for the return value of cursor selects.
      • setUsesBinding

        public void setUsesBinding(boolean usesBinding)
        The call may specify that its parameters should be bound.
      • shouldBuildOutputRow

        public boolean shouldBuildOutputRow()
        Set whether the call has to build output row
      • shouldCacheStatement

        public boolean shouldCacheStatement(AbstractSession session)
        Bound calls can use prepared statement caching.
      • shouldCacheStatement

        public boolean shouldCacheStatement(DatabasePlatform databasePlatform)
        Bound calls can use prepared statement caching.
      • shouldIgnoreFirstRowSetting

        public boolean shouldIgnoreFirstRowSetting()
        INTERNAL: Returns the ignoreFirstRowSetting flag. If true, FirstResult option is assumed built into the SQL string and ignored if set in the call.
      • shouldIgnoreMaxResultsSetting

        public boolean shouldIgnoreMaxResultsSetting()
        INTERNAL: Returns the ignoreMaxResultsSetting flag. If true, MaxRows option is assumed built into the SQL string and ignored if set in the call.
      • toString

        public String toString()
        INTERNAL: Print the SQL string.
        Overrides:
        toString in class Object
      • translateQueryStringForParameterizedIN

        public void translateQueryStringForParameterizedIN(AbstractRecord translationRow,
                                                           AbstractRecord modifyRow,
                                                           AbstractSession session)
        INTERNAL: Translate only IN() parameter values (List parameters).
      • usesBinding

        public boolean usesBinding(AbstractSession session)
        The call may specify that its parameters should be bound.
      • usesBinding

        public boolean usesBinding(DatabasePlatform databasePlatform)
        The call may specify that its parameters should be bound.
      • isUsesBindingSet

        public boolean isUsesBindingSet()
        INTERNAL Indicates whether usesBinding has been set.
      • isLOBLocatorNeeded

        public boolean isLOBLocatorNeeded()
        INTERNAL: Return if the locator is required for the LOB (BLOB and CLOB) writing.
      • addContext

        public void addContext(DatabaseField field,
                               Object value)
        INTERNAL: Add a field - value pair for LOB field into the context.
      • getContexts

        public AbstractRecord getContexts()
        INTERNAL: Return the contexts (for LOB)
      • setContexts

        public void setContexts(AbstractRecord contexts)
        INTERNAL: Set the contexts (for LOB)
      • setExecuteReturnValue

        public void setExecuteReturnValue(boolean value)
        An execute return value will be set here after the call.
      • useUnnamedCursorOutputAsResultSet

        public void useUnnamedCursorOutputAsResultSet()
        PUBLIC: Used for Oracle result sets through procedures. The first OUT parameter is set as a cursor output.
      • isBatchExecutionSupported

        public boolean isBatchExecutionSupported()
        INTERNAL: Return if this query is compatible with batch writing. Some queries, such as DDL are not compatible.
      • setBatchExecutionSupported

        public void setBatchExecutionSupported(boolean isBatchExecutionSupported)
        INTERNAL: Set if this query is compatible with batch writing. Some queries, such as DDL are not compatible.
      • hasAllocatedConnection

        public boolean hasAllocatedConnection()
        INTERNAL:
      • setHasAllocatedConnection

        public void setHasAllocatedConnection(boolean hasAllocatedConnection)
        INTERNAL:

EclipseLink 2.5.2, "build v20140319-9ad6abd" API Reference