org.apache.directory.server.core.sp
Interface StoredProcEngine

All Known Implementing Classes:
JavaStoredProcEngine

public interface StoredProcEngine

An abstraction over stored procedure execution depending on the type of the language supported.

Version:
$Rev$ $Date$
Author:
Apache Directory Project

Method Summary
 java.lang.String getSPLangId()
          Returns the unique identifier of the supported stored procedure language.
 java.lang.Object invokeProcedure(CoreSession session, java.lang.String fullSPName, java.lang.Object[] spArgs)
          Invokes the stored procedure handled by the engine.
 void setSPUnitEntry(ServerEntry spUnit)
          Registers an entry found to be contaning a stored procedure unit which this engine can operate on.
 

Method Detail

getSPLangId

java.lang.String getSPLangId()
Returns the unique identifier of the supported stored procedure language.


setSPUnitEntry

void setSPUnitEntry(ServerEntry spUnit)
Registers an entry found to be contaning a stored procedure unit which this engine can operate on.

This method should be called before an attempt to invoke a stored procedure via this Engine.


invokeProcedure

java.lang.Object invokeProcedure(CoreSession session,
                                 java.lang.String fullSPName,
                                 java.lang.Object[] spArgs)
                                 throws java.lang.Exception
Invokes the stored procedure handled by the engine.

Parameters:
fullSPName - A fully qualified name of the stored procedure including its unit name.
spArgs - A list or arguments to be passed to the stored procedure. It should be an empty array if there aren't any parameters defined.
Returns:
The value obtained from invoked procedure. The client should know what will return exactly so that it can downcast to the appropriate type.
Throws:
NamingException - If an error occurs during invocation.
java.lang.Exception


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.