]> review.fuel-infra Code Review - packages/trusty/mysql-wsrep-5.6.git/blob
b35111b4048644d7dcc1fa0dc3ed804ad4760705
[packages/trusty/mysql-wsrep-5.6.git] /
1 /*
2    Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; version 2 of the License.
7
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12
13    You should have received a copy of the GNU General Public License
14    along with this program; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
16 */
17
18 package com.mysql.clusterj.jpatest.model;
19
20 import java.sql.Time;
21
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.Id;
25 import javax.persistence.Table;
26 import javax.persistence.Temporal;
27 import javax.persistence.TemporalType;
28
29 /** Schema
30 *
31 drop table if exists timetypes;
32 create table timetypes (
33 id int not null primary key,
34
35 time_not_null_hash time,
36 time_not_null_btree time,
37 time_not_null_both time,
38 time_not_null_none time
39
40 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
41
42 create unique index idx_time_not_null_hash using hash on timetypes(time_not_null_hash);
43 create index idx_time_not_null_btree on timetypes(time_not_null_btree);
44 create unique index idx_time_not_null_both on timetypes(time_not_null_both);
45
46 */
47 @Entity
48 @Table(name="timetypes")
49 public class TimeAsSqlTimeTypes implements IdBase {
50
51     private int id;
52     private Time time_not_null_hash;
53     private Time time_not_null_btree;
54     private Time time_not_null_both;
55     private Time time_not_null_none;
56     @Id
57     public int getId() {
58         return id;
59     }
60     public void setId(int id) {
61         this.id = id;
62     }
63
64     // Time
65     @Column(name="time_not_null_hash")
66     @Temporal(TemporalType.TIME)
67     public Time getTime_not_null_hash() {
68         return time_not_null_hash;
69     }
70     public void setTime_not_null_hash(Time value) {
71         this.time_not_null_hash = value;
72     }
73
74     @Column(name="time_not_null_btree")
75     @Temporal(TemporalType.TIME)
76     public Time getTime_not_null_btree() {
77         return time_not_null_btree;
78     }
79     public void setTime_not_null_btree(Time value) {
80         this.time_not_null_btree = value;
81     }
82
83     @Column(name="time_not_null_both")
84     @Temporal(TemporalType.TIME)
85     public Time getTime_not_null_both() {
86         return time_not_null_both;
87     }
88     public void setTime_not_null_both(Time value) {
89         this.time_not_null_both = value;
90     }
91
92     @Column(name="time_not_null_none")
93     @Temporal(TemporalType.TIME)
94     public Time getTime_not_null_none() {
95         return time_not_null_none;
96     }
97     public void setTime_not_null_none(Time value) {
98         this.time_not_null_none = value;
99     }
100
101 }