xref: /trunk/main/connectivity/source/inc/java/sql/Timestamp.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_
28 #define _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_
29 
30 #include "java/util/Date.hxx"
31 #include <com/sun/star/util/Time.hpp>
32 #include <com/sun/star/util/DateTime.hpp>
33 
34 
35 namespace connectivity
36 {
37     //**************************************************************
38     //************ Class: java.sql.Date
39     //**************************************************************
40 
41     class java_sql_Date : public java_util_Date
42     {
43     protected:
44     // statische Daten fuer die Klasse
45         static jclass theClass;
46     public:
47         virtual jclass getMyClass() const;
48         virtual ~java_sql_Date();
49         // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
50         java_sql_Date( JNIEnv * pEnv, jobject myObj ) : java_util_Date(pEnv,myObj){}
51         java_sql_Date( const ::com::sun::star::util::Date& _rOut );
52 
53         operator ::com::sun::star::util::Date();
54         static jclass st_getMyClass();
55     };
56 
57 
58     //**************************************************************
59     //************ Class: java.sql.Time
60     //**************************************************************
61 
62     class java_sql_Time : public java_util_Date
63     {
64     protected:
65     // statische Daten fuer die Klasse
66         static jclass theClass;
67     public:
68         virtual jclass getMyClass() const;
69         virtual ~java_sql_Time();
70         // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
71         java_sql_Time( JNIEnv * pEnv, jobject myObj ) : java_util_Date( pEnv, myObj ){}
72         java_sql_Time( const ::com::sun::star::util::Time& _rOut );
73         operator ::com::sun::star::util::Time();
74         static jclass st_getMyClass();
75     };
76 
77     //**************************************************************
78     //************ Class: java.sql.Timestamp
79     //**************************************************************
80     class java_sql_Timestamp : public java_util_Date
81     {
82     protected:
83     // statische Daten fuer die Klasse
84         static jclass theClass;
85     public:
86         virtual jclass getMyClass() const;
87         virtual ~java_sql_Timestamp();
88         // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird:
89         java_sql_Timestamp( JNIEnv * pEnv, jobject myObj ) : java_util_Date( pEnv, myObj ){}
90         java_sql_Timestamp( const ::com::sun::star::util::DateTime& _rOut);
91         operator ::com::sun::star::util::DateTime();
92 
93         sal_Int32 getNanos();
94         void  setNanos(sal_Int32 n);
95         static jclass st_getMyClass();
96     };
97 }
98 #endif // _CONNECTIVITY_JAVA_SQL_TIMESTAMP_HXX_
99 
100