Project

General

Profile

Download (1.25 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.persistence.dao.common;
10

    
11
import java.util.List;
12

    
13
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
14
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
15

    
16
/**
17
 * @author a.mueller
18
 * @since 2013-09-09
19
 */
20
public interface IPreferenceDao {
21

    
22
	/**
23
	 * Retrieve the value for the given preference key.
24
	 * @param key
25
	 * @return
26
	 */
27
	public CdmPreference get(CdmPreference.PrefKey key);
28

    
29
	/**
30
	 * Write the value for the preference's key
31
	 * @param preference
32
	 */
33
	public void set(CdmPreference preference);
34

    
35
	/**
36
	 * Return the number of all existing cdm preferences
37
	 * @return
38
	 */
39
	public int count();
40

    
41
    /**
42
     * @return
43
     */
44
    List<CdmPreference> list();
45

    
46
    /**
47
     * Retrieves the best matching CdmPreference for the given
48
     * taxon node and the given predicate
49
     * @param taxonNode
50
     * @param predicate
51
     * @return the CdmPreference
52
     */
53
    CdmPreference find(TaxonNode taxonNode, String predicate);
54

    
55

    
56
}
(17-17/27)