01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.spring.bean;
05:
06: public class PersistentObject {
07:
08: private int id;
09:
10: private String phoneNumber;
11:
12: private String message;
13:
14: private PersistentSubobject status = new PersistentSubobject(
15: PersistentSubobject.NOT_SENT);
16:
17: public PersistentObject() {
18: }
19:
20: public PersistentObject(int id, String phoneNumber, String message) {
21: this .id = id;
22: this .phoneNumber = phoneNumber;
23: this .message = message;
24: }
25:
26: public PersistentObject(String phoneNumber, String message) {
27: this .phoneNumber = phoneNumber;
28: this .message = message;
29: }
30:
31: public int getMessageId() {
32: return id;
33: }
34:
35: public String getMessage() {
36: return message;
37: }
38:
39: public String getPhoneNumber() {
40: return phoneNumber;
41: }
42:
43: public void noteMessageStatus(PersistentSubobject messageStatus) {
44: this .status = messageStatus;
45: }
46:
47: public void noteQueued() {
48: status.noteQueued();
49: }
50:
51: public boolean isSentOrDelivered() {
52: return status.isSentOrDelivered();
53: }
54:
55: public void setMessage(String message) {
56: this .message = message;
57: }
58:
59: public void setPhoneNumber(String phoneNumber) {
60: this .phoneNumber = phoneNumber;
61: }
62:
63: public String getStatusCode() {
64: return status.getStatusCode();
65: }
66:
67: }
|