@Service @Transactional(readOnly=true) public class PreferenceServiceImpl extends java.lang.Object implements IPreferenceService
Constructor and Description |
---|
PreferenceServiceImpl() |
Modifier and Type | Method and Description |
---|---|
long |
count()
Return the number of all existing cdm preferences
|
CdmPreference |
find(CdmBase taxonNodeRelatedCdmBase,
java.lang.String predicate)
Returns the best matching preference that matches the given
predicate and the filter.
|
CdmPreference |
find(CdmPreference.PrefKey key)
Retrieve the best matching value for the given preference key.
|
CdmPreference |
find(TaxonNode taxonNode,
IPreferencePredicate<?> predicate) |
java.lang.Object |
find(TaxonNode taxonNode,
java.lang.String predicate)
Returns the best matching preference that matches the given
predicate and the taxon node filter.
|
CdmPreference |
findDatabase(IPreferencePredicate<?> predicate)
Retrieve the database wide preference for the given predicate.
|
CdmPreference |
findExact(CdmPreference.PrefKey key)
Retrieve the preference that has a key exactly matching the given key.
|
CdmPreference |
findTaxEditor(IPreferencePredicate<?> predicate)
Retrieve the TaxEditor wide preference for the given predicate.
|
CdmPreference |
findVaadin(IPreferencePredicate<?> predicate)
Retrieve the vaadin wide preference for the given predicate.
|
java.util.List<CdmPreference> |
list()
Returns all CDM preferences.
|
java.util.List<CdmPreference> |
list(IPreferencePredicate<?> predicate)
Returns all matching preferences for the given predicate.
|
java.util.List<CdmPreference> |
list(java.lang.String subject,
java.lang.String predicate)
Retrieve all matching values for the given preference key.
|
void |
remove(CdmPreference.PrefKey preference) |
void |
set(CdmPreference preference)
Write the value for the preference's key
|
public CdmPreference findExact(CdmPreference.PrefKey key)
IPreferenceService
findExact
in interface IPreferenceService
public CdmPreference find(CdmPreference.PrefKey key)
IPreferenceService
find
in interface IPreferenceService
key
- the key defining the data to retrievepublic CdmPreference findDatabase(IPreferencePredicate<?> predicate)
findDatabase
in interface IPreferenceService
public CdmPreference findVaadin(IPreferencePredicate<?> predicate)
findVaadin
in interface IPreferenceService
public CdmPreference findTaxEditor(IPreferencePredicate<?> predicate)
IPreferenceService
findTaxEditor
in interface IPreferenceService
@Transactional(readOnly=false) public void set(CdmPreference preference)
IPreferenceService
set
in interface IPreferenceService
@Transactional(readOnly=false) public void remove(CdmPreference.PrefKey preference)
remove
in interface IPreferenceService
public long count()
IPreferenceService
count
in interface IPreferenceService
public java.util.List<CdmPreference> list()
IPreferenceService
list
in interface IPreferenceService
public java.util.List<CdmPreference> list(IPreferencePredicate<?> predicate)
IPreferenceService
#find(PrefKey)
to find the best matching preference
or use PreferenceResolver
to resolve the best matching
preference on client side.list
in interface IPreferenceService
public java.lang.Object find(TaxonNode taxonNode, java.lang.String predicate)
IPreferenceService
find
in interface IPreferenceService
public CdmPreference find(TaxonNode taxonNode, IPreferencePredicate<?> predicate)
find
in interface IPreferenceService
public java.util.List<CdmPreference> list(java.lang.String subject, java.lang.String predicate)
IPreferenceService
list
in interface IPreferenceService
subject
- the PreferenceSubject
represented as stringpredicate
- the predicate to retrievepublic CdmPreference find(CdmBase taxonNodeRelatedCdmBase, java.lang.String predicate)
IPreferenceService
find
in interface IPreferenceService
Copyright © 2007-2020 EDIT. All Rights Reserved.