1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_ 24 #define _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_ 25 26 #include "java/util/Date.hxx" 27 #include <com/sun/star/util/Time.hpp> 28 #include <com/sun/star/util/DateTime.hpp> 29 30 31 namespace connectivity 32 { 33 //************************************************************** 34 //************ Class: java.sql.Date 35 //************************************************************** 36 37 class java_sql_Date : public java_util_Date 38 { 39 protected: 40 // statische Daten fuer die Klasse 41 static jclass theClass; 42 public: 43 virtual jclass getMyClass() const; 44 virtual ~java_sql_Date(); 45 // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird: java_sql_Date(JNIEnv * pEnv,jobject myObj)46 java_sql_Date( JNIEnv * pEnv, jobject myObj ) : java_util_Date(pEnv,myObj){} 47 java_sql_Date( const ::com::sun::star::util::Date& _rOut ); 48 49 operator ::com::sun::star::util::Date(); 50 static jclass st_getMyClass(); 51 }; 52 53 54 //************************************************************** 55 //************ Class: java.sql.Time 56 //************************************************************** 57 58 class java_sql_Time : public java_util_Date 59 { 60 protected: 61 // statische Daten fuer die Klasse 62 static jclass theClass; 63 public: 64 virtual jclass getMyClass() const; 65 virtual ~java_sql_Time(); 66 // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird: java_sql_Time(JNIEnv * pEnv,jobject myObj)67 java_sql_Time( JNIEnv * pEnv, jobject myObj ) : java_util_Date( pEnv, myObj ){} 68 java_sql_Time( const ::com::sun::star::util::Time& _rOut ); 69 operator ::com::sun::star::util::Time(); 70 static jclass st_getMyClass(); 71 }; 72 73 //************************************************************** 74 //************ Class: java.sql.Timestamp 75 //************************************************************** 76 class java_sql_Timestamp : public java_util_Date 77 { 78 protected: 79 // statische Daten fuer die Klasse 80 static jclass theClass; 81 public: 82 virtual jclass getMyClass() const; 83 virtual ~java_sql_Timestamp(); 84 // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird: java_sql_Timestamp(JNIEnv * pEnv,jobject myObj)85 java_sql_Timestamp( JNIEnv * pEnv, jobject myObj ) : java_util_Date( pEnv, myObj ){} 86 java_sql_Timestamp( const ::com::sun::star::util::DateTime& _rOut); 87 operator ::com::sun::star::util::DateTime(); 88 89 sal_Int32 getNanos(); 90 void setNanos(sal_Int32 n); 91 static jclass st_getMyClass(); 92 }; 93 } 94 #endif // _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_ 95 96