Package org.teiid.translator.ldap
Class IQueryToLdapSearchParser
- java.lang.Object
-
- org.teiid.translator.ldap.IQueryToLdapSearchParser
-
public class IQueryToLdapSearchParser extends Object
Utility class which translates a SQL query into an LDAP search.
-
-
Constructor Summary
Constructors Constructor Description IQueryToLdapSearchParser(LDAPExecutionFactory factory)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPSearchDetailsbuildRequest(String query)LDAPSearchDetailstranslateSQLQueryToLDAPSearch(Select query)Public entry point to the parser.
-
-
-
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
-
buildRequest
public LDAPSearchDetails buildRequest(String query) throws TranslatorException
- Throws:
TranslatorException
-
-