#include <SQLtoLDAPQuerier.h>
Inheritance diagram for LcgInfo::SQLtoLDAPQuerier:
Public Methods | |
SQLtoLDAPQuerier () | |
Constructor. | |
virtual | ~SQLtoLDAPQuerier () |
Destructor of the class. | |
virtual void | setConfig (LcgConfigBuffer::ConfigBuffer &pConf) |
Sets the config buffer object, so that all necessary information for queries is available. More... | |
virtual std::vector< std::vector< std::string > > | query (std::string const &pQueryCanonical) |
Translates the specified SQL query (intended to be posed to the canonical schema) and poses it to the implemented LDAP schema, (in order) to retrieve the same information. More... | |
Protected Attributes | |
LcgConfigBuffer::ConfigBuffer * | mConf |
A pointer to the object that reads the configuration file and holds the information there contained. More... | |
LcgConfigBuffer::ConfigBuffer * | mMap |
A pointer to the object that holds the mapping information (between the canonical and the implementation views of the schema). More... | |
SQLtoLDAPQueryTranslator * | mTranslator |
A pointer to the translator that will perform the translation to the original SQL query to one (or several) that can be posed to the implemented LDAP information service. | |
InfoFromLDAP * | mLdap |
A pointer to the LDAP interface that will be used to query the implemented LDAP information service. |
It extends the Querier class. All the necessary configuration information is provided using a ConfigBuffer object.
Definition at line 24 of file SQLtoLDAPQuerier.h.
|
Translates the specified SQL query (intended to be posed to the canonical schema) and poses it to the implemented LDAP schema, (in order) to retrieve the same information. Several queries may be needed for cases where SQL joins would be needed (not directly supported in LDAP). It may throw a LcgInfoException if the configuration file was not properly set or if there is some error in the translation or the interaction with the information service.
Implements LcgInfo::Querier. Definition at line 64 of file SQLtoLDAPQuerier.cpp. References LcgInfo::int2str, mLdap, mTranslator, LcgInfo::str2int, and LcgInfo::tokenizeStr. |
|
Sets the config buffer object, so that all necessary information for queries is available. The query method will fail if this method has not been called first. It may throw a ConfigBufferException if no attribute found, or a QueryTranslationException if the mapping file is not found.
Implements LcgInfo::Querier. Definition at line 45 of file SQLtoLDAPQuerier.cpp. References LcgConfigBuffer::ConfigBuffer::get_attribute_value, LcgInfo::int2str, mConf, mLdap, mMap, mTranslator, and LcgConfigBuffer::ConfigBuffer::populate_from_config. |
|
A pointer to the object that reads the configuration file and holds the information there contained. The object itself is instantiated outside this class (otherwise is NULL and the query() method will not work). Definition at line 71 of file SQLtoLDAPQuerier.h. Referenced by setConfig, and ~SQLtoLDAPQuerier. |
|
A pointer to the object that holds the mapping information (between the canonical and the implementation views of the schema). The name of the file from which this object is build is retrieved from mConf. Definition at line 78 of file SQLtoLDAPQuerier.h. Referenced by setConfig. |