Class ControlHome


  • public final class ControlHome
    extends java.lang.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 Control create​(Control control)
      Create an instance of the control class
      static void createMappingControl​(int nIdcontrol, int nIdQuestion, java.lang.String strValue)  
      static Control findByPrimaryKey​(int nKey)
      Returns an instance of a control whose identifier is specified in parameter
      static java.util.List<Control> getControlByControlTargetAndType​(int nIdControlTarget, ControlType controlType)
      Loads an existing control based on the display it is linked to (for conditional display)
      static java.util.List<Control> getControlByQuestion​(int nIdQuestion)
      Loads control list based on its attached question and control type
      static java.util.List<Control> getControlByQuestionAndType​(int nIdQuestion, java.lang.String strControlType)
      Loads control list based on its attached question and control type
      static int getControlCountByControlTargetAndType​(int nIdControlTarget, ControlType controlType)
      Return the number of controls linked to the display
      static java.util.List<ControlMapping> getControlMappingListByIdControl​(int nIdControl)
      Load the data of all the control objects and returns them as a list
      static java.util.List<Control> getControlsList()
      Load the data of all the control objects and returns them as a list
      static fr.paris.lutece.util.ReferenceList getControlsReferenceList()
      Load the data of all the control objects and returns them as a referenceList
      static fr.paris.lutece.util.ReferenceList getCtrlMappingListByIdControl​(int nIdControl)
      Load the data of all the control objects and returns them as a referenceList
      static java.util.List<java.lang.Integer> getIdControlsList()
      Load the id of all the control objects and returns them as a list
      static void remove​(int nKey)
      Remove the control whose identifier is specified in parameter
      static void removeByControlTarget​(int nIdControlTarget, ControlType controlType)
      Remove the control whose control target identifier is specified in parameter
      static void removeMappingControl​(int nKey)
      Remove the control mapping whose identifier control is specified in parameter
      static Control update​(Control control)
      Update of the control which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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,
                                                java.lang.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 java.util.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 java.util.List<java.lang.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 java.util.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 java.util.List<Control> getControlByQuestionAndType​(int nIdQuestion,
                                                                          java.lang.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 java.util.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 java.util.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