Hi,
On 5/15/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote:
Jukka Zitting ha scritto:
> c) What parts of a mail message need to be stored when
> MailRepository.store(Mail) is called? For example should the mail name
> (Mail.getName()) or attributes (Mail.hasAttributes(), etc.) be stored?
the name is the key used to retrieve it later.
attributes must be persisted. Every property you see in the Mail object
is persisted (name, sender, recipients, remoteaddr, remotehost,
errormessage, message, state, lastupdated).
OK. I guess the attributes can be any serializable objects, so the
implementation should use standard Java serialization in case it
doesn't know the type of the attribute.
> d) Should mailRepository.store(mailRepository.retrieve(...)) update
> the existing message or create a new one?
Update the existing message.
Store using an existing key is an update. Store using a new key is an
insert.
Is the repository implementation required to keep the original key
(from mail.getName()) when stroring a new message, or can it replace
it with an internal identifier?
Maybe some of this things should be changed, I simply replied with what
the current code does and expects.
ACK. Thanks a lot for the help!
BR,
Jukka Zitting
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]