2
Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
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.
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.
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
18
package com.mysql.clusterj.jpatest.model;
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;
31
drop table if exists timetypes;
32
create table timetypes (
33
id int not null primary key,
35
time_not_null_hash time,
36
time_not_null_btree time,
37
time_not_null_both time,
38
time_not_null_none time
40
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
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);
48
@Table(name="timetypes")
49
public class TimeAsSqlTimeTypes implements IdBase {
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;
60
public void setId(int id) {
65
@Column(name="time_not_null_hash")
66
@Temporal(TemporalType.TIME)
67
public Time getTime_not_null_hash() {
68
return time_not_null_hash;
70
public void setTime_not_null_hash(Time value) {
71
this.time_not_null_hash = value;
74
@Column(name="time_not_null_btree")
75
@Temporal(TemporalType.TIME)
76
public Time getTime_not_null_btree() {
77
return time_not_null_btree;
79
public void setTime_not_null_btree(Time value) {
80
this.time_not_null_btree = value;
83
@Column(name="time_not_null_both")
84
@Temporal(TemporalType.TIME)
85
public Time getTime_not_null_both() {
86
return time_not_null_both;
88
public void setTime_not_null_both(Time value) {
89
this.time_not_null_both = value;
92
@Column(name="time_not_null_none")
93
@Temporal(TemporalType.TIME)
94
public Time getTime_not_null_none() {
95
return time_not_null_none;
97
public void setTime_not_null_none(Time value) {
98
this.time_not_null_none = value;