Class IQueryToLdapSearchParser


  • public class IQueryToLdapSearchParser
    extends Object
    Utility class which translates a SQL query into an LDAP search.
    • Constructor Detail

      • IQueryToLdapSearchParser

        public IQueryToLdapSearchParser​(LDAPExecutionFactory factory)
        Constructor.
    • Method Detail

      • translateSQLQueryToLDAPSearch

        public LDAPSearchDetails translateSQLQueryToLDAPSearch​(org.teiid.language.Select query)
                                                        throws org.teiid.translator.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:
        org.teiid.translator.TranslatorException
      • buildRequest

        public LDAPSearchDetails buildRequest​(String query)
                                       throws org.teiid.translator.TranslatorException
        Throws:
        org.teiid.translator.TranslatorException