Class ControlHome


  • public final class ControlHome
    extends Object
    This class provides instances management methods (create, find, ...) for Control objects
    • 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 Id
        controlType - 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 Display
        controlType - 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 id
        strControlType - 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