|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A simple message collection with some specialized message handling methods. The Mailbox is managed by the PostOffice
Primary Key = theory.smart.axiom.messaging.MailboxPk
ownerId
[Mailbox] <*>------> [String
] (Primary Key)
nextId
[Mailbox] <*>------> [int
]
message (List)
[Mailbox] <*>------> [theory.smart.axiom.messaging.Message
]
0..*
MailboxPk
,
MailboxHome
,
MailboxImpl
,
MailboxValue
Method Summary | |
void |
addFirstMessage(Message message)
Inserts the given message at the beginning of the message list. |
void |
addLastMessage(Message message)
Appends the given message to the end of the message list. |
void |
addMessage(int index,
Message message)
Inserts the specified message at the specified position in the message list. |
boolean |
addMessage(Message message)
Appends the specified message to the end of the message list. |
void |
addMessage(java.lang.String body)
Create a new nessage with the nextId and increment the nextId. |
boolean |
addMessages(int index,
com.sun.java.util.collections.LinkedList messages)
Inserts all of the messages in the specified collection into this list, starting at the specified position. |
boolean |
addMessages(com.sun.java.util.collections.LinkedList messages)
Appends all of the messages in the specified collection to the end of the message list, in the order that they are returned by the specified collection's iterator. |
boolean |
containsMessage(Message message)
Returns true if the message list contains the specified element. |
Message |
getFirstMessage()
Returns the first message in the message list. |
Message |
getLastMessage()
Returns the last message in the message list. |
MailboxValue |
getMailboxByValue()
Get all of Mailbox's attributes. |
Message |
getMessage(int index)
Returns the message at the specified position in the message list. |
com.sun.java.util.collections.LinkedList |
getMessages()
Returns all of the messages in the message list. |
com.sun.java.util.collections.LinkedList |
getMessages(int fromIndex,
int toIndex)
Returns a view of the portion of the message list between fromIndex, inclusive, and toIndex, exclusive. |
int |
getNextId()
Get the value of nextId |
int |
getNumberOfMessages()
Returns the number of messages in the message list. |
java.lang.String |
getOwnerId()
|
int |
indexOfMessage(Message message)
Returns the index in the message list of the first occurrence of the specified element, or -1 if the message list does not contain this element. |
boolean |
isMessagesEmtpy()
Returns true if the message list contains no messages. |
int |
lastIndexOfMessage(Message message)
Returns the index in the message list of the last occurrence of the specified element, or -1 if the message list does not contain this element. |
void |
removeAllMessages()
Removes all of the messages from the message list. |
Message |
removeFirstMessage()
Removes and returns the first message from the message list. |
Message |
removeLastMessage()
Removes and returns the last message from the message list. |
Message |
removeMessage(int index)
Removes the message at the specified position in the message list. |
boolean |
removeMessage(Message message)
Removes the first occurrence of the specified message in the message list. |
void |
setMailboxByValue(MailboxValue value)
Set all of Mailbox's attributes to the passed in value. |
Message |
setMessage(int index,
Message message)
Replaces the message at the specified position in the message list with the specified element. |
void |
setNextId(int nextId)
Set the value of nextId |
Methods inherited from interface javax.ejb.EJBObject |
getEJBHome,
getHandle,
getPrimaryKey,
isIdentical,
remove |
Method Detail |
public MailboxValue getMailboxByValue() throws java.rmi.RemoteException
public void setMailboxByValue(MailboxValue value) throws java.rmi.RemoteException
MailboxValue
- the Mailbox value objectpublic java.lang.String getOwnerId() throws java.rmi.RemoteException
public int getNextId() throws java.rmi.RemoteException
public void setNextId(int nextId) throws java.rmi.RemoteException
nextIds
- nextId to be addedpublic void addMessage(int index, Message message) throws java.rmi.RemoteException
index
- index at which the specified message is to be inserted.message
- message to be inserted.public boolean addMessage(Message message) throws java.rmi.RemoteException
message
- message to be appended to the message list.public boolean addMessages(int index, com.sun.java.util.collections.LinkedList messages) throws java.rmi.RemoteException
index
- index at which to insert first element
from the specified collection.messages
- messages to be inserted into the message list.public boolean addMessages(com.sun.java.util.collections.LinkedList messages) throws java.rmi.RemoteException
messages
- messages to be inserted into the message list.public void addFirstMessage(Message message) throws java.rmi.RemoteException
public void addLastMessage(Message message) throws java.rmi.RemoteException
public boolean containsMessage(Message message) throws java.rmi.RemoteException
message
- message whose presence in the message list is to be tested.public Message getMessage(int index) throws java.rmi.RemoteException
index
- index of message to return.public com.sun.java.util.collections.LinkedList getMessages(int fromIndex, int toIndex) throws java.rmi.RemoteException
fromIndex
- low endpoint (inclusive) of the subList.toKey
- high endpoint (exclusive) of the subList.public com.sun.java.util.collections.LinkedList getMessages() throws java.rmi.RemoteException
public Message getFirstMessage() throws java.rmi.RemoteException
public Message getLastMessage() throws java.rmi.RemoteException
public int getNumberOfMessages() throws java.rmi.RemoteException
public int indexOfMessage(Message message) throws java.rmi.RemoteException
message
- message to search for.public boolean isMessagesEmtpy() throws java.rmi.RemoteException
public int lastIndexOfMessage(Message message) throws java.rmi.RemoteException
message
- message to search for.public void removeAllMessages() throws java.rmi.RemoteException
public Message removeMessage(int index) throws java.rmi.RemoteException
index
- the index of the message to removed.public boolean removeMessage(Message message) throws java.rmi.RemoteException
message
- message to be removed from the message list, if present.public Message removeFirstMessage() throws java.rmi.RemoteException
public Message removeLastMessage() throws java.rmi.RemoteException
public Message setMessage(int index, Message message) throws java.rmi.RemoteException
index
- index of message to replace.message
- message to be stored at the specified position.public void addMessage(java.lang.String body) throws java.rmi.RemoteException
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |