24#include <jvmfwk/framework.hxx>
38java_sql_Driver::java_sql_Driver(
const Reference< css::uno::XComponentContext >& _rxContext)
40 ,m_aLogger( _rxContext,
"org.openoffice.sdbc.jdbcBridge" )
50 return "com.sun.star.comp.sdbc.JDBCDriver";
63 return {
"com.sun.star.sdbc.Driver" };
67 Sequence< PropertyValue >& info )
71 Reference< XConnection > xOut;
76 if ( !pConnection->construct(url,info) )
88 bool bEnabled =
false;
96 "jfw_getEnabled: JFW_E_DIRECT_MODE, assuming true");
100 SAL_WARN(
"connectivity.jdbc",
"jfw_getEnabled: error code " << +e);
103 return bEnabled && url.startsWith(
"jdbc:");
107 const Sequence< PropertyValue >& )
111 Sequence< OUString > aBooleanValues{
"false",
"true" };
117 ,
"The JDBC driver class name."
120 ,Sequence< OUString >()
123 "JavaDriverClassPath"
124 ,
"The class path where to look for the JDBC driver."
127 ,Sequence< OUString >()
131 ,
"Additional properties to set at java.lang.System before loading the driver."
134 ,Sequence< OUString >()
137 "ParameterNameSubstitution"
138 ,
"Change named parameters with '?'."
144 "IgnoreDriverPrivileges"
145 ,
"Ignore the privileges from the database driver."
151 "IsAutoRetrievingEnabled"
152 ,
"Retrieve generated values."
158 "AutoRetrievingStatement"
159 ,
"Auto-increment statement."
162 ,Sequence< OUString >()
165 "GenerateASBeforeCorrelationName"
166 ,
"Generate AS before table correlation names."
173 ,
"Ignore the currency field from the ResultsetMetaData."
180 ,
"Escape date time format."
187 ,
"Defines how the type info of the database metadata should be manipulated."
190 ,Sequence< OUString > ()
193 "ImplicitCatalogRestriction"
194 ,
"The catalog which should be used in getTables calls, when the caller passed NULL."
197 ,Sequence< OUString > ()
200 "ImplicitSchemaRestriction"
201 ,
"The schema which should be used in getTables calls, when the caller passed NULL."
204 ,Sequence< OUString > ()
211 return Sequence< DriverPropertyInfo >();
224extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
226 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any>
const&)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * connectivity_java_sql_Driver_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
void log(const sal_Int32 _nLogLevel, const OUString &rMessage) const
helper class for accessing resources shared by different libraries in the connectivity module
OUString getResourceString(TranslateId pResId) const
loads a string from the shared resource file
virtual sal_Int32 SAL_CALL getMajorVersion() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
::comphelper::EventLogger m_aLogger
virtual css::uno::Sequence< css::sdbc::DriverPropertyInfo > SAL_CALL getPropertyInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual sal_Int32 SAL_CALL getMinorVersion() override
virtual sal_Bool SAL_CALL acceptsURL(const OUString &url) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL connect(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
virtual ~java_sql_Driver() override
Reference< XComponentContext > m_aContext
javaFrameworkError jfw_getEnabled(bool *pbEnabled)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral STR_LOG_DRIVER_SUCCESS
#define STR_LOG_DRIVER_CONNECTING_URL