01: package org.springunit.framework.samples.jpetstore.domain;
02:
03: import java.io.Serializable;
04:
05: import org.apache.commons.lang.builder.ToStringBuilder;
06: import org.apache.commons.lang.builder.ToStringStyle;
07:
08: public abstract class Persistable implements Comparable, Serializable {
09:
10: public Integer getId() {
11: return this .id;
12: }
13:
14: public void setId(Integer id) {
15: this .id = id;
16: }
17:
18: public String toString() {
19: return new ToStringBuilder(this , ToStringStyle.MULTI_LINE_STYLE)
20: .append("id", getId()).toString();
21: }
22:
23: protected static final int MULTIPLIER = 37;
24: protected static final int PRIME = 17;
25:
26: private Integer id;
27:
28: }
|