org.teiid.translator.ldap
Class IQueryToLdapSearchParser

java.lang.Object
  extended by org.teiid.translator.ldap.IQueryToLdapSearchParser

public class IQueryToLdapSearchParser
extends java.lang.Object

Utility class which translates a SQL query into an LDAP search.


Constructor Summary
IQueryToLdapSearchParser(LDAPExecutionFactory factory)
          Constructor.
 
Method Summary
 java.lang.String getNameFromElement(Column e)
          Method to get name from the supplied Element
 LDAPSearchDetails translateSQLQueryToLDAPSearch(Select query)
          Public entry point to the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IQueryToLdapSearchParser

public IQueryToLdapSearchParser(LDAPExecutionFactory factory)
Constructor.

Method Detail

translateSQLQueryToLDAPSearch

public LDAPSearchDetails translateSQLQueryToLDAPSearch(Select query)
                                                throws TranslatorException
Public entry point to the parser. Parses the IQuery object, and constructs an equivalent LDAP search filter, keeping track of the attributes of interest. Here are some example SQL queries, and the equivalent LDAP search info: SQL: select cn, managerName from people_table where managerName LIKE "John%" and cn!="Mar()" Context name: [people_table's NameInSource, e.g. (ou=people,dc=company,dc=com)] LDAP attributes: (cn, String), (managerName, String) LDAP search filter: (&(managerName="John*")(!(cn="Mar\(\)")))

Parameters:
query - the query
Returns:
the LDAPSearchDetails object
Throws:
TranslatorException

getNameFromElement

public java.lang.String getNameFromElement(Column e)
Method to get name from the supplied Element

Parameters:
e - the supplied Element
Returns:
the name


Copyright © 2010. All Rights Reserved.