diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-10-18 08:24:54 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-10-18 08:24:54 +0000 |
commit | af9a0dda9411eec1008e1ea9c1a35994b62f85f5 (patch) | |
tree | 54c35c034134d4a3f314a6c2e7c7211e7feff132 /connectivity/source/drivers/jdbc/Date.cxx | |
parent | 18db6306098c8117fcd2802527d17a306f12274e (diff) |
93307# fix date access
Diffstat (limited to 'connectivity/source/drivers/jdbc/Date.cxx')
-rw-r--r-- | connectivity/source/drivers/jdbc/Date.cxx | 125 |
1 files changed, 3 insertions, 122 deletions
diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index 1e19265a88fc..64f8ee7b44f7 100644 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Date.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-05-31 08:29:15 $ + * last change: $Author: oj $ $Date: 2001-10-18 09:24:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,25 +76,6 @@ using namespace connectivity; jclass java_util_Date::theClass = 0; -java_util_Date::java_util_Date( const ::com::sun::star::util::Date& _rOut ) //: java_lang_Object( NULL, (jobject)NULL ){ -{ - SDBThreadAttach t; - if( !t.pEnv ) - return; - jvalue args[1]; - // Parameter konvertieren - args[0].j = ::dbtools::DBTypeConversion::toINT32(_rOut); - // Java-Call fuer den Konstruktor absetzen - // temporaere Variable initialisieren - char * cSignature = "(J)V"; - jobject tempObj; - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), "<init>", cSignature );OSL_ENSURE(mID,"Unknown method id!"); - tempObj = t.pEnv->NewObjectA( getMyClass(), mID, args ); - saveRef( t.pEnv, tempObj ); - t.pEnv->DeleteLocalRef( tempObj ); - // und aufraeumen -} - java_util_Date::~java_util_Date() {} @@ -119,106 +100,6 @@ void java_util_Date::saveClassRef( jclass pClass ) // der uebergebe Klassen-Handle ist schon global, daher einfach speichern theClass = pClass; } +// ----------------------------------------------------------------------------- -sal_Int32 java_util_Date::getMinutes() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getMinutes"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} - -sal_Int32 java_util_Date::getMonth() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getMonth"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} - -sal_Int32 java_util_Date::getSeconds() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getSeconds"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} - -sal_Int32 java_util_Date::getYear() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getYear"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} - -sal_Int32 java_util_Date::getDate() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getDate"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} - -sal_Int32 java_util_Date::getHours() -{ - jint out(0); - SDBThreadAttach t; - if( t.pEnv ){ - // temporaere Variable initialisieren - char * cSignature = "()I"; - char * cMethodName = "getHours"; - // Java-Call absetzen - jmethodID mID = t.pEnv->GetMethodID( getMyClass(), cMethodName, cSignature );OSL_ENSURE(mID,"Unknown method id!"); - if( mID ){ - out = t.pEnv->CallIntMethod( object, mID); - } //mID - } //t.pEnv - return (sal_Int32)out; -} |