Class TemplateControlDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.modules.template.business.TemplateControlDAO
-
- All Implemented Interfaces:
ITemplateControlDAO
public final class TemplateControlDAO extends Object implements ITemplateControlDAO
This class provides Data Access methods for Control objects
-
-
Constructor Summary
Constructors Constructor Description TemplateControlDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoiddeleteByControlTarget(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table by the control targetvoiddeleteControlQuestion(int nControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoiddeleteControlQuestionValue(int nControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoidinsert(int nIdControl, int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.voidinsert(int nIdControl, int nIdQuestion, String strValue, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.voidinsert(fr.paris.lutece.plugins.forms.business.Control control, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.fr.paris.lutece.plugins.forms.business.Controlload(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableSet<Integer>loadIdQuestions(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the tableList<fr.paris.lutece.plugins.forms.business.Control>selectControlByControlTargetAndType(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select a control for conditional display based on its attached display idList<fr.paris.lutece.plugins.forms.business.Control>selectControlByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select control list based on its attached question and control typeList<fr.paris.lutece.plugins.forms.business.Control>selectControlByQuestionAndType(int nIdQuestion, String strControlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select control list based on its attached question and control typeList<fr.paris.lutece.plugins.forms.business.ControlMapping>selectMappingControlList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the control mapping and returns them as a Listvoidstore(fr.paris.lutece.plugins.forms.business.Control control, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the table
-
-
-
Method Detail
-
insert
public void insert(fr.paris.lutece.plugins.forms.business.Control control, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.- Specified by:
insertin interfaceITemplateControlDAO- Parameters:
control- instance of the Control object to insertplugin- the Plugin
-
insert
public void insert(int nIdControl, int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.- Specified by:
insertin interfaceITemplateControlDAOnIdQuestion- the question idplugin- the Plugin
-
insert
public void insert(int nIdControl, int nIdQuestion, String strValue, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.- Specified by:
insertin interfaceITemplateControlDAOnIdQuestion- the question idstrValue- the valueplugin- the Plugin
-
load
public fr.paris.lutece.plugins.forms.business.Control load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data from the table- Specified by:
loadin interfaceITemplateControlDAO- Parameters:
nKey- The identifier of the controlplugin- the Plugin- Returns:
- The instance of the control
-
loadIdQuestions
public Set<Integer> loadIdQuestions(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table- Specified by:
loadIdQuestionsin interfaceITemplateControlDAO- Parameters:
nIdControl- The identifier of the controlplugin- the Plugin- Returns:
- The list of id questions
-
delete
public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deletein interfaceITemplateControlDAO- Parameters:
nKey- The identifier of the Control to deleteplugin- the Plugin
-
deleteControlQuestion
public void deleteControlQuestion(int nControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deleteControlQuestionin interfaceITemplateControlDAOplugin- the Plugin
-
deleteControlQuestionValue
public void deleteControlQuestionValue(int nControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deleteControlQuestionValuein interfaceITemplateControlDAOplugin- the Plugin
-
deleteByControlTarget
public void deleteByControlTarget(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table by the control target- Specified by:
deleteByControlTargetin interfaceITemplateControlDAO- Parameters:
nIdControlTarget- The identifier of the Control targetcontrolType- The control typeplugin- the Plugin
-
store
public void store(fr.paris.lutece.plugins.forms.business.Control control, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record in the table- Specified by:
storein interfaceITemplateControlDAO- Parameters:
control- the reference of the Controlplugin- the Plugin
-
selectControlByControlTargetAndType
public List<fr.paris.lutece.plugins.forms.business.Control> selectControlByControlTargetAndType(int nIdControlTarget, fr.paris.lutece.plugins.forms.business.ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:ITemplateControlDAOSelect a control for conditional display based on its attached display id- Specified by:
selectControlByControlTargetAndTypein interfaceITemplateControlDAO- Parameters:
nIdControlTarget- the control target idcontrolType- the control typeplugin- the Plugin- Returns:
- The control
-
selectControlByQuestionAndType
public List<fr.paris.lutece.plugins.forms.business.Control> selectControlByQuestionAndType(int nIdQuestion, String strControlType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:ITemplateControlDAOSelect control list based on its attached question and control type- Specified by:
selectControlByQuestionAndTypein interfaceITemplateControlDAO- Parameters:
nIdQuestion- the question idstrControlType- the control typeplugin- the Plugin- Returns:
- The control
-
selectControlByQuestion
public List<fr.paris.lutece.plugins.forms.business.Control> selectControlByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select control list based on its attached question and control type- Specified by:
selectControlByQuestionin interfaceITemplateControlDAO- Parameters:
nIdQuestion- the question idplugin- the Plugin- Returns:
- The control
-
selectMappingControlList
public List<fr.paris.lutece.plugins.forms.business.ControlMapping> selectMappingControlList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:ITemplateControlDAOLoad the data of all the control mapping and returns them as a List- Specified by:
selectMappingControlListin interfaceITemplateControlDAOplugin- the Plugin- Returns:
- The referenceList which contains the data of all the control mapping object
-
-