@Repository public class PreferenceDaoImpl extends Object implements PreferenceDao
| Constructor and Description | 
|---|
| PreferenceDaoImpl()Creates new instance of the  PreferenceDaoImpl. | 
| Modifier and Type | Method and Description | 
|---|---|
| Preference | findPreference(long id)Find and return preferences for a given username. | 
| Preference | findPreference(String username,
                            Sender sender)Find and return preferences for a given username. | 
| Preference | findPreference(String username,
                            String shortName)Find and return preferences for a given username. | 
| List<Preference> | findPreferencesByUsername(String username)Find and return preferences for a given username. | 
| javax.persistence.EntityManager | getEntityManager()Returns the reference to the  EntityManager | 
| boolean | removePreference(Preference preference)Removes a  Senderobject. | 
| void | savePreference(Preference preference)Persists a  Preferenceobject. | 
| void | setEntityManager(javax.persistence.EntityManager entityManager)Sets the reference to the  EntityManager | 
| void | setPreference(Preference preference,
                          boolean enabled)Set a specific Preference to be enabled or disabled. | 
public PreferenceDaoImpl()
PreferenceDaoImpl.public List<Preference> findPreferencesByUsername(String username)
PreferenceDaofindPreferencesByUsername in interface PreferenceDaousername - Username of the user for which the preferences are being searched.Preference objects for a given user.public Preference findPreference(String username, String shortName)
PreferenceDaofindPreference in interface PreferenceDaousername - Username of the user for which the preferences are being searched.shortName - Shortname of the Sender for which a preference is sought.Preference objects for a given user and sender shortname.public Preference findPreference(String username, Sender sender)
PreferenceDaofindPreference in interface PreferenceDaousername - Username of the user for which the preferences are being searched.sender - Sender for which a perference is sought.Preference objects for a given user.public Preference findPreference(long id)
PreferenceDaofindPreference in interface PreferenceDaoid - Id for the preference being sought.Preference objects for a given user.public void setPreference(Preference preference, boolean enabled)
PreferenceDaosetPreference in interface PreferenceDaopreference - Preference to be set as enabled or disabled.enabled - Boolean to set the given Preference.public void savePreference(Preference preference)
PreferenceDaoPreference object.savePreference in interface PreferenceDaopreference - Preference to persist.public boolean removePreference(Preference preference)
PreferenceDaoSender object.removePreference in interface PreferenceDaopublic javax.persistence.EntityManager getEntityManager()
EntityManagerEntityManagerpublic void setEntityManager(javax.persistence.EntityManager entityManager)
EntityManagerentityManager - The reference to the EntityManagerCopyright © 2011-2013 The Kuali Foundation. All Rights Reserved.