1 package org.itracker.persistence.dao;
2
3 import org.itracker.model.Component;
4
5 import java.util.List;
6
7 /**
8 * Component Data Access Object interface.
9 *
10 * @author Johnny
11 */
12 public interface ComponentDAO extends BaseDAO<Component> {
13
14 /**
15 * Finds the component with the given ID.
16 *
17 * @param componentId ID of the component to retrieve
18 * @return component with the given ID or <tt>null</tt> if none exists
19 */
20 Component findById(Integer componentId);
21
22 /**
23 * Finds all components of a given project.
24 *
25 * @param projectId ID of the project of which to retrieve all components
26 * @return list of components, in unspecified order
27 */
28 List<Component> findByProject(Integer projectId);
29
30 }