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