2 Copyright (c) 2010, 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 testsuite.clusterj.model;
20 import com.mysql.clusterj.annotation.Column;
21 import com.mysql.clusterj.annotation.Index;
22 import com.mysql.clusterj.annotation.Indices;
23 import com.mysql.clusterj.annotation.PersistenceCapable;
24 import com.mysql.clusterj.annotation.PrimaryKey;
28 drop table if exists stringtypes;
29 create table stringtypes (
30 id int not null primary key,
32 string_null_hash varchar(20),
33 string_null_btree varchar(300),
34 string_null_both varchar(20),
35 string_null_none varchar(300),
37 string_not_null_hash varchar(300),
38 string_not_null_btree varchar(20),
39 string_not_null_both varchar(300),
40 string_not_null_none varchar(20),
41 unique key idx_string_null_hash (string_null_hash) using hash,
42 key idx_string_null_btree (string_null_btree),
43 unique key idx_string_null_both (string_null_both),
45 unique key idx_string_not_null_hash (string_not_null_hash) using hash,
46 key idx_string_not_null_btree (string_not_null_btree),
47 unique key idx_string_not_null_both (string_not_null_both)
49 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
53 // @Index(name="idx_string_null_both", columns=@Column(name="string_null_both")),
54 // @Index(name="idx_string_not_null_both", columns=@Column(name="string_not_null_both")),
55 // @Index(name="idx_string_null_btree", columns=@Column(name="string_null_btree")),
56 // @Index(name="idx_string_not_null_btree", columns=@Column(name="string_not_null_btree")),
57 // @Index(name="idx_string_null_hash", columns=@Column(name="string_null_hash")),
58 // @Index(name="idx_string_not_null_hash", columns=@Column(name="string_not_null_hash"))
60 @PersistenceCapable(table="stringtypes")
61 @PrimaryKey(column="id")
62 public interface StringTypes extends IdBase {
68 @Column(name="string_null_hash")
69 @Index(name="idx_string_null_hash")
70 String getString_null_hash();
71 void setString_null_hash(String value);
73 @Column(name="string_null_btree")
74 @Index(name="idx_string_null_btree")
75 String getString_null_btree();
76 void setString_null_btree(String value);
78 @Column(name="string_null_both")
79 @Index(name="idx_string_null_both")
80 String getString_null_both();
81 void setString_null_both(String value);
83 @Column(name="string_null_none")
84 String getString_null_none();
85 void setString_null_none(String value);
87 @Column(name="string_not_null_hash")
88 @Index(name="idx_string_not_null_hash")
89 String getString_not_null_hash();
90 void setString_not_null_hash(String value);
92 @Column(name="string_not_null_btree")
93 @Index(name="idx_string_not_null_btree")
94 String getString_not_null_btree();
95 void setString_not_null_btree(String value);
97 @Column(name="string_not_null_both")
98 @Index(name="idx_string_not_null_both")
99 String getString_not_null_both();
100 void setString_not_null_both(String value);
102 @Column(name="string_not_null_none")
103 String getString_not_null_none();
104 void setString_not_null_none(String value);