MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A.java
1 /* -*- mode: java; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=4:tabstop=4:smarttab:
3  *
4  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 package com.mysql.cluster.crund;
21 
22 import java.io.Serializable;
23 import java.io.ObjectInputStream;
24 import java.io.ObjectOutputStream;
25 import java.io.IOException;
26 import java.util.Collection;
27 
31 @javax.persistence.Entity
32 @javax.persistence.Table(name="a")
33 public class A implements Serializable {
34  // see B0.java for persistence annotations
35 
36  @javax.persistence.Id
37  private int id;
38 
39  private int cint;
40 
41  private long clong;
42 
43  private float cfloat;
44 
45  private double cdouble;
46 
47  @javax.persistence.OneToMany(mappedBy="a")
48  private Collection<B0> b0s;
49 
50  public A() {
51  }
52 
53  public int getId() {
54  return id;
55  }
56 
57  public void setId(int id) {
58  this.id = id;
59  }
60 
61  public int getCint() {
62  return cint;
63  }
64 
65  public void setCint(int cint) {
66  this.cint = cint;
67  }
68 
69  public long getClong() {
70  return clong;
71  }
72 
73  public void setClong(long clong) {
74  this.clong = clong;
75  }
76 
77  public float getCfloat() {
78  return cfloat;
79  }
80 
81  public void setCfloat(float cfloat) {
82  this.cfloat = cfloat;
83  }
84 
85  public double getCdouble() {
86  return cdouble;
87  }
88 
89  public void setCdouble(double cdouble) {
90  this.cdouble = cdouble;
91  }
92 
93  public Collection<B0> getB0s() {
94  return b0s;
95  }
96 
97  public void setB0s(Collection<B0> b0s) {
98  this.b0s = b0s;
99  }
100 
101  // while implementing Serializable...
102  static private final long serialVersionUID = -3359921162347129079L;
103 
104  // while implementing Serializable...
105  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
106  in.defaultReadObject();
107  }
108 
109  // while implementing Serializable...
110  private void writeObject(ObjectOutputStream out) throws IOException {
111  out.defaultWriteObject();
112  }
113 
114 /*
115  static public class Oid implements Serializable {
116 
117  public int id;
118 
119  public Oid() {
120  }
121 
122  public boolean equals(Object obj) {
123  if (obj == null || !this.getClass().equals(obj.getClass()))
124  return false;
125  Oid o = (Oid)obj;
126  return (this.id == o.id);
127  }
128 
129  public int hashCode() {
130  return id;
131  }
132  }
133 */
134 }
135