1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.metadata;
17
18 import javax.persistence.CascadeType;
19
20 import org.apache.commons.lang.StringUtils;
21
22
23
24
25 @Deprecated
26 public class OneToOneDescriptor extends ObjectDescriptor implements java.io.Serializable {
27
28 private static final long serialVersionUID = 5005807906661228700L;
29
30 private String mappedBy = "";
31
32 public String getMappedBy() {
33 return this.mappedBy;
34 }
35
36 public void setMappedBy(String mappedBy) {
37 this.mappedBy = mappedBy;
38 }
39
40 public String toString() {
41 StringBuffer sb = new StringBuffer();
42 sb.append("OneToOneDescriptor = [ ");
43 sb.append("targetEntity:").append(targetEntity.getName()).append(", ");
44 sb.append("cascade = { ");
45 for (CascadeType ct : cascade) {
46 sb.append(ct).append(" ");
47 }
48 sb.append("}, ");
49 sb.append("fetch:").append(fetch).append(", ");
50 sb.append("optional:").append(optional);
51 if (!StringUtils.isBlank(mappedBy)) {
52 sb.append(", mappedBy:").append(mappedBy);
53 }
54 if (!joinColumnDescriptors.isEmpty()) {
55 sb.append(", join columns = { ");
56 for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) {
57 sb.append(" jc = { ");
58 sb.append("name:").append(joinColumnDescriptor.getName()).append(", ");
59 sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", ");
60 sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", ");
61 sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", ");
62 sb.append("updateable:").append(joinColumnDescriptor.isUpdateable());
63 sb.append(" }");
64 }
65 sb.append(" } ");
66 }
67 sb.append(" ]");
68 return sb.toString();
69 }
70
71 }