1 /*
2    Copyright 2010 Sun Microsystems, Inc.
3    All rights reserved. Use is subject to license terms.
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License, version 2.0,
7    as published by the Free Software Foundation.
8 
9    This program is also distributed with certain software (including
10    but not limited to OpenSSL) that is licensed under separate terms,
11    as designated in a particular file or component or in included license
12    documentation.  The authors of MySQL hereby grant you an additional
13    permission to link the program and your derivative works with the
14    separately licensed software that they have included with MySQL.
15 
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License, version 2.0, for more details.
20 
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
24 */
25 
26 package testsuite.clusterj.model;
27 
28 import com.mysql.clusterj.annotation.Column;
29 import com.mysql.clusterj.annotation.Index;
30 import com.mysql.clusterj.annotation.PersistenceCapable;
31 import com.mysql.clusterj.annotation.PrimaryKey;
32 
33 /** Schema
34  *
35 drop table if exists floattypes;
36 create table floattypes (
37  id int not null primary key,
38 
39  float_null_hash float,
40  float_null_btree float,
41  float_null_both float,
42  float_null_none float,
43 
44  float_not_null_hash float,
45  float_not_null_btree float,
46  float_not_null_both float,
47  float_not_null_none float
48 
49 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
50 
51 create unique index idx_float_null_hash using hash on floattypes(float_null_hash);
52 create index idx_float_null_btree on floattypes(float_null_btree);
53 create unique index idx_float_null_both on floattypes(float_null_both);
54 
55 create unique index idx_float_not_null_hash using hash on floattypes(float_not_null_hash);
56 create index idx_float_not_null_btree on floattypes(float_not_null_btree);
57 create unique index idx_float_not_null_both on floattypes(float_not_null_both);
58 
59  */
60 //@Indices({
61 //    @Index(name="idx_float_null_both", columns=@Column(name="float_null_both")),
62 //    @Index(name="idx_float_not_null_both", columns=@Column(name="float_not_null_both"))
63 //})
64 /** Float types allow hash indexes to be defined but ndb-bindings
65  * do not allow an equal lookup, so they are not used.
66  * If hash indexes are supported in future, uncomment the @Index annotations.
67  */
68 @PersistenceCapable(table="floattypes")
69 @PrimaryKey(column="id")
70 public interface FloatTypes extends IdBase {
71 
getId()72     int getId();
setId(int id)73     void setId(int id);
74 
75     // Float
76     @Column(name="float_null_hash")
77 ///    @Index(name="idx_float_null_hash")
getFloat_null_hash()78     Float getFloat_null_hash();
setFloat_null_hash(Float value)79     void setFloat_null_hash(Float value);
80 
81     @Column(name="float_null_btree")
82     @Index(name="idx_float_null_btree")
getFloat_null_btree()83     Float getFloat_null_btree();
setFloat_null_btree(Float value)84     void setFloat_null_btree(Float value);
85 
86     @Column(name="float_null_both")
getFloat_null_both()87     Float getFloat_null_both();
setFloat_null_both(Float value)88     void setFloat_null_both(Float value);
89 
90     @Column(name="float_null_none")
getFloat_null_none()91     Float getFloat_null_none();
setFloat_null_none(Float value)92     void setFloat_null_none(Float value);
93 
94     @Column(name="float_not_null_hash")
95 //    @Index(name="idx_float_not_null_hash")
getFloat_not_null_hash()96     float getFloat_not_null_hash();
setFloat_not_null_hash(float value)97     void setFloat_not_null_hash(float value);
98 
99     @Column(name="float_not_null_btree")
100     @Index(name="idx_float_not_null_btree")
getFloat_not_null_btree()101     float getFloat_not_null_btree();
setFloat_not_null_btree(float value)102     void setFloat_not_null_btree(float value);
103 
104     @Column(name="float_not_null_both")
getFloat_not_null_both()105     float getFloat_not_null_both();
setFloat_not_null_both(float value)106     void setFloat_not_null_both(float value);
107 
108     @Column(name="float_not_null_none")
getFloat_not_null_none()109     float getFloat_not_null_none();
setFloat_not_null_none(float value)110     void setFloat_not_null_none(float value);
111 
112 }
113