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 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 void
addParameter(Object type, Object value)
Adds the parameter.void
addParameter(StoredProcedureParameter parameter)
Adds a parameterClass<?>
getJavaParameterType(int index)
Gets the java parameter type.Object
getJavaParameterValue(int index)
Gets the java parameter value.String
getLanguage()
Gets the language.List<StoredProcedureParameter>
getParameters()
Object
getParameterType(int index)
Gets the parameter type.Object
getParameterTypeString(int index)
Get the parameter typeObject
getParameterValue(int index)
Gets the parameter value.Object
getParameterValueString(int index)
Get a parameter valuebyte[]
getProcedure()
String
getProcedureSpecification()
Gets the procedure specification.StoredProcedureResponse
getResultResponse()
The result containing response for this request.void
setLanguage(String language)
Sets the language.void
setProcedure(byte[] procedure)
void
setProcedure(String procedure)
Store the procedure's nameint
size()
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 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 Detail
-
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 idprocedure
- the procedurelanguage
- the language
-
-
Method Detail
-
getLanguage
public String getLanguage()
Gets the language.- Specified by:
getLanguage
in interfaceStoredProcedureRequest
- Returns:
- the language
-
setLanguage
public void setLanguage(String language)
Sets the language.- Specified by:
setLanguage
in interfaceStoredProcedureRequest
- Parameters:
language
- the new language
-
getProcedure
public byte[] getProcedure()
- Specified by:
getProcedure
in interfaceStoredProcedureRequest
- Returns:
- The byte[] containing the procedure's bytecode
-
setProcedure
public void setProcedure(byte[] procedure)
- Specified by:
setProcedure
in interfaceStoredProcedureRequest
- Parameters:
procedure
- The procedure's bytecode
-
getParameters
public List<StoredProcedureParameter> getParameters()
- Specified by:
getParameters
in interfaceStoredProcedureRequest
- Returns:
- The list of parameters for this stored procedure
-
addParameter
public void addParameter(StoredProcedureParameter parameter)
Adds a parameter- Specified by:
addParameter
in 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:
getProcedureSpecification
in interfaceStoredProcedureRequest
- Returns:
- the procedure specification
-
size
public int size()
Size.- Specified by:
size
in interfaceStoredProcedureRequest
- Returns:
- the procedure's bytcode size
-
getParameterType
public Object getParameterType(int index)
Gets the parameter type.- Specified by:
getParameterType
in 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:
getJavaParameterType
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the java parameter type
-
getParameterValue
public Object getParameterValue(int index)
Gets the parameter value.- Specified by:
getParameterValue
in 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:
getJavaParameterValue
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the java parameter value
-
addParameter
public void addParameter(Object type, Object value)
Adds the parameter.- Specified by:
addParameter
in interfaceStoredProcedureRequest
- Parameters:
type
- the typevalue
- the value
-
getResultResponse
public StoredProcedureResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Overrides:
getResultResponse
in classOpaqueExtendedRequest
- Returns:
- the result containing response for this request
-
-