1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.core.jpa.metadata; |
17 | |
|
18 | |
import javax.persistence.CascadeType; |
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | 0 | public class ManyToOneDescriptor extends ObjectDescriptor implements java.io.Serializable { |
24 | |
|
25 | |
private static final long serialVersionUID = -1277621663465909764L; |
26 | |
|
27 | |
public String toString() { |
28 | 0 | StringBuffer sb = new StringBuffer(); |
29 | 0 | sb.append("ManyToOneDescriptor = [ "); |
30 | 0 | sb.append("targetEntity:").append(targetEntity.getName()).append(", "); |
31 | 0 | sb.append("cascade = { "); |
32 | 0 | for (CascadeType ct : cascade) { |
33 | 0 | sb.append(ct).append(" "); |
34 | |
} |
35 | 0 | sb.append("}, "); |
36 | 0 | sb.append("fetch:").append(fetch).append(", "); |
37 | 0 | sb.append("optional:").append(optional); |
38 | 0 | if (!joinColumnDescriptors.isEmpty()) { |
39 | 0 | sb.append(", join columns = { "); |
40 | 0 | for (JoinColumnDescriptor joinColumnDescriptor : joinColumnDescriptors) { |
41 | 0 | sb.append(" jc = { "); |
42 | 0 | sb.append("name:").append(joinColumnDescriptor.getName()).append(", "); |
43 | 0 | sb.append("insertable:").append(joinColumnDescriptor.isInsertable()).append(", "); |
44 | 0 | sb.append("nullable:").append(joinColumnDescriptor.isNullable()).append(", "); |
45 | 0 | sb.append("unique:").append(joinColumnDescriptor.isUnique()).append(", "); |
46 | 0 | sb.append("updateable:").append(joinColumnDescriptor.isUpdateable()); |
47 | 0 | sb.append(" }"); |
48 | |
} |
49 | 0 | sb.append(" } "); |
50 | |
} |
51 | 0 | sb.append(" ]"); |
52 | 0 | return sb.toString(); |
53 | |
} |
54 | |
|
55 | |
} |