EMailAccountDAO.java :  » Content-Management-System » contineo » org » contineo » core » communication » dao » Java Open Source

Java Open Source » Content Management System » contineo 
contineo » org » contineo » core » communication » dao » EMailAccountDAO.java
package org.contineo.core.communication.dao;

import java.util.Collection;

import org.contineo.core.communication.EMailAccount;

/**
 * DAO for <code>EMailAccount</code> handling.
 * 
 * @author Michael Scholz
 * @author Alessandro Gasparini
 */
public interface EMailAccountDAO {

    /**
     * This method persists an emailaccount object.
     * 
     * @param account EMailAccount which should be store.
     * @return True if successfully stored in a database.
     */
    public boolean store(EMailAccount account); 

    /**
     * This method deletes an emailaccount.
     * 
     * @param accountId AccountId of the emailaccount which should be delete.
     */
    public boolean delete(int accountId); 

    /**
     * This method finds an emailaccount by its accountId.
     */
    public EMailAccount findByPrimaryKey(int accountId); 

    /**
     * Loads all accounts
     * 
     * @return
     */
    public Collection<EMailAccount> findAll(); 

    public Collection<EMailAccount> findByUserName(String username); 
    
        /**
     * This method deletes an emailaccount.
     * 
     * @param username Username of the emailaccount which should be delete.
     */
    public boolean deleteByUsername(String username); 
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.