Class ControlDAO
java.lang.Object
fr.paris.lutece.plugins.forms.business.ControlDAO
- All Implemented Interfaces:
IControlDAO
This class provides Data Access methods for Control objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the tablevoiddeleteByControlTarget(int nIdControlTarget, 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 a new record in the table.load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableloadIdQuestions(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data from the tableselectControlByControlTargetAndType(int nIdControlTarget, ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Select a control for conditional display based on its attached display idselectControlByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin) Select control list based on its attached question and control typeselectControlByQuestionAndType(int nIdQuestion, String strControlType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Select control list based on its attached question and control typeselectControlsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control objects and returns them as a listfr.paris.lutece.util.ReferenceListselectControlsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control objects and returns them as a referenceListselectIdControlsList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the id of all the control objects and returns them as a listselectMappingControlList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control mapping and returns them as a Listfr.paris.lutece.util.ReferenceListselectMappingControlReferenceList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control mapping and returns them as a referenceListvoidUpdate the record in the table
-
Constructor Details
-
ControlDAO
public ControlDAO()
-
-
Method Details
-
insert
Insert a new record in the table.- Specified by:
insertin interfaceIControlDAO- 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 interfaceIControlDAOnIdQuestion- 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 interfaceIControlDAOnIdQuestion- the question idstrValue- the valueplugin- the Plugin
-
load
Load the data from the table- Specified by:
loadin interfaceIControlDAO- 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 interfaceIControlDAO- 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 interfaceIControlDAO- 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 interfaceIControlDAOplugin- 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 interfaceIControlDAOplugin- the Plugin
-
deleteByControlTarget
public void deleteByControlTarget(int nIdControlTarget, ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete a record from the table by the control target- Specified by:
deleteByControlTargetin interfaceIControlDAO- Parameters:
nIdControlTarget- The identifier of the Control targetcontrolType- The control typeplugin- the Plugin
-
store
Update the record in the table- Specified by:
storein interfaceIControlDAO- Parameters:
control- the reference of the Controlplugin- the Plugin
-
selectControlsList
Load the data of all the control objects and returns them as a list- Specified by:
selectControlsListin interfaceIControlDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the data of all the control objects
-
selectIdControlsList
Load the id of all the control objects and returns them as a list- Specified by:
selectIdControlsListin interfaceIControlDAO- Parameters:
plugin- the Plugin- Returns:
- The list which contains the id of all the control objects
-
selectControlsReferenceList
public fr.paris.lutece.util.ReferenceList selectControlsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control objects and returns them as a referenceList- Specified by:
selectControlsReferenceListin interfaceIControlDAO- Parameters:
plugin- the Plugin- Returns:
- The referenceList which contains the data of all the control objects
-
selectControlByControlTargetAndType
public List<Control> selectControlByControlTargetAndType(int nIdControlTarget, ControlType controlType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IControlDAOSelect a control for conditional display based on its attached display id- Specified by:
selectControlByControlTargetAndTypein interfaceIControlDAO- Parameters:
nIdControlTarget- the control target idcontrolType- the control typeplugin- the Plugin- Returns:
- The control
-
selectControlByQuestionAndType
public List<Control> selectControlByQuestionAndType(int nIdQuestion, String strControlType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IControlDAOSelect control list based on its attached question and control type- Specified by:
selectControlByQuestionAndTypein interfaceIControlDAO- Parameters:
nIdQuestion- the question idstrControlType- the control typeplugin- the Plugin- Returns:
- The control
-
selectControlByQuestion
public List<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 interfaceIControlDAO- Parameters:
nIdQuestion- the question idplugin- the Plugin- Returns:
- The control
-
selectMappingControlReferenceList
public fr.paris.lutece.util.ReferenceList selectMappingControlReferenceList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all the control mapping and returns them as a referenceList- Specified by:
selectMappingControlReferenceListin interfaceIControlDAOplugin- the Plugin- Returns:
- The referenceList which contains the data of all the control mapping object
-
selectMappingControlList
public List<ControlMapping> selectMappingControlList(int nIdControl, fr.paris.lutece.portal.service.plugin.Plugin plugin) Description copied from interface:IControlDAOLoad the data of all the control mapping and returns them as a List- Specified by:
selectMappingControlListin interfaceIControlDAOplugin- the Plugin- Returns:
- The referenceList which contains the data of all the control mapping object
-