1 package org.itracker.persistence.dao;
2
3 import org.itracker.model.ProjectScript;
4
5 import java.util.List;
6
7 /**
8 * Interface to define basic operations to deal with the
9 * <code>ProjectScript</code> entity
10 */
11 public interface ProjectScriptDAO extends BaseDAO<ProjectScript> {
12
13 /**
14 * Find a <code>ProjectScript</code> by its primary key
15 *
16 * @param scriptId system ID
17 * @return project script or <tt>null</tt> if none exists with the given id
18 */
19 ProjectScript findByPrimaryKey(Integer scriptId);
20
21 /**
22 * Finds all <code>ProjectScript</code>s
23 *
24 * @return all <code>ProjectScript</code>s
25 */
26 List<ProjectScript> findAll();
27
28 /**
29 * Finds all scripts applied to fields on a particular project.
30 *
31 * @return list of project scripts
32 */
33 List<ProjectScript> findByProject(Integer projectId);
34
35 /**
36 * Finds all scripts applied to fields on a particular project.
37 *
38 * @return list of project scripts
39 */
40 List<ProjectScript> findByProjectField(Integer projectId, Integer fieldId);
41
42 }