Class NewsLetterTemplateDAO
java.lang.Object
fr.paris.lutece.plugins.newsletter.business.NewsLetterTemplateDAO
- All Implemented Interfaces:
INewsLetterTemplateDAO
@ApplicationScoped
@Named("newsletter.newsLetterTemplateDAO")
public class NewsLetterTemplateDAO
extends Object
implements INewsLetterTemplateDAO
This class provides Data Access methods for NewsLetter's templates objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nNewsLetterTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove a record from the tablevoidinsert(NewsLetterTemplate newsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.load(int nTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin) loads the data of the newsletter's template from the tablefr.paris.lutece.util.ReferenceListselectTemplatesByRef(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templatesselectTemplatesCollectionByType(String strTopicType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns a list of templates depending on the given typeselectTemplatesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templatesfr.paris.lutece.util.ReferenceListselectTemplatesListByType(String strTopicType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templatesselectTemplatesListByWorkgoup(String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the list of temmplates associated with a given workgroupvoidstore(NewsLetterTemplate newsLetterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update a given record in the table.
-
Constructor Details
-
NewsLetterTemplateDAO
public NewsLetterTemplateDAO()
-
-
Method Details
-
selectTemplatesList
public Collection<NewsLetterTemplate> selectTemplatesList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templates- Specified by:
selectTemplatesListin interfaceINewsLetterTemplateDAO- Parameters:
plugin- The plugin- Returns:
- the collection of all templates
-
selectTemplatesListByType
public fr.paris.lutece.util.ReferenceList selectTemplatesListByType(String strTopicType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templates- Specified by:
selectTemplatesListByTypein interfaceINewsLetterTemplateDAO- Parameters:
strTopicType- the topic type of templatesplugin- The plugin- Returns:
- the reference list of the templates corresponding to the given type
-
selectTemplatesCollectionByType
public List<NewsLetterTemplate> selectTemplatesCollectionByType(String strTopicType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns a list of templates depending on the given type- Specified by:
selectTemplatesCollectionByTypein interfaceINewsLetterTemplateDAO- Parameters:
strTopicType- the topic type of templates to getplugin- The plugin- Returns:
- the collection of the templates corresponding to the given topic type
-
insert
public void insert(NewsLetterTemplate newsletter, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new record in the table.- Specified by:
insertin interfaceINewsLetterTemplateDAO- Parameters:
newsletter- The Instance of the object NewsLetterTemplateplugin- the plugin
-
load
public NewsLetterTemplate load(int nTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin) loads the data of the newsletter's template from the table- Specified by:
loadin interfaceINewsLetterTemplateDAO- Parameters:
nTemplateId- the template identifierplugin- the plugin- Returns:
- the object inserted
-
store
public void store(NewsLetterTemplate newsLetterTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update a given record in the table.- Specified by:
storein interfaceINewsLetterTemplateDAO- Parameters:
newsLetterTemplate- The Instance of the object NewsLetterTemplateplugin- the plugin
-
delete
public void delete(int nNewsLetterTemplateId, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove a record from the table- Specified by:
deletein interfaceINewsLetterTemplateDAO- Parameters:
nNewsLetterTemplateId- the template identifierplugin- the Plugin
-
selectTemplatesByRef
public fr.paris.lutece.util.ReferenceList selectTemplatesByRef(fr.paris.lutece.portal.service.plugin.Plugin plugin) Returns the list of all templates- Specified by:
selectTemplatesByRefin interfaceINewsLetterTemplateDAO- Parameters:
plugin- The plugin- Returns:
- the reference list of the templates
-
selectTemplatesListByWorkgoup
public Collection<NewsLetterTemplate> selectTemplatesListByWorkgoup(String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the list of temmplates associated with a given workgroup- Specified by:
selectTemplatesListByWorkgoupin interfaceINewsLetterTemplateDAO- Parameters:
strWorkgroupKey- The key of the workgroupplugin- The plugin- Returns:
- The list of temmplates associated with a given workgroup
-