james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Charles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAILBOX-72) Requirements for a distributed mailbox implementation
Date Wed, 15 Jun 2011 17:03:47 GMT

    [ https://issues.apache.org/jira/browse/MAILBOX-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049883#comment-13049883
] 

Eric Charles commented on MAILBOX-72:
-------------------------------------

To design a datamodel, it is important to realize the kind of queries we will have to support.
I take here after the queries from the mailbox-jpa (SQL database).

>From AbstractJPAMessage:
@NamedQueries({
    @NamedQuery(name="findRecentMessagesInMailbox",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.recent = TRUE"),
    @NamedQuery(name="findUnseenMessagesInMailboxOrderByUid",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.seen = FALSE ORDER BY message.uid ASC"),
    @NamedQuery(name="findMessagesInMailbox",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam"),
    @NamedQuery(name="findMessagesInMailboxBetweenUIDs",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid BETWEEN :fromParam AND :toParam"),        
    @NamedQuery(name="findMessagesInMailboxWithUID",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid=:uidParam"),                    
    @NamedQuery(name="findMessagesInMailboxAfterUID",
            query="SELECT message FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid>=:uidParam"),                    
    @NamedQuery(name="findDeletedMessagesInMailbox",
            query="SELECT message.uid FROM Message message WHERE message.mailbox.mailboxId
= :idParam AND message.deleted=TRUE"),        
    @NamedQuery(name="findDeletedMessagesInMailboxBetweenUIDs",
            query="SELECT message.uid FROM Message message WHERE message.mailbox.mailboxId
= :idParam AND message.uid BETWEEN :fromParam AND :toParam AND message.deleted=TRUE"),   
    
    @NamedQuery(name="findDeletedMessagesInMailboxWithUID",
            query="SELECT message.uid FROM Message message WHERE message.mailbox.mailboxId
= :idParam AND message.uid=:uidParam AND message.deleted=TRUE"),                    
    @NamedQuery(name="findDeletedMessagesInMailboxAfterUID",
            query="SELECT message.uid FROM Message message WHERE message.mailbox.mailboxId
= :idParam AND message.uid>=:uidParam AND message.deleted=TRUE"),          
            
    @NamedQuery(name="deleteDeletedMessagesInMailbox",
            query="DELETE FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.deleted=TRUE"),        
    @NamedQuery(name="deleteDeletedMessagesInMailboxBetweenUIDs",
            query="DELETE FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid BETWEEN :fromParam AND :toParam AND message.deleted=TRUE"),        
    @NamedQuery(name="deleteDeletedMessagesInMailboxWithUID",
            query="DELETE FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid=:uidParam AND message.deleted=TRUE"),                    
    @NamedQuery(name="deleteDeletedMessagesInMailboxAfterUID",
            query="DELETE FROM Message message WHERE message.mailbox.mailboxId = :idParam
AND message.uid>=:uidParam AND message.deleted=TRUE"),  
                    
    @NamedQuery(name="countUnseenMessagesInMailbox",
            query="SELECT COUNT(message) FROM Message message WHERE message.mailbox.mailboxId
= :idParam AND message.seen=FALSE"),                     
    @NamedQuery(name="countMessagesInMailbox",
            query="SELECT COUNT(message) FROM Message message WHERE message.mailbox.mailboxId
= :idParam"),                    
    @NamedQuery(name="deleteMessages",
            query="DELETE FROM Message message WHERE message.mailbox.mailboxId = :idParam"),
    @NamedQuery(name="findLastUidInMailbox",
            query="SELECT message.uid FROM Message message WHERE message.mailbox.mailboxId
= :idParam ORDER BY message.uid DESC"),
    @NamedQuery(name="deleteAllMemberships",
            query="DELETE FROM Message message")

>From JPAMailbox
    @NamedQuery(name="findMailboxById",
        query="SELECT mailbox FROM Mailbox mailbox WHERE mailbox.mailbox.mailboxId = :idParam"),
    @NamedQuery(name="findMailboxByName",
        query="SELECT mailbox FROM Mailbox mailbox WHERE mailbox.name = :nameParam and mailbox.user
is NULL and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="findMailboxByNameWithUser",
        query="SELECT mailbox FROM Mailbox mailbox WHERE mailbox.name = :nameParam and mailbox.user=
:userParam and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="deleteAllMailboxes",
        query="DELETE FROM Mailbox mailbox"),
    @NamedQuery(name="findMailboxWithNameLikeWithUser",
        query="SELECT mailbox FROM Mailbox mailbox WHERE mailbox.name LIKE :nameParam and
mailbox.user= :userParam and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="findMailboxWithNameLike",
        query="SELECT mailbox FROM Mailbox mailbox WHERE mailbox.name LIKE :nameParam and
mailbox.user is NULL and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="countMailboxesWithNameLikeWithUser",
        query="SELECT COUNT(mailbox) FROM Mailbox mailbox WHERE mailbox.name LIKE :nameParam
and mailbox.user= :userParam and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="countMailboxesWithNameLike",
        query="SELECT COUNT(mailbox) FROM Mailbox mailbox WHERE mailbox.name LIKE :nameParam
and mailbox.user is NULL and mailbox.namespace= :namespaceParam"),
    @NamedQuery(name="listMailboxes",
        query="SELECT mailbox FROM Mailbox mailbox")

>From JPASubscription
@NamedQueries({
    @NamedQuery(name = "findFindMailboxSubscriptionForUser",
        query = "SELECT subscription FROM Subscription subscription WHERE subscription.username
= :userParam AND subscription.mailbox = :mailboxParam"),          
    @NamedQuery(name = "findSubscriptionsForUser",
        query = "SELECT subscription FROM Subscription subscription WHERE subscription.username
= :userParam")                  
})


> Requirements for a distributed mailbox implementation
> -----------------------------------------------------
>
>                 Key: MAILBOX-72
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-72
>             Project: James Mailbox
>          Issue Type: New Feature
>            Reporter: Eric Charles
>            Assignee: Norman Maurer
>         Attachments: Datamodel-mailbox-0.2.png
>
>
> This JIRA will collect some generic technical requirements regarding a distributed mailbox
implementation, whatever the implementation  technology is.
> The implementator is responsible to enforce those requirements.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message