01: package org.contineo.core.communication.dao;
02:
03: import java.util.Collection;
04:
05: import org.contineo.core.communication.EMailAccount;
06:
07: /**
08: * DAO for <code>EMailAccount</code> handling.
09: *
10: * @author Michael Scholz
11: * @author Alessandro Gasparini
12: */
13: public interface EMailAccountDAO {
14:
15: /**
16: * This method persists an emailaccount object.
17: *
18: * @param account EMailAccount which should be store.
19: * @return True if successfully stored in a database.
20: */
21: public boolean store(EMailAccount account);
22:
23: /**
24: * This method deletes an emailaccount.
25: *
26: * @param accountId AccountId of the emailaccount which should be delete.
27: */
28: public boolean delete(int accountId);
29:
30: /**
31: * This method finds an emailaccount by its accountId.
32: */
33: public EMailAccount findByPrimaryKey(int accountId);
34:
35: /**
36: * Loads all accounts
37: *
38: * @return
39: */
40: public Collection<EMailAccount> findAll();
41:
42: public Collection<EMailAccount> findByUserName(String username);
43:
44: /**
45: * This method deletes an emailaccount.
46: *
47: * @param username Username of the emailaccount which should be delete.
48: */
49: public boolean deleteByUsername(String username);
50: }
|