19 package com.mysql.clusterj.jpatest.model;
21 import java.io.Serializable;
22 import javax.persistence.JoinColumn;
23 import javax.persistence.JoinColumns;
24 import javax.persistence.ManyToOne;
41 @javax.persistence.Entity
42 @javax.persistence.Table(
name=
"longlongstringfk")
43 @javax.persistence.IdClass(value=LongLongStringOid.class)
47 @javax.persistence.Column(
name=
"longpk1")
51 @javax.persistence.Column(
name=
"longpk2")
55 @javax.persistence.Column(
name=
"stringpk")
60 @JoinColumn(
name=
"longfk1", referencedColumnName=
"longpk1"),
61 @JoinColumn(
name=
"longfk2", referencedColumnName=
"longpk2"),
62 @JoinColumn(
name=
"stringfk", referencedColumnName=
"stringpk")
64 @org.apache.openjpa.persistence.jdbc.Index(
name=
"FK_longfk1longfk2stringfk")
67 @javax.persistence.Column(
name=
"stringvalue")
68 private String stringvalue;
73 public long getLongpk1() {
77 public void setLongpk1(
long value) {
81 public long getLongpk2() {
85 public void setLongpk2(
long value) {
89 public String getStringpk() {
93 public void setStringpk(
String value) {
98 return longLongStringPKOneMany;
102 longLongStringPKOneMany = value;
107 o.longpk1 = getPK1(
id);
108 o.longpk2 = getPK2(
id);
109 o.stringpk = getPK3(
id);
110 o.stringvalue = getValue(
id);
120 public String toString() {
122 result.append(
"LongLongStringFK[");
123 result.append(longpk1);
125 result.append(longpk2);
126 result.append(
",\"");
127 result.append(stringpk);
128 result.append(
"\"]: ");
129 result.append(stringvalue);
130 result.append(
" -> (");
131 result.append((longLongStringPKOneMany==null)?
"null":longLongStringPKOneMany.toString());
133 return result.toString();