summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/jdbc/ResultSetMetaData.cxx')
-rw-r--r--connectivity/source/drivers/jdbc/ResultSetMetaData.cxx369
1 files changed, 116 insertions, 253 deletions
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