1 5 package org.exoplatform.services.communication.sms.model; 6 7 import java.io.Serializable ; 8 import org.exoplatform.services.communication.sms.model.MessageStatus; 9 import org.exoplatform.services.communication.sms.model.Recipient; 10 11 12 16 public class RecipientImpl implements Serializable , Recipient { 17 18 public static Integer _identity = new Integer (0); 19 private Integer _id; 20 private String _to; 21 private MessageStatus _status = MessageStatus.DRAFT; 22 private String _error = ""; 23 24 public RecipientImpl(String to) { 25 _to = to; 26 synchronized(_identity) { 27 int id = _identity.intValue(); 28 id++; 29 _id = _identity = new Integer (id); 30 } 31 } 32 33 public Integer getId() { 34 return _id; 35 } 36 37 public String getTo() { 38 return _to; 39 } 40 41 public Recipient setTo(String to) { 42 _to = to; 43 return this; 44 } 45 46 public MessageStatus getStatus() { 47 return _status; 48 } 49 50 public Recipient setStatus(MessageStatus status) { 51 _status = status; 52 return this; 53 } 54 55 public String getError() { 56 return _error; 57 } 58 59 public Recipient setError(String error) { 60 _error = error; 61 return this; 62 } 63 } 64 65 | Popular Tags |