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,ExtendedRequest,Message,Request,ResultResponseRequest,SingleReplyRequest
public class StoredProcedureRequestImpl extends 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 org.apache.directory.api.ldap.extras.extended.storedProcedure.StoredProcedureRequest
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description StoredProcedureRequestImpl()Instantiates a new stored procedure request.StoredProcedureRequestImpl(int messageId)Instantiates a new stored procedure request.StoredProcedureRequestImpl(int messageId, String procedure, String language)Instantiates a new stored procedure request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(Object type, Object value)Adds the parameter.voidaddParameter(StoredProcedureParameter parameter)Adds a parameterClass<?>getJavaParameterType(int index)Gets the java parameter type.ObjectgetJavaParameterValue(int index)Gets the java parameter value.StringgetLanguage()Gets the language.List<StoredProcedureParameter>getParameters()ObjectgetParameterType(int index)Gets the parameter type.ObjectgetParameterTypeString(int index)Get the parameter typeObjectgetParameterValue(int index)Gets the parameter value.ObjectgetParameterValueString(int index)Get a parameter valuebyte[]getProcedure()StringgetProcedureSpecification()Gets the procedure specification.StoredProcedureResponsegetResultResponse()The result containing response for this request.voidsetLanguage(String language)Sets the language.voidsetProcedure(byte[] procedure)voidsetProcedure(String procedure)Store the procedure's nameintsize()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 java.lang.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
-
-
-
-
Method Detail
-
getLanguage
public String getLanguage()
Gets the language.- Specified by:
getLanguagein interfaceStoredProcedureRequest- Returns:
- the language
-
setLanguage
public void setLanguage(String language)
Sets the language.- Specified by:
setLanguagein interfaceStoredProcedureRequest- Parameters:
language- the new language
-
getProcedure
public byte[] getProcedure()
- Specified by:
getProcedurein interfaceStoredProcedureRequest- Returns:
- The byte[] containing the procedure's bytecode
-
setProcedure
public void setProcedure(byte[] procedure)
- Specified by:
setProcedurein interfaceStoredProcedureRequest- Parameters:
procedure- The procedure's bytecode
-
getParameters
public List<StoredProcedureParameter> getParameters()
- Specified by:
getParametersin interfaceStoredProcedureRequest- Returns:
- The list of parameters for this stored procedure
-
addParameter
public void addParameter(StoredProcedureParameter parameter)
Adds a parameter- Specified by:
addParameterin interfaceStoredProcedureRequest- 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:
getProcedureSpecificationin interfaceStoredProcedureRequest- Returns:
- the procedure specification
-
size
public int size()
Size.- Specified by:
sizein interfaceStoredProcedureRequest- Returns:
- the procedure's bytcode size
-
getParameterType
public Object getParameterType(int index)
Gets the parameter type.- Specified by:
getParameterTypein interfaceStoredProcedureRequest- 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:
getJavaParameterTypein interfaceStoredProcedureRequest- Parameters:
index- the index- Returns:
- the java parameter type
-
getParameterValue
public Object getParameterValue(int index)
Gets the parameter value.- Specified by:
getParameterValuein interfaceStoredProcedureRequest- 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:
getJavaParameterValuein interfaceStoredProcedureRequest- Parameters:
index- the index- Returns:
- the java parameter value
-
addParameter
public void addParameter(Object type, Object value)
Adds the parameter.- Specified by:
addParameterin interfaceStoredProcedureRequest- Parameters:
type- the typevalue- the value
-
getResultResponse
public StoredProcedureResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponsein interfaceResultResponseRequest- Overrides:
getResultResponsein classOpaqueExtendedRequest- Returns:
- the result containing response for this request
-
-