Class StoredProcedureRequestImpl

java.lang.Object
org.apache.directory.api.ldap.model.message.AbstractMessage
org.apache.directory.api.ldap.model.message.AbstractRequest
org.apache.directory.api.ldap.model.message.AbstractExtendedRequest
org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest
org.apache.directory.api.ldap.extras.extended.storedProcedure.StoredProcedureRequestImpl
All Implemented Interfaces:
StoredProcedureRequest, org.apache.directory.api.ldap.model.message.ExtendedRequest, org.apache.directory.api.ldap.model.message.Message, org.apache.directory.api.ldap.model.message.Request, org.apache.directory.api.ldap.model.message.ResultResponseRequest, org.apache.directory.api.ldap.model.message.SingleReplyRequest

public class StoredProcedureRequestImpl extends org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest implements StoredProcedureRequest
An extended operation requesting the server to execute a stored procedure.
Author:
Apache Directory Project
  • Field Summary

    Fields inherited from class org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest

    response

    Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedRequest

    oid

    Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage

    controls

    Fields inherited from interface StoredProcedureRequest

    EXTENSION_OID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new stored procedure request.
    Instantiates a new stored procedure request.
    StoredProcedureRequestImpl(int messageId, String procedure, String language)
    Instantiates a new stored procedure request.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addParameter(Object type, Object value)
    Adds the parameter.
    void
    Adds a parameter
    Gets the java parameter type.
    Gets the java parameter value.
    Gets the language.
    Get the list of parameters for this stored procedure
    getParameterType(int index)
    Gets the parameter type.
    Get the parameter type
    getParameterValue(int index)
    Gets the parameter value.
    Get a parameter value
    byte[]
    Get the procedure bytecode
    Gets the procedure specification.
    void
    setLanguage(String language)
    Sets the language.
    void
    setProcedure(byte[] procedure)
    Set the procedure bytecode
    void
    setProcedure(String procedure)
    Store the procedure's name
    int
    Size.

    Methods inherited from class org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest

    addAllControls, addControl, equals, getExtendedResponse, getRequestName, getRequestValue, getResponseType, hashCode, removeControl, setMessageId, setRequestName, setRequestValue, toString

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractExtendedRequest

    getResponse, setResponse

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest

    hasResponse

    Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage

    get, getControl, getControls, getMessageId, getType, hasControl, put, toString

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedRequest

    addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName

    Methods inherited from interface org.apache.directory.api.ldap.model.message.Message

    get, getControl, getControls, getMessageId, getType, hasControl, put

    Methods inherited from interface org.apache.directory.api.ldap.model.message.Request

    hasResponse

    Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest

    getResponseType
  • Constructor Details

    • StoredProcedureRequestImpl

      public StoredProcedureRequestImpl(int messageId)
      Instantiates a new stored procedure request.
      Parameters:
      messageId - the message id
    • StoredProcedureRequestImpl

      public StoredProcedureRequestImpl()
      Instantiates a new stored procedure request.
    • StoredProcedureRequestImpl

      public StoredProcedureRequestImpl(int messageId, String procedure, String language)
      Instantiates a new stored procedure request.
      Parameters:
      messageId - the message id
      procedure - the procedure
      language - the language
  • Method Details

    • getLanguage

      public String getLanguage()
      Gets the language.
      Specified by:
      getLanguage in interface StoredProcedureRequest
      Returns:
      the language
    • setLanguage

      public void setLanguage(String language)
      Sets the language.
      Specified by:
      setLanguage in interface StoredProcedureRequest
      Parameters:
      language - the new language
    • getProcedure

      public byte[] getProcedure()
      Get the procedure bytecode
      Specified by:
      getProcedure in interface StoredProcedureRequest
      Returns:
      The byte[] containing the procedure's bytecode
    • setProcedure

      public void setProcedure(byte[] procedure)
      Set the procedure bytecode
      Specified by:
      setProcedure in interface StoredProcedureRequest
      Parameters:
      procedure - The procedure's bytecode
    • getParameters

      public List<StoredProcedureParameter> getParameters()
      Get the list of parameters for this stored procedure
      Specified by:
      getParameters in interface StoredProcedureRequest
      Returns:
      The list of parameters for this stored procedure
    • addParameter

      public void addParameter(StoredProcedureParameter parameter)
      Adds a parameter
      Specified by:
      addParameter in interface StoredProcedureRequest
      Parameters:
      parameter - The parameter to add
    • setProcedure

      public void setProcedure(String procedure)
      Store the procedure's name
      Parameters:
      procedure - The procedure's name
    • getProcedureSpecification

      public String getProcedureSpecification()
      Gets the procedure specification.
      Specified by:
      getProcedureSpecification in interface StoredProcedureRequest
      Returns:
      the procedure specification
    • size

      public int size()
      Size.
      Specified by:
      size in interface StoredProcedureRequest
      Returns:
      the procedure's bytcode size
    • getParameterType

      public Object getParameterType(int index)
      Gets the parameter type.
      Specified by:
      getParameterType in interface StoredProcedureRequest
      Parameters:
      index - the index
      Returns:
      the parameter type
    • getParameterTypeString

      public Object getParameterTypeString(int index)
      Get the parameter type
      Parameters:
      index - The parameter position in the list of parameters
      Returns:
      The found parameter type
    • getJavaParameterType

      public Class<?> getJavaParameterType(int index)
      Gets the java parameter type.
      Specified by:
      getJavaParameterType in interface StoredProcedureRequest
      Parameters:
      index - the index
      Returns:
      the java parameter type
    • getParameterValue

      public Object getParameterValue(int index)
      Gets the parameter value.
      Specified by:
      getParameterValue in interface StoredProcedureRequest
      Parameters:
      index - the index
      Returns:
      the parameter value
    • getParameterValueString

      public Object getParameterValueString(int index)
      Get a parameter value
      Parameters:
      index - The position of the parameter in the list of parameters
      Returns:
      The paremeter's value
    • getJavaParameterValue

      public Object getJavaParameterValue(int index)
      Gets the java parameter value.
      Specified by:
      getJavaParameterValue in interface StoredProcedureRequest
      Parameters:
      index - the index
      Returns:
      the java parameter value
    • addParameter

      public void addParameter(Object type, Object value)
      Adds the parameter.
      Specified by:
      addParameter in interface StoredProcedureRequest
      Parameters:
      type - the type
      value - the value
    • getResultResponse

      public StoredProcedureResponse getResultResponse()
      Specified by:
      getResultResponse in interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
      Overrides:
      getResultResponse in class org.apache.directory.api.ldap.model.message.OpaqueExtendedRequest