1 /*
2    Copyright (c) 2010, 2021, Oracle and/or its affiliates.
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, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program 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 General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 package testsuite.clusterj.model;
26 
27 import com.mysql.clusterj.annotation.Column;
28 import com.mysql.clusterj.annotation.Index;
29 import com.mysql.clusterj.annotation.Indices;
30 import com.mysql.clusterj.annotation.PersistenceCapable;
31 import com.mysql.clusterj.annotation.PrimaryKey;
32 
33 /** Schema
34  *
35 drop table if exists stringtypes;
36 create table stringtypes (
37  id int not null primary key,
38 
39  string_null_hash varchar(20),
40  string_null_btree varchar(300),
41  string_null_both varchar(20),
42  string_null_none varchar(300),
43 
44  string_not_null_hash varchar(300),
45  string_not_null_btree varchar(20),
46  string_not_null_both varchar(300),
47  string_not_null_none varchar(20),
48  unique key idx_string_null_hash (string_null_hash) using hash,
49  key idx_string_null_btree (string_null_btree),
50  unique key idx_string_null_both (string_null_both),
51 
52  unique key idx_string_not_null_hash (string_not_null_hash) using hash,
53  key idx_string_not_null_btree (string_not_null_btree),
54  unique key idx_string_not_null_both (string_not_null_both)
55 
56 ) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
57 
58  */
59 //@Indices({
60 //    @Index(name="idx_string_null_both", columns=@Column(name="string_null_both")),
61 //    @Index(name="idx_string_not_null_both", columns=@Column(name="string_not_null_both")),
62 //    @Index(name="idx_string_null_btree", columns=@Column(name="string_null_btree")),
63 //    @Index(name="idx_string_not_null_btree", columns=@Column(name="string_not_null_btree")),
64 //    @Index(name="idx_string_null_hash", columns=@Column(name="string_null_hash")),
65 //    @Index(name="idx_string_not_null_hash", columns=@Column(name="string_not_null_hash"))
66 //})
67 @PersistenceCapable(table="stringtypes")
68 @PrimaryKey(column="id")
69 public interface StringTypes extends IdBase {
70 
getId()71     int getId();
setId(int id)72     void setId(int id);
73 
74     // String
75     @Column(name="string_null_hash")
76     @Index(name="idx_string_null_hash")
getString_null_hash()77     String getString_null_hash();
setString_null_hash(String value)78     void setString_null_hash(String value);
79 
80     @Column(name="string_null_btree")
81     @Index(name="idx_string_null_btree")
getString_null_btree()82     String getString_null_btree();
setString_null_btree(String value)83     void setString_null_btree(String value);
84 
85     @Column(name="string_null_both")
86     @Index(name="idx_string_null_both")
getString_null_both()87     String getString_null_both();
setString_null_both(String value)88     void setString_null_both(String value);
89 
90     @Column(name="string_null_none")
getString_null_none()91     String getString_null_none();
setString_null_none(String value)92     void setString_null_none(String value);
93 
94     @Column(name="string_not_null_hash")
95     @Index(name="idx_string_not_null_hash")
getString_not_null_hash()96     String getString_not_null_hash();
setString_not_null_hash(String value)97     void setString_not_null_hash(String value);
98 
99     @Column(name="string_not_null_btree")
100     @Index(name="idx_string_not_null_btree")
getString_not_null_btree()101     String getString_not_null_btree();
setString_not_null_btree(String value)102     void setString_not_null_btree(String value);
103 
104     @Column(name="string_not_null_both")
105     @Index(name="idx_string_not_null_both")
getString_not_null_both()106     String getString_not_null_both();
setString_not_null_both(String value)107     void setString_not_null_both(String value);
108 
109     @Column(name="string_not_null_none")
getString_not_null_none()110     String getString_not_null_none();
setString_not_null_none(String value)111     void setString_not_null_none(String value);
112 
113 }
114