diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:24:29 +0200 |
commit | 92667c8edbaee9a252b1d5d221eb62849f76697c (patch) | |
tree | 8f1d329f2259b7d5bff054bc14d0965637df6961 /connectivity/source/drivers/jdbc/CallableStatement.cxx | |
parent | baecdfb578cb7bc992944857ad4d8882ef7e842c (diff) | |
parent | 48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
connectivity/source/cpool/Zregistration.cxx
connectivity/source/drivers/evoab/LCatalog.cxx
connectivity/source/drivers/evoab/LColumnAlias.cxx
connectivity/source/drivers/evoab/LColumnAlias.hxx
connectivity/source/drivers/evoab/LColumns.cxx
connectivity/source/drivers/evoab/LColumns.hxx
connectivity/source/drivers/evoab/LConfigAccess.cxx
connectivity/source/drivers/evoab/LConfigAccess.hxx
connectivity/source/drivers/evoab/LConnection.cxx
connectivity/source/drivers/evoab/LConnection.hxx
connectivity/source/drivers/evoab/LDatabaseMetaData.cxx
connectivity/source/drivers/evoab/LDatabaseMetaData.hxx
connectivity/source/drivers/evoab/LDriver.cxx
connectivity/source/drivers/evoab/LDriver.hxx
connectivity/source/drivers/evoab/LFolderList.cxx
connectivity/source/drivers/evoab/LFolderList.hxx
connectivity/source/drivers/evoab/LNoException.cxx
connectivity/source/drivers/evoab/LPreparedStatement.cxx
connectivity/source/drivers/evoab/LPreparedStatement.hxx
connectivity/source/drivers/evoab/LResultSet.cxx
connectivity/source/drivers/evoab/LResultSet.hxx
connectivity/source/drivers/evoab/LServices.cxx
connectivity/source/drivers/evoab/LStatement.cxx
connectivity/source/drivers/evoab/LStatement.hxx
connectivity/source/drivers/evoab/LTable.cxx
connectivity/source/drivers/evoab/LTable.hxx
connectivity/source/drivers/evoab/LTables.cxx
connectivity/source/drivers/evoab/LTables.hxx
connectivity/source/drivers/evoab/evoab.xml
connectivity/source/drivers/evoab/makefile.mk
editeng/Library_editeng.mk
framework/Library_fwe.mk
framework/test/test.cxx
idl/prj/d.lst
idl/util/idlpch.cxx
linguistic/Makefile
linguistic/Module_linguistic.mk
linguistic/inc/linguistic/lngdllapi.h
linguistic/inc/linguistic/lngprophelp.hxx
linguistic/inc/linguistic/misc.hxx
linguistic/prj/build.lst
linguistic/prj/d.lst
linguistic/qa/unoapi/Test.java
linguistic/source/grammarchecker.cxx
linguistic/source/grammarchecker.hxx
linguistic/source/hyphdta.cxx
linguistic/source/lngprophelp.cxx
linguistic/source/makefile.mk
linguistic/source/spelldta.cxx
sfx2/Library_qstart.mk
sfx2/Library_sfx.mk
sfx2/inc/sfx2/qswin32.h
sfx2/prj/build.lst
sfx2/qa/cppunit/makefile.mk
xmlscript/inc/xmlscript/xcrdllapi.h
xmlscript/prj/d.lst
xmlscript/util/makefile.mk
Diffstat (limited to 'connectivity/source/drivers/jdbc/CallableStatement.cxx')
-rw-r--r-- | connectivity/source/drivers/jdbc/CallableStatement.cxx | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index a411e0277514..81bb2c9859b3 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ using namespace connectivity; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -// using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; @@ -164,9 +164,9 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); createStatement(t.pEnv); static jmethodID mID(NULL); - /*jobject out = */callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! - return Any(); //out==0 ? 0 : new java_lang_Object( t.pEnv, out ); + callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex); + // WARNING: the caller becomes the owner of the returned pointer + return Any(); } sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException) @@ -194,7 +194,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time(); } @@ -204,7 +204,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex ) createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime(); } @@ -217,13 +217,13 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame { createStatement(t.pEnv); - // temporaere Variable initialisieren + // initialize temporary variable static const char * cSignature = "(IILjava/lang/String;)V"; static const char * cMethodName = "registerOutParameter"; - // Java-Call absetzen + // execute Java-Call static jmethodID mID(NULL); obtainMethodId(t.pEnv, cMethodName,cSignature, mID); - // Parameter konvertieren + // Convert Parameter jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName)); t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,str.get()); ThrowLoggedSQLException( m_aLogger, t.pEnv, *this ); @@ -237,10 +237,10 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32 { createStatement(t.pEnv); - // temporaere Variable initialisieren + // initialize temporary variable static const char * cSignature = "(III)V"; static const char * cMethodName = "registerOutParameter"; - // Java-Call absetzen + // execute Java-Call static jmethodID mID(NULL); obtainMethodId(t.pEnv, cMethodName,cSignature, mID); t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,scale); @@ -252,7 +252,7 @@ jclass java_sql_CallableStatement::theClass = 0; jclass java_sql_CallableStatement::getMyClass() const { - // die Klasse muss nur einmal geholt werden, daher statisch + // the class must be fetched only once, therefore static if( !theClass ) theClass = findMyClass("java/sql/CallableStatement"); return theClass; @@ -275,7 +275,7 @@ Reference< starsdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Array( t.pEnv, out ); } @@ -285,7 +285,7 @@ Reference< starsdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_I createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Clob( t.pEnv, out ); } Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException) @@ -294,7 +294,7 @@ Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_I createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Blob( t.pEnv, out ); } @@ -304,7 +304,7 @@ Reference< starsdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int createStatement(t.pEnv); static jmethodID mID(NULL); jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex); - // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!! + // WARNING: the caller becomes the owner of the returned pointer return out==0 ? 0 : new java_sql_Ref( t.pEnv, out ); } // ----------------------------------------------------------------------------- @@ -326,12 +326,12 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/) SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); if( t.pEnv && !object ){ - // temporaere Variable initialisieren + // initialize temporary variable static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/CallableStatement;"; static const char * cMethodName = "prepareCall"; - // Java-Call absetzen + // execute Java-Call jobject out = NULL; - // Parameter konvertieren + // convert Parameter jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement)); static jmethodID mID(NULL); @@ -357,3 +357,4 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/) // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |