Class ControlHome
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.business.ControlHome
-
public final class ControlHome extends Object
This class provides instances management methods (create, find, ...) for Control objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Controlcreate(Control control)Create an instance of the control classstatic voidcreateMappingControl(int nIdcontrol, int nIdQuestion, String strValue)static ControlfindByPrimaryKey(int nKey)Returns an instance of a control whose identifier is specified in parameterstatic List<Control>getControlByControlTargetAndType(int nIdControlTarget, ControlType controlType)Loads an existing control based on the display it is linked to (for conditional display)static List<Control>getControlByQuestion(int nIdQuestion)Loads control list based on its attached question and control typestatic List<Control>getControlByQuestionAndType(int nIdQuestion, String strControlType)Loads control list based on its attached question and control typestatic intgetControlCountByControlTargetAndType(int nIdControlTarget, ControlType controlType)Return the number of controls linked to the displaystatic List<ControlMapping>getControlMappingListByIdControl(int nIdControl)Load the data of all the control objects and returns them as a liststatic List<Control>getControlsList()Load the data of all the control objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListgetControlsReferenceList()Load the data of all the control objects and returns them as a referenceListstatic fr.paris.lutece.util.ReferenceListgetCtrlMappingListByIdControl(int nIdControl)Load the data of all the control objects and returns them as a referenceListstatic List<Integer>getIdControlsList()Load the id of all the control objects and returns them as a liststatic voidremove(int nKey)Remove the control whose identifier is specified in parameterstatic voidremoveByControlTarget(int nIdControlTarget, ControlType controlType)Remove the control whose control target identifier is specified in parameterstatic voidremoveMappingControl(int nKey)Remove the control mapping whose identifier control is specified in parameterstatic Controlupdate(Control control)Update of the control which is specified in parameter
-
-
-
Method Detail
-
create
public static Control create(Control control)
Create an instance of the control class- Parameters:
control- The instance of the Control which contains the informations to store- Returns:
- The instance of control which has been created with its primary key.
-
createMappingControl
public static void createMappingControl(int nIdcontrol, int nIdQuestion, String strValue)
-
update
public static Control update(Control control)
Update of the control which is specified in parameter- Parameters:
control- The instance of the Control which contains the data to store- Returns:
- The instance of the control which has been updated
-
remove
public static void remove(int nKey)
Remove the control whose identifier is specified in parameter- Parameters:
nKey- The control Id
-
removeMappingControl
public static void removeMappingControl(int nKey)
Remove the control mapping whose identifier control is specified in parameter- Parameters:
nKey- The control Id
-
removeByControlTarget
public static void removeByControlTarget(int nIdControlTarget, ControlType controlType)Remove the control whose control target identifier is specified in parameter- Parameters:
nIdControlTarget- The control target IdcontrolType- The control type
-
findByPrimaryKey
public static Control findByPrimaryKey(int nKey)
Returns an instance of a control whose identifier is specified in parameter- Parameters:
nKey- The control primary key- Returns:
- an instance of Control
-
getControlsList
public static List<Control> getControlsList()
Load the data of all the control objects and returns them as a list- Returns:
- the list which contains the data of all the control objects
-
getIdControlsList
public static List<Integer> getIdControlsList()
Load the id of all the control objects and returns them as a list- Returns:
- the list which contains the id of all the control objects
-
getControlsReferenceList
public static fr.paris.lutece.util.ReferenceList getControlsReferenceList()
Load the data of all the control objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the control objects
-
getControlByControlTargetAndType
public static List<Control> getControlByControlTargetAndType(int nIdControlTarget, ControlType controlType)
Loads an existing control based on the display it is linked to (for conditional display)- Parameters:
nIdControlTarget- the DisplaycontrolType- the control type- Returns:
- the requested Control
-
getControlCountByControlTargetAndType
public static int getControlCountByControlTargetAndType(int nIdControlTarget, ControlType controlType)Return the number of controls linked to the display- Parameters:
nIdControlTarget-controlType-- Returns:
-
getControlByQuestionAndType
public static List<Control> getControlByQuestionAndType(int nIdQuestion, String strControlType)
Loads control list based on its attached question and control type- Parameters:
nIdQuestion- the question idstrControlType- the control type- Returns:
- the requested Control list
-
getControlByQuestion
public static List<Control> getControlByQuestion(int nIdQuestion)
Loads control list based on its attached question and control type- Parameters:
nIdQuestion- the question id- Returns:
- the requested Control list
-
getCtrlMappingListByIdControl
public static fr.paris.lutece.util.ReferenceList getCtrlMappingListByIdControl(int nIdControl)
Load the data of all the control objects and returns them as a referenceList- Parameters:
nIdControl- the Control id- Returns:
- the referenceList which contains the data of all the control objects
-
getControlMappingListByIdControl
public static List<ControlMapping> getControlMappingListByIdControl(int nIdControl)
Load the data of all the control objects and returns them as a list- Parameters:
nIdControl- the Control id- Returns:
- the referenceList which contains the data of all the control objects
-
-