|
bea Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--theory.smart.foundation.EntityImpl | +--theory.smart.axiom.messaging.MailboxImpl
A simple message collection with some specialized message handling methods. The Mailbox is managed by the PostOffice
Primary Key = theory.smart.axiom.messaging.MailboxPk
Mailbox
,
MailboxHome
,
MailboxValue
, Serialized FormField Summary | |
com.sun.java.util.collections.LinkedList |
messages
message (List) [Mailbox] <*>------> [ theory.smart.axiom.messaging.Message ]
0..*
|
int |
nextId
nextId [Mailbox] <*>------> [ int ]
|
java.lang.String |
ownerId
ownerId [Mailbox] <*>------> [ String ] (Primary Key)
|
Fields inherited from class theory.smart.foundation.EntityImpl |
ctx,
isDirty,
isLoaded |
Constructor Summary | |
MailboxImpl()
|
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. |
void |
ejbActivate()
ejbActivate method. |
MailboxPk |
ejbCreate(MailboxPk mailboxPk)
|
protected void |
ejbCreateInitVars(MailboxPk mailboxPk)
|
java.util.Enumeration |
ejbFindAll()
|
MailboxPk |
ejbFindByPrimaryKey(MailboxPk pk)
|
void |
ejbLoad()
ejbLoad method. |
void |
ejbPassivate()
ejbPassivate method. |
void |
ejbPostCreate(MailboxPk mailboxPk)
|
void |
ejbRemove()
ejbRemove method. |
void |
ejbStore()
ejbStore method. |
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 |
setEntityContext(EntityContext ctx)
setEntityContext method. |
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 |
void |
unsetEntityContext()
unsetEntityContext method. |
Methods inherited from class theory.smart.foundation.EntityImpl |
ejbCreate,
ejbCreateInitVars,
ejbPostCreate,
getEntityContext,
isModified |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String ownerId
ownerId
[Mailbox] <*>------> [String
] (Primary Key)
public int nextId
nextId
[Mailbox] <*>------> [int
]
public com.sun.java.util.collections.LinkedList messages
message (List)
[Mailbox] <*>------> [theory.smart.axiom.messaging.Message
]
0..*
Constructor Detail |
public MailboxImpl() throws CreateException
Method Detail |
public MailboxValue getMailboxByValue() throws java.rmi.RemoteException
public void setMailboxByValue(MailboxValue value) throws java.rmi.RemoteException
MailboxValue
- the Mailbox value objectpublic MailboxPk ejbCreate(MailboxPk mailboxPk) throws CreateException, java.rmi.RemoteException
protected void ejbCreateInitVars(MailboxPk mailboxPk) throws CreateException, java.rmi.RemoteException
public void ejbPostCreate(MailboxPk mailboxPk) throws CreateException, java.rmi.RemoteException
public void ejbLoad() throws java.rmi.RemoteException
public void ejbStore() throws java.rmi.RemoteException
public void ejbRemove() throws java.rmi.RemoteException, RemoveException
public void ejbActivate() throws java.rmi.RemoteException
public void ejbPassivate() throws java.rmi.RemoteException
public void setEntityContext(EntityContext ctx) throws java.rmi.RemoteException
public void unsetEntityContext() throws java.rmi.RemoteException
public MailboxPk ejbFindByPrimaryKey(MailboxPk pk) throws FinderException, java.rmi.RemoteException
public java.util.Enumeration ejbFindAll() throws FinderException, java.rmi.RemoteException
public java.lang.String getOwnerId() throws java.rmi.RemoteException
public int getNextId() throws java.rmi.RemoteException
public void setNextId(int nextId) throws java.rmi.RemoteException
nextId
- nextId to be addedpublic void addMessage(int index, Message message)
index
- index at which the specified message is to be inserted.message
- message to be inserted.public boolean addMessage(Message message)
message
- message to be appended to the message list.public boolean addMessages(int index, com.sun.java.util.collections.LinkedList messages)
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)
messages
- messages to be inserted into the message list.public void addFirstMessage(Message message)
public void addLastMessage(Message message)
public boolean containsMessage(Message message)
message
- message whose presence in the message list is to be tested.public Message getMessage(int index)
index
- index of message to return.public com.sun.java.util.collections.LinkedList getMessages(int fromIndex, int toIndex)
fromIndex
- low endpoint (inclusive) of the subList.toKey
- high endpoint (exclusive) of the subList.public com.sun.java.util.collections.LinkedList getMessages()
public Message getFirstMessage()
public Message getLastMessage()
public int getNumberOfMessages()
public int indexOfMessage(Message message)
message
- message to search for.public boolean isMessagesEmtpy()
public int lastIndexOfMessage(Message message)
message
- message to search for.public void removeAllMessages()
public Message removeMessage(int index)
index
- the index of the message to removed.public boolean removeMessage(Message message)
message
- message to be removed from the message list, if present.public Message removeFirstMessage()
public Message removeLastMessage()
public Message setMessage(int index, Message message)
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 |