summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/jdbc')
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx75
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx7
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx1169
-rw-r--r--connectivity/source/drivers/jdbc/ResultSetMetaData.cxx369
-rw-r--r--connectivity/source/drivers/jdbc/makefile.mk2
5 files changed, 564 insertions, 1058 deletions
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index eded040365..6786ef0994 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -142,7 +142,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// Java-Call absetzen
static jmethodID mID = NULL;
@@ -351,7 +351,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// Java-Call absetzen
static jmethodID mID = NULL;
@@ -395,7 +395,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// Java-Call absetzen
static jmethodID mID = NULL;
@@ -515,7 +515,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// Java-Call absetzen
static jmethodID mID = NULL;
@@ -565,18 +565,15 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethod
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callBooleanMethod: no Java enviroment anymore!" );
-
+ if ( t.pEnv )
{
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, "()Z" );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callBooleanMethod:: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- } // if ( !_inout_MethodID )
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callBooleanMethod:: unknown method id!" );
// call method
+ if ( _inout_MethodID )
{
out = t.pEnv->CallBooleanMethod( object, _inout_MethodID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -596,18 +593,15 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethod( const char* _pMethod
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callStringMethod: no Java enviroment anymore!" );
-
+ if( t.pEnv )
{
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, "()Ljava/lang/String;" );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callStringMethod: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- }
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callStringMethod: unknown method id!" );
+
// call method
-
+ if ( _inout_MethodID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, _inout_MethodID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -635,19 +629,15 @@ sal_Int32 java_sql_DatabaseMetaData::impl_callIntMethod( const char* _pMethodNam
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callIntMethod: no Java enviroment anymore!" );
-
+ if( t.pEnv )
{
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, "()I" );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callIntMethod: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- }
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callIntMethod: unknown method id!" );
// call method
-
+ if ( _inout_MethodID )
{
out = t.pEnv->CallIntMethod( object, _inout_MethodID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -666,18 +656,15 @@ sal_Bool java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg( const char
jboolean out( sal_False );
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg: no Java enviroment anymore!" );
-
+ if ( t.pEnv )
{
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, "(I)Z" );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- }
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callBooleanMethodWithIntArg: unknown method id!" );
+
// call method
-
+ if ( _inout_MethodID )
{
out = t.pEnv->CallBooleanMethod( object, _inout_MethodID, _nArgument );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -697,19 +684,15 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethod( con
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callResultSetMethod: no Java enviroment anymore!" );
-
+ if ( t.pEnv )
{
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, "()Ljava/sql/ResultSet;" );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callResultSetMethod: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- }
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callResultSetMethod: unknown method id!" );
// call method
-
+ if ( _inout_MethodID )
{
out = t.pEnv->CallObjectMethod( object, _inout_MethodID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -748,22 +731,18 @@ Reference< XResultSet > java_sql_DatabaseMetaData::impl_callResultSetMethodWithS
SDBThreadAttach t;
OSL_ENSURE( t.pEnv, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: no Java enviroment anymore!" );
-
+ if ( t.pEnv )
{
const char* pSignature = _pOptionalAdditionalString
? "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;"
: "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/ResultSet;";
// obtain method ID
if ( !_inout_MethodID )
- {
_inout_MethodID = t.pEnv->GetMethodID( getMyClass(), _pMethodName, pSignature );
- OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: unknown method id!" );
- if ( !_inout_MethodID )
- throw SQLException();
- }
+ OSL_ENSURE( _inout_MethodID, "java_sql_DatabaseMetaData::impl_callResultSetMethodWithStrings: unknown method id!" );
// call method
-
+ if ( _inout_MethodID )
{
jvalue args[4];
// convert parameters
@@ -1126,7 +1105,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsConvert( sal_Int32 fromType
jboolean out( sal_False );
SDBThreadAttach t;
-
+ if ( t.pEnv )
{
static jmethodID mID = NULL;
if ( !mID )
@@ -1474,7 +1453,7 @@ sal_Bool SAL_CALL java_sql_DatabaseMetaData::supportsResultSetConcurrency( sal_I
jboolean out( sal_False );
SDBThreadAttach t;
-
+ if ( t.pEnv )
{
static jmethodID mID = NULL;
if ( !mID )
@@ -1558,7 +1537,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
{
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I;)Ljava/sql/ResultSet;";
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 8b6e6d3ffc..b5251960a4 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include "resource/jdbc_log.hrc"
-#include <rtl/logfile.hxx>
+
#include <comphelper/logging.hxx>
#include <memory>
@@ -81,32 +81,27 @@ SDBThreadAttach::SDBThreadAttach()
: m_aGuard(java_lang_Object::getVM())
, pEnv(NULL)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "SDBThreadAttach::SDBThreadAttach" );
pEnv = m_aGuard.getEnvironment();
OSL_ENSURE(pEnv,"Environment is nULL!");
}
// -----------------------------------------------------------------------------
SDBThreadAttach::~SDBThreadAttach()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "SDBThreadAttach::~SDBThreadAttach" );
}
// -----------------------------------------------------------------------------
oslInterlockedCount& getJavaVMRefCount()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "getJavaVMRefCount" );
static oslInterlockedCount s_nRefCount = 0;
return s_nRefCount;
}
// -----------------------------------------------------------------------------
void SDBThreadAttach::addRef()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "SDBThreadAttach::addRef" );
osl_incrementInterlockedCount(&getJavaVMRefCount());
}
// -----------------------------------------------------------------------------
void SDBThreadAttach::releaseRef()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "SDBThreadAttach::releaseRef" );
osl_decrementInterlockedCount(&getJavaVMRefCount());
if ( getJavaVMRefCount() == 0 )
{
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index ea0b8b5c4c..ba0f070245 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -85,7 +85,6 @@ java_sql_ResultSet::java_sql_ResultSet( JNIEnv * pEnv, jobject myObj, const java
osl_incrementInterlockedCount(&m_refCount);
if ( pStmt )
m_xStatement = *pStmt;
-
osl_decrementInterlockedCount(&m_refCount);
}
// -----------------------------------------------------------------------------
@@ -134,24 +133,19 @@ void java_sql_ResultSet::disposing(void)
if( object )
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "close";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "close";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
clearObject(*t.pEnv);
}
} //t.pEnv
@@ -182,21 +176,16 @@ sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const ::rtl::OUString& column
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::findColumn" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(Ljava/lang/String;)I";
+ static const char * cMethodName = "findColumn";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(Ljava/lang/String;)I";
- static const char * cMethodName = "findColumn";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
// Parameter konvertieren
jstring str = convertwchar_tToJavaString(t.pEnv,columnName);
out = t.pEnv->CallIntMethod( object, mID, str );
@@ -204,7 +193,7 @@ sal_Int32 SAL_CALL java_sql_ResultSet::findColumn( const ::rtl::OUString& column
t.pEnv->DeleteLocalRef(str);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -216,25 +205,20 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getBinaryStream" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/io/InputStream;";
+ static const char * cMethodName = "getBinaryStream";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/io/InputStream;";
- static const char * cMethodName = "getBinaryStream";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
@@ -245,25 +229,20 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getCharacterStream" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/io/InputStream;";
+ static const char * cMethodName = "getCharacterStream";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/io/InputStream;";
- static const char * cMethodName = "getCharacterStream";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
@@ -275,25 +254,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::getBoolean( sal_Int32 columnIndex ) throw(
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getBoolean" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "getBoolean";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "getBoolean";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID, columnIndex );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return out;
}
@@ -304,25 +278,20 @@ sal_Int8 SAL_CALL java_sql_ResultSet::getByte( sal_Int32 columnIndex ) throw(SQL
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getByte" );
jbyte out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)B";
+ static const char * cMethodName = "getByte";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)B";
- static const char * cMethodName = "getByte";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallByteMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return out;
}
@@ -333,20 +302,15 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getBytes" );
Sequence< sal_Int8 > aSeq;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
+ static const char * cSignature = "(I)[B";
+ static const char * cMethodName = "getBytes";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)[B";
- static const char * cMethodName = "getBytes";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
jbyteArray out = (jbyteArray)t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
if (out)
@@ -357,7 +321,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
t.pEnv->DeleteLocalRef(out);
}
// und aufraeumen
-
+ } //mID
} //t.pEnv
return aSeq;
}
@@ -368,25 +332,20 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getDate" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Date;";
+ static const char * cMethodName = "getDate";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Date;";
- static const char * cMethodName = "getDate";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
@@ -398,25 +357,20 @@ double SAL_CALL java_sql_ResultSet::getDouble( sal_Int32 columnIndex ) throw(SQL
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getDouble" );
jdouble out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)D";
+ static const char * cMethodName = "getDouble";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)D";
- static const char * cMethodName = "getDouble";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallDoubleMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return out;
}
@@ -427,25 +381,20 @@ float SAL_CALL java_sql_ResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLEx
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getFloat" );
jfloat out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)F";
+ static const char * cMethodName = "getFloat";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)F";
- static const char * cMethodName = "getFloat";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallFloatMethod( object, mID, columnIndex );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return out;
}
@@ -456,25 +405,20 @@ sal_Int32 SAL_CALL java_sql_ResultSet::getInt( sal_Int32 columnIndex ) throw(SQL
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getInt" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "getInt";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "getInt";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID, columnIndex );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -485,24 +429,19 @@ sal_Int32 SAL_CALL java_sql_ResultSet::getRow( ) throw(SQLException, RuntimeExc
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getRow" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -513,24 +452,19 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getLong" );
jlong out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)J";
+ static const char * cMethodName = "getLong";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)J";
- static const char * cMethodName = "getLong";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallLongMethod( object, mID, columnIndex );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return out;
}
@@ -541,24 +475,20 @@ sal_Int64 SAL_CALL java_sql_ResultSet::getLong( sal_Int32 columnIndex ) throw(SQ
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getMetaData" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Ljava/sql/ResultSetMetaData;";
+ static const char * cMethodName = "getMetaData";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Ljava/sql/ResultSetMetaData;";
- static const char * cMethodName = "getMetaData";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
+ out = t.pEnv->CallObjectMethod( object, mID );
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
-
- out = t.pEnv->CallObjectMethod( object, mID );
- ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
return out==0 ? 0 : new java_sql_ResultSetMetaData( t.pEnv, out, m_aLogger,*m_pConnection );
@@ -569,24 +499,19 @@ Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getArray" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Array;";
+ static const char * cMethodName = "getArray";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Array;";
- static const char * cMethodName = "getArray";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
@@ -598,24 +523,19 @@ Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex )
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getClob" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Clob;";
+ static const char * cMethodName = "getClob";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Clob;";
- static const char * cMethodName = "getClob";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
@@ -626,24 +546,19 @@ Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex )
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getBlob" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Blob;";
+ static const char * cMethodName = "getBlob";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Blob;";
- static const char * cMethodName = "getBlob";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
@@ -655,24 +570,19 @@ Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) t
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getRef" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Ref;";
+ static const char * cMethodName = "getRef";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Ref;";
- static const char * cMethodName = "getRef";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
@@ -684,29 +594,24 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getObject" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
jvalue args[2];
// Parameter konvertieren
args[0].i = (sal_Int32)columnIndex;
args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/Object;";
+ static const char * cMethodName = "getObject";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/Object;";
- static const char * cMethodName = "getObject";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethodA( object, mID, args);
t.pEnv->DeleteLocalRef((jstring)args[1].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out==0 ? Any() : Any();//new java_lang_Object( t.pEnv, out );
@@ -718,24 +623,19 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getShort" );
jshort out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)S";
+ static const char * cMethodName = "getShort";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)S";
- static const char * cMethodName = "getShort";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallShortMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
return (sal_Int16)out;
}
@@ -747,22 +647,20 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getString" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getString";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getString";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );
- if ( !mID )
- throw SQLException();
- }
- jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, columnIndex );
- ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- aStr = JavaString2String(t.pEnv,out);
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
+ jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, columnIndex );
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ aStr = JavaString2String(t.pEnv,out);
+ // und aufraeumen
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return aStr;
@@ -775,25 +673,20 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getTime" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Time;";
+ static const char * cMethodName = "getTime";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Time;";
- static const char * cMethodName = "getTime";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
@@ -806,24 +699,19 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getTimestamp" );
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/sql/Timestamp;";
+ static const char * cMethodName = "getTimestamp";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/sql/Timestamp;";
- static const char * cMethodName = "getTimestamp";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID, columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
@@ -835,25 +723,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::isAfterLast( ) throw(SQLException, Runtim
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::isAfterLast" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "isAfterLast";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "isAfterLast";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -863,25 +746,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::isFirst( ) throw(SQLException, RuntimeExc
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::isFirst" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "isFirst";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "isFirst";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -891,25 +769,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::isLast( ) throw(SQLException, RuntimeExce
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::isLast" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "isLast";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "isLast";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -918,25 +791,20 @@ void SAL_CALL java_sql_ResultSet::beforeFirst( ) throw(SQLException, RuntimeExc
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::beforeFirst" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "isBeforeFirst";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "isBeforeFirst";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
}
// -------------------------------------------------------------------------
@@ -944,25 +812,20 @@ void SAL_CALL java_sql_ResultSet::afterLast( ) throw(SQLException, RuntimeExcep
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::afterLast" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "afterLast";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "afterLast";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
}
// -------------------------------------------------------------------------
@@ -979,24 +842,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::first( ) throw(SQLException, RuntimeExcep
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::first" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "first";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "first";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1007,24 +865,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::last( ) throw(SQLException, RuntimeExcept
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::last" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "last";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "last";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1034,24 +887,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::absolute( sal_Int32 row ) throw(SQLExcepti
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::absolute" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "absolute";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "absolute";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID,row);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1061,24 +909,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::relative( sal_Int32 row ) throw(SQLExcepti
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::relative" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "relative";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "relative";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID,row);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1088,25 +931,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::previous( ) throw(SQLException, RuntimeEx
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::previous" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "previous";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "previous";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1123,24 +961,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::rowDeleted( ) throw(SQLException, Runtime
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::rowDeleted" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "rowDeleted";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "rowDeleted";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1150,24 +983,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::rowInserted( ) throw(SQLException, Runtim
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::rowInserted" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "rowInserted";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "rowInserted";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1177,24 +1005,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::rowUpdated( ) throw(SQLException, Runtime
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::rowUpdated" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "rowUpdated";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "rowUpdated";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1205,24 +1028,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::isBeforeFirst( ) throw(SQLException, Runt
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::isBeforeFirst" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "isBeforeFirst";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "isBeforeFirst";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1233,25 +1051,20 @@ sal_Bool SAL_CALL java_sql_ResultSet::next( ) throw(SQLException, RuntimeExcept
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::next" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "next";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "next";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1262,24 +1075,19 @@ sal_Bool SAL_CALL java_sql_ResultSet::wasNull( ) throw(SQLException, RuntimeExc
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::wasNull" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Z";
+ static const char * cMethodName = "wasNull";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Z";
- static const char * cMethodName = "wasNull";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
return out;
}
@@ -1289,24 +1097,19 @@ void SAL_CALL java_sql_ResultSet::cancel( ) throw(::com::sun::star::uno::Runtim
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::cancel" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "cancel";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "cancel";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
}
// -------------------------------------------------------------------------
@@ -1315,23 +1118,19 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::clearWarnings" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "clearWarnings";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "clearWarnings";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1340,24 +1139,19 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getWarnings" );
jobject out(NULL);
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Ljava/sql/SQLWarning;";
+ static const char * cMethodName = "getWarnings";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Ljava/sql/SQLWarning;";
- static const char * cMethodName = "getWarnings";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallObjectMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
// ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
if( out )
@@ -1376,23 +1170,19 @@ void SAL_CALL java_sql_ResultSet::insertRow( ) throw(::com::sun::star::sdbc::SQ
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::insertRow" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "insertRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "insertRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1400,23 +1190,19 @@ void SAL_CALL java_sql_ResultSet::updateRow( ) throw(::com::sun::star::sdbc::SQ
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateRow" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "updateRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "updateRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1424,23 +1210,19 @@ void SAL_CALL java_sql_ResultSet::deleteRow( ) throw(::com::sun::star::sdbc::SQ
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::deleteRow" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "deleteRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "deleteRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1449,23 +1231,19 @@ void SAL_CALL java_sql_ResultSet::cancelRowUpdates( ) throw(::com::sun::star::s
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::cancelRowUpdates" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "cancelRowUpdates";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "cancelRowUpdates";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1474,23 +1252,19 @@ void SAL_CALL java_sql_ResultSet::moveToInsertRow( ) throw(::com::sun::star::sd
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::moveToInsertRow" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "moveToInsertRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "moveToInsertRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1499,23 +1273,19 @@ void SAL_CALL java_sql_ResultSet::moveToCurrentRow( ) throw(::com::sun::star::s
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::moveToCurrentRow" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "moveToCurrentRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "moveToCurrentRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1524,23 +1294,19 @@ void SAL_CALL java_sql_ResultSet::updateNull( sal_Int32 columnIndex ) throw(::co
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateNull" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)V";
+ static const char * cMethodName = "updateNull";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)V";
- static const char * cMethodName = "updateNull";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1549,23 +1315,19 @@ void SAL_CALL java_sql_ResultSet::updateBoolean( sal_Int32 columnIndex, sal_Bool
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateBoolean" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(IZ)V";
+ static const char * cMethodName = "updateBoolean";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(IZ)V";
- static const char * cMethodName = "updateBoolean";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1573,23 +1335,19 @@ void SAL_CALL java_sql_ResultSet::updateByte( sal_Int32 columnIndex, sal_Int8 x
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateByte" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(IB)V";
+ static const char * cMethodName = "updateByte";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(IB)V";
- static const char * cMethodName = "updateByte";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1598,23 +1356,19 @@ void SAL_CALL java_sql_ResultSet::updateShort( sal_Int32 columnIndex, sal_Int16
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateShort" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(IS)V";
+ static const char * cMethodName = "updateShort";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(IS)V";
- static const char * cMethodName = "updateShort";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1622,23 +1376,19 @@ void SAL_CALL java_sql_ResultSet::updateInt( sal_Int32 columnIndex, sal_Int32 x
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateInt" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(II)V";
+ static const char * cMethodName = "updateInt";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(II)V";
- static const char * cMethodName = "updateInt";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1646,23 +1396,19 @@ void SAL_CALL java_sql_ResultSet::updateLong( sal_Int32 columnIndex, sal_Int64 x
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateLong" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(IJ)V";
+ static const char * cMethodName = "updateLong";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(IJ)V";
- static const char * cMethodName = "updateLong";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1672,23 +1418,19 @@ void SAL_CALL java_sql_ResultSet::updateFloat( sal_Int32 columnIndex, float x )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateFloat" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(IF)V";
+ static const char * cMethodName = "updateFloat";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(IF)V";
- static const char * cMethodName = "updateFloat";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1697,23 +1439,19 @@ void SAL_CALL java_sql_ResultSet::updateDouble( sal_Int32 columnIndex, double x
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateDouble" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(ID)V";
+ static const char * cMethodName = "updateDouble";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(ID)V";
- static const char * cMethodName = "updateDouble";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,columnIndex,x);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ }
}
}
// -------------------------------------------------------------------------
@@ -1722,22 +1460,17 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateString" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(ILjava/lang/String;)V";
+ static const char * cMethodName = "updateString";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(ILjava/lang/String;)V";
- static const char * cMethodName = "updateString";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
// Parameter konvertieren
jstring str = convertwchar_tToJavaString(t.pEnv,x);
@@ -1753,21 +1486,16 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateBytes" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I[B)V";
+ static const char * cMethodName = "updateBytes";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I[B)V";
- static const char * cMethodName = "updateBytes";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jbyteArray aArray = t.pEnv->NewByteArray(x.getLength());
t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),(jbyte*)x.getConstArray());
@@ -1784,22 +1512,17 @@ void SAL_CALL java_sql_ResultSet::updateDate( sal_Int32 columnIndex, const ::com
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateDate" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(ILjava/sql/Date;)V";
+ static const char * cMethodName = "updateDate";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(ILjava/sql/Date;)V";
- static const char * cMethodName = "updateDate";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jvalue args[1];
// Parameter konvertieren
@@ -1816,21 +1539,16 @@ void SAL_CALL java_sql_ResultSet::updateTime( sal_Int32 columnIndex, const ::com
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateTime" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(ILjava/sql/Time;)V";
+ static const char * cMethodName = "updateTime";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(ILjava/sql/Time;)V";
- static const char * cMethodName = "updateTime";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jvalue args[1];
// Parameter konvertieren
@@ -1847,21 +1565,16 @@ void SAL_CALL java_sql_ResultSet::updateTimestamp( sal_Int32 columnIndex, const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::updateTimestamp" );
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(I;Ljava/sql/Timestamp;)V";
+ static const char * cMethodName = "updateTimestamp";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I;Ljava/sql/Timestamp;)V";
- static const char * cMethodName = "updateTimestamp";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jvalue args[1];
java_sql_Timestamp aD(x);
@@ -1908,22 +1621,17 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
try
{
SDBThreadAttach t;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "(ILjava/lang/Object;I)V";
+ static const char * cMethodName = "updateObject";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(ILjava/lang/Object;I)V";
- static const char * cMethodName = "updateObject";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
// Parameter konvertieren
double nTemp = 0.0;
@@ -1951,25 +1659,20 @@ sal_Int32 java_sql_ResultSet::getResultSetConcurrency() const throw(::com::sun::
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getResultSetConcurrency" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getConcurrency";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getConcurrency";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -1980,25 +1683,20 @@ sal_Int32 java_sql_ResultSet::getResultSetType() const throw(::com::sun::star::s
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getResultSetType" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getType";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getType";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -2008,25 +1706,20 @@ sal_Int32 java_sql_ResultSet::getFetchDirection() const throw(::com::sun::star::
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getFetchDirection" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getFetchDirection";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getFetchDirection";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -2036,25 +1729,20 @@ sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc:
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getFetchSize" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getFetchSize";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getFetchSize";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
return (sal_Int32)out;
}
@@ -2064,24 +1752,20 @@ sal_Int32 java_sql_ResultSet::getFetchSize() const throw(::com::sun::star::sdbc:
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::getCursorName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()Ljava/lang/String;";
+ static const char * cMethodName = "getCursorName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()Ljava/lang/String;";
- static const char * cMethodName = "getCursorName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *const_cast< java_sql_ResultSet* >( this ) );
aStr = JavaString2String(t.pEnv,out);
+ }
}
return aStr;
@@ -2092,25 +1776,20 @@ void java_sql_ResultSet::setFetchDirection(sal_Int32 _par0) throw(::com::sun::st
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::setFetchDirection" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)V";
+ static const char * cMethodName = "setFetchDirection";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)V";
- static const char * cMethodName = "setFetchDirection";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,_par0);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
}
@@ -2119,24 +1798,19 @@ void SAL_CALL java_sql_ResultSet::refreshRow( ) throw(SQLException, RuntimeExce
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::refreshRow" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
+ if( t.pEnv )
{
// temporaere Variable initialisieren
+ static const char * cSignature = "()V";
+ static const char * cMethodName = "refreshRow";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "()V";
- static const char * cMethodName = "refreshRow";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
-
+ } //mID
} //t.pEnv
}
//------------------------------------------------------------------------------
@@ -2144,24 +1818,19 @@ void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::s
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSet::setFetchSize" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)V";
+ static const char * cMethodName = "setFetchSize";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)V";
- static const char * cMethodName = "setFetchSize";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
t.pEnv->CallVoidMethod( object, mID,_par0);
// special case here most JDBC 1.x doesn't support this feature so we just clear the exception when they occured
isExceptionOccured(t.pEnv,sal_True);
-
+ } //mID
} //t.pEnv
}
diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
index ef3d35b8a5..b5b307660c 100644
--- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
@@ -33,8 +33,6 @@
#include "java/sql/ResultSetMetaData.hxx"
#include "java/sql/Connection.hxx"
#include "java/tools.hxx"
-#include <rtl/logfile.hxx>
-
using namespace connectivity;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -42,8 +40,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
-
-#define NULLABLE_UNDEFINED 99
//**************************************************************
//************ Class: java.sql.ResultSetMetaData
//**************************************************************
@@ -53,9 +49,7 @@ java_sql_ResultSetMetaData::java_sql_ResultSetMetaData( JNIEnv * pEnv, jobject m
:java_lang_Object( pEnv, myObj )
,m_aLogger( _rResultSetLogger )
,m_pConnection( &_rCon )
- ,m_nColumnCount(-1)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::java_sql_ResultSetMetaData" );
SDBThreadAttach::addRef();
}
java_sql_ResultSetMetaData::~java_sql_ResultSetMetaData()
@@ -65,7 +59,6 @@ java_sql_ResultSetMetaData::~java_sql_ResultSetMetaData()
jclass java_sql_ResultSetMetaData::getMyClass()
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getMyClass" );
// die Klasse muss nur einmal geholt werden, daher statisch
if( !theClass ){
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
@@ -81,7 +74,6 @@ jclass java_sql_ResultSetMetaData::getMyClass()
void java_sql_ResultSetMetaData::saveClassRef( jclass pClass )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::saveClassRef" );
if( pClass==0 )
return;
// der uebergebe Klassen-Handle ist schon global, daher einfach speichern
@@ -91,24 +83,18 @@ void java_sql_ResultSetMetaData::saveClassRef( jclass pClass )
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnDisplaySize" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "getColumnDisplaySize";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "getColumnDisplaySize";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID,column);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //mID
@@ -119,24 +105,18 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnDisplaySize( sal_Int32 c
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnType" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "getColumnType";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "getColumnType";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID,column);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //mID
@@ -147,54 +127,39 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnType( sal_Int32 column )
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getColumnCount( ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnCount" );
- if ( m_nColumnCount == -1 )
- {
- SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
-
- // temporaere Variable initialisieren
- // Java-Call absetzen
- static jmethodID mID = NULL;
- if ( !mID )
- {
- static const char * cSignature = "()I";
- static const char * cMethodName = "getColumnCount";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
- m_nColumnCount = t.pEnv->CallIntMethod( object, mID);
- ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- } //mID
- } //t.pEnv
- } // if ( m_nColumnCount == -1 )
- return m_nColumnCount;
+ jint out(0);
+ SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
+ if( t.pEnv ){
+ // temporaere Variable initialisieren
+ static const char * cSignature = "()I";
+ static const char * cMethodName = "getColumnCount";
+ // Java-Call absetzen
+ static jmethodID mID = NULL;
+ if ( !mID )
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
+ out = t.pEnv->CallIntMethod( object, mID);
+ ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
+ } //mID
+ } //t.pEnv
+ return (sal_Int32)out;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isCaseSensitive" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isCaseSensitive";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isCaseSensitive";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -204,23 +169,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getSchemaName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getSchemaName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getSchemaName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -235,23 +194,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getColumnName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getColumnName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -265,23 +218,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getTableName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getTableName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getTableName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -295,23 +242,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getCatalogName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getCatalogName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getCatalogName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -325,23 +266,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnTypeName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getColumnTypeName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getColumnTypeName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -355,23 +290,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnLabel" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getColumnLabel";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getColumnLabel";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -385,23 +314,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_ResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getColumnServiceName" );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Ljava/lang/String;";
+ static const char * cMethodName = "getColumnClassName";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Ljava/lang/String;";
- static const char * cMethodName = "getColumnClassName";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
{
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -416,25 +339,19 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCaseSensitive( sal_Int32 column
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isCurrency" );
if ( m_pConnection->isIgnoreCurrencyEnabled() )
return sal_False;
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isCurrency";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isCurrency";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -445,23 +362,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isCurrency( sal_Int32 column ) thr
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isAutoIncrement" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isAutoIncrement";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isAutoIncrement";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
out = t.pEnv->CallBooleanMethod( object, mID, column);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -473,23 +384,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isAutoIncrement( sal_Int32 column
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isSigned" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isSigned";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isSigned";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
-
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID )
out = t.pEnv->CallBooleanMethod( object, mID, column);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -499,23 +404,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSigned( sal_Int32 column ) throw
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getPrecision" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "getPrecision";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "getPrecision";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -526,23 +425,17 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getPrecision( sal_Int32 column )
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::getScale" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "getScale";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "getScale";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -553,23 +446,17 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::getScale( sal_Int32 column ) thro
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isNullable" );
jint out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)I";
+ static const char * cMethodName = "isNullable";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)I";
- static const char * cMethodName = "isNullable";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallIntMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -581,23 +468,17 @@ sal_Int32 SAL_CALL java_sql_ResultSetMetaData::isNullable( sal_Int32 column ) th
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isSearchable" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isSearchable";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isSearchable";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -609,23 +490,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isSearchable( sal_Int32 column ) t
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isReadOnly" );
jboolean out(sal_False);
SDBThreadAttach t;
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isReadOnly";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isReadOnly";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -637,23 +512,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isReadOnly( sal_Int32 column ) thr
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isDefinitelyWritable" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isDefinitelyWritable";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isDefinitelyWritable";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
@@ -664,23 +533,17 @@ sal_Bool SAL_CALL java_sql_ResultSetMetaData::isDefinitelyWritable( sal_Int32 co
// -------------------------------------------------------------------------
sal_Bool SAL_CALL java_sql_ResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen@sun.com", "java_sql_ResultSetMetaData::isWritable" );
jboolean out(sal_False);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- {
+ if( t.pEnv ){
// temporaere Variable initialisieren
+ static const char * cSignature = "(I)Z";
+ static const char * cMethodName = "isWritable";
// Java-Call absetzen
static jmethodID mID = NULL;
if ( !mID )
- {
- static const char * cSignature = "(I)Z";
- static const char * cMethodName = "isWritable";
-
- mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
- if ( !mID )
- throw SQLException();
- }
- {
+ mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!");
+ if( mID ){
out = t.pEnv->CallBooleanMethod( object, mID, column );
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
// und aufraeumen
diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk
index 77cb92f49c..58287b0bf8 100644
--- a/connectivity/source/drivers/jdbc/makefile.mk
+++ b/connectivity/source/drivers/jdbc/makefile.mk
@@ -105,7 +105,7 @@ SHL1IMPLIB= i$(JDBC_TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)
-# DEF1EXPORTFILE= exports.dxp
+DEF1EXPORTFILE= exports.dxp
.ENDIF # SOLAR_JAVA