org.teiid.translator.ldap
Class LDAPSyncQueryExecution

java.lang.Object
  extended by org.teiid.translator.ldap.LDAPSyncQueryExecution
All Implemented Interfaces:
Execution, ResultSetExecution

public class LDAPSyncQueryExecution
extends Object
implements ResultSetExecution

LDAPSyncQueryExecution is responsible for executing an LDAP search corresponding to a read-only "select" query from MetaMatrix.


Constructor Summary
LDAPSyncQueryExecution(Select query, LDAPExecutionFactory factory, ExecutionContext context, LdapContext ldapCtx)
          Constructor
 
Method Summary
 void cancel()
          Cancels the execution abnormally.
 void close()
          Terminates the execution normally.
 void execute()
          method to execute the supplied query
 List<?> next()
          Fetch the next batch of data from the LDAP searchEnumerationr result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPSyncQueryExecution

public LDAPSyncQueryExecution(Select query,
                              LDAPExecutionFactory factory,
                              ExecutionContext context,
                              LdapContext ldapCtx)
Constructor

Parameters:
executionMode - the execution mode.
ctx - the execution context.
logger - the ConnectorLogger
ldapCtx - the LDAP Context
Method Detail

execute

public void execute()
             throws TranslatorException
method to execute the supplied query

Specified by:
execute in interface Execution
Parameters:
query - the query object.
maxBatchSize - the max batch size.
Throws:
TranslatorException

cancel

public void cancel()
            throws TranslatorException
Description copied from interface: Execution
Cancels the execution abnormally. This will happen via a different thread from the one performing the execution, so should be expected to happen in a multi-threaded scenario.

Specified by:
cancel in interface Execution
Throws:
TranslatorException

close

public void close()
Description copied from interface: Execution
Terminates the execution normally.

Specified by:
close in interface Execution

next

public List<?> next()
             throws TranslatorException
Fetch the next batch of data from the LDAP searchEnumerationr result.

Specified by:
next in interface ResultSetExecution
Returns:
the next Batch of results.
Throws:
TranslatorException


Copyright © 2012. All Rights Reserved.