Skip navigation links
oracle.toplink.essentials.internal.databaseaccess

Class DatasourceCall

    • Field Detail

      • parameters

        protected transient Vector parameters
      • parameterTypes

        protected transient Vector parameterTypes
      • LITERAL

        public static final Integer LITERAL
      • MODIFY

        public static final Integer MODIFY
      • TRANSLATION

        public static final Integer TRANSLATION
      • CUSTOM_MODIFY

        public static final Integer CUSTOM_MODIFY
      • OUT

        public static final Integer OUT
      • INOUT

        public static final Integer INOUT
      • IN

        public static final Integer IN
      • OUT_CURSOR

        public static final Integer OUT_CURSOR
      • isPrepared

        protected boolean isPrepared
      • returnType

        protected int returnType
    • Constructor Detail

      • DatasourceCall

        public DatasourceCall()
    • Method Detail

      • getParameters

        public Vector getParameters()
        The parameters are the values in order of occurance in the SQL statement. This is lazy initialized to conserv space on calls that have no parameters.
      • getParameterTypes

        public Vector getParameterTypes()
        The parameter types determine if the parameter is a modify, translation or litteral type.
      • setParameters

        public void setParameters(Vector parameters)
        The parameters are the values in order of occurance in the SQL statement.
      • setParameterTypes

        public void setParameterTypes(Vector parameterTypes)
        The parameter types determine if the parameter is a modify, translation or litteral type.
      • hasParameters

        public boolean hasParameters()
        The parameters are the values in order of occurance in call. This is lazy initialized to conserv space on calls that have no parameters.
      • areManyRowsReturned

        public boolean areManyRowsReturned()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • isOutputParameterType

        public boolean isOutputParameterType(Integer parameterType)
      • isPrepared

        protected boolean isPrepared()
        Bound calls can have the SQL pre generated.
      • setIsPrepared

        protected void setIsPrepared(boolean isPrepared)
        Bound calls can have the SQL pre generated.
      • clone

        public Object clone()
        Description copied from interface: Call
        INTERNAL: Return a clone of the call.
        Specified by:
        clone in interface Call
        Overrides:
        clone in class Object
      • getLogString

        public abstract String getLogString(Accessor accessor)
        Return the SQL string for logging purposes.
        Specified by:
        getLogString in interface Call
      • getQuery

        public DatabaseQuery getQuery()
        Back reference to query, unfortunately required for events.
      • getReturnType

        public int getReturnType()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • isCursorReturned

        public boolean isCursorReturned()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • isFinished

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

        public boolean isNothingReturned()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • isOneRowReturned

        public boolean isOneRowReturned()
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • isSQLCall

        public boolean isSQLCall()
      • isStoredFunctionCall

        public boolean isStoredFunctionCall()
      • isStoredProcedureCall

        public boolean isStoredProcedureCall()
      • isEJBQLCall

        public boolean isEJBQLCall()
      • isEISInteraction

        public boolean isEISInteraction()
      • isQueryStringCall

        public boolean isQueryStringCall()
      • prepare

        public void prepare(AbstractSession session)
        Allow pre-printing of the query/SQL string for fully bound calls, to save from reprinting.
      • returnCursor

        public void returnCursor()
        Cursor return is used for cursored streams.
      • returnManyRows

        public void returnManyRows()
        Many rows are returned for read-all queries.
      • returnNothing

        public void returnNothing()
        No return is used for modify calls like insert / update / delete.
      • returnOneRow

        public void returnOneRow()
        One row is returned for read-object queries.
      • setQuery

        public void setQuery(DatabaseQuery query)
        Back reference to query, unfortunately required for events.
      • setReturnType

        public void setReturnType(int returnType)
        The return type is one of, NoReturn, ReturnOneRow or ReturnManyRows.
      • getQueryString

        public String getQueryString()
        Return the query string of the call. This must be overwritten by subclasses that support query language translation (SQLCall, XQueryCall).
      • setQueryString

        public void setQueryString(String queryString)
        Set the query string of the call. This must be overwritten by subclasses that support query language translation (SQLCall, XQueryCall).
      • translateCustomQuery

        public void translateCustomQuery()
        INTERNAL: Parse the query string for # markers for custom query based on a query language. This is used by SQLCall and XQuery call, but can be reused by other query languages.
      • translatePureSQLCustomQuery

        public void translatePureSQLCustomQuery()
        INTERNAL: Parse the query string for # markers for custom query based on a query language. This is used by SQLCall and XQuery call, but can be reused by other query languages.
      • createField

        protected DatabaseField createField(String fieldName)
        INTERNAL: Create a new Database Field This method can be overridden by subclasses to return other field types
      • appendLiteral

        public void appendLiteral(Writer writer,
                                  Object literal)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • appendTranslation

        public void appendTranslation(Writer writer,
                                      DatabaseField modifyField)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • appendModify

        public void appendModify(Writer writer,
                                 DatabaseField modifyField)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • appendIn

        public void appendIn(Writer writer,
                             DatabaseField field)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • appendInOut

        public void appendInOut(Writer writer,
                                DatabaseField inoutField)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • appendOut

        public void appendOut(Writer writer,
                              DatabaseField outField)
        INTERNAL: All values are printed as ? to allow for parameter binding or translation during the execute of the call.
      • 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.
      • argumentMarker

        protected char argumentMarker()
        INTERNAL: Return the character to use for the argument marker. ? is used in SQL, however other query languages such as XQuery need to use other markers.
      • whitespace

        protected String whitespace()
        INTERNAL: Return the characters that represent non-arguments names.
      • translateQueryString

        public void translateQueryString(AbstractRecord translationRow,
                                         AbstractRecord modifyRow,
                                         AbstractSession session)
        INTERNAL: Allow the call to translate from the translation for predefined calls.
      • getValueForInParameter

        protected Object getValueForInParameter(Object parameter,
                                                AbstractRecord translationRow,
                                                AbstractRecord modifyRow,
                                                AbstractSession session,
                                                boolean shouldBind)
        INTERNAL: Returns value for IN parameter. Called by translate and translateSQLString methods. In case shouldBind==true tries to return a DatabaseField with type instead of null, returns null only in case no DatabaseField with type was found.
      • createInOutParameter

        protected Object createInOutParameter(Object inValue,
                                              Object outParameter,
                                              AbstractSession session)
        INTERNAL: Returns INOUT parameter. Called by getValueForInOutParameter method. Descendents may override this method.

Copyright © 2021. All rights reserved.