1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.bo;
17
18 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
19 import org.apache.commons.lang.builder.ToStringBuilder;
20 import org.apache.commons.lang.builder.ToStringStyle;
21
22 import java.lang.reflect.Field;
23 import java.util.LinkedHashMap;
24
25
26
27
28 public abstract class BusinessObjectBase implements BusinessObject {
29
30
31
32
33
34 public BusinessObjectBase() {
35 }
36
37 @Override
38 public String toString() {
39 class BusinessObjectToStringBuilder extends ReflectionToStringBuilder {
40 private BusinessObjectToStringBuilder(Object object) {
41 super(object);
42 }
43
44 public boolean accept(Field field) {
45 if (BusinessObject.class.isAssignableFrom(field.getType())) {
46 return false;
47 }
48 return super.accept(field);
49 }
50 };
51 ReflectionToStringBuilder toStringBuilder = new BusinessObjectToStringBuilder(this);
52 return toStringBuilder.toString();
53 }
54
55 }