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.OneToOne;
26 import org.apache.openjpa.persistence.jdbc.Index;
45 @javax.persistence.Entity
46 @javax.persistence.Table(
name=
"longintstringfk")
47 @javax.persistence.IdClass(value=LongIntStringOid.class)
51 @javax.persistence.Column(
name=
"longpk")
55 @javax.persistence.Column(
name=
"intpk")
59 @javax.persistence.Column(
name=
"stringpk")
64 @JoinColumn(
name=
"longfk", referencedColumnName=
"longpk"),
65 @JoinColumn(
name=
"intfk", referencedColumnName=
"intpk"),
66 @JoinColumn(
name=
"stringfk", referencedColumnName=
"stringpk")
68 @Index(
name=
"FK_longfkintfkstringfk")
71 @javax.persistence.Column(
name=
"stringvalue")
72 private String stringvalue;
77 public Long getLongpk() {
81 public void setLongpk(Long value) {
85 public int getIntpk() {
89 public void setIntpk(
int value) {
93 public String getStringpk() {
97 public void setStringpk(
String value) {
102 return longIntStringPKOneOne;
106 longIntStringPKOneOne = value;
111 o.longpk = getPK1(
id);
112 o.intpk = getPK2(
id);
113 o.stringpk = getPK3(
id);
114 o.stringvalue = getValue(
id);
124 public String toString() {
126 result.append(
"LongIntStringFK[");
127 result.append(longpk);
129 result.append(intpk);
130 result.append(
",\"");
131 result.append(stringpk);
132 result.append(
"\"]: ");
133 result.append(stringvalue);
135 return result.toString();