Class StepHome
java.lang.Object
fr.paris.lutece.plugins.forms.business.StepHome
This class provides instances management methods (create, find, ...) for Step objects
-
Method Summary
Modifier and TypeMethodDescriptioncountFinalStepsByFormIds(List<Integer> formIds) Returns the number of final steps for each given form.static intcountOtherFinalSteps(int idForm, int idStepToExclude) Counts final steps of a form, excluding a specific one.static StepCreate an instance of the step classstatic StepfindByPrimaryKey(int nKey) Returns an instance of a step whose identifier is specified in parametergetFinalsStep(int nIdForm) Returns finals step of the given form idLoad the id of all the step objects and returns them as a listgetIdStepsListByForm(int nIdForm) Load the id of all the step objects linked to a given form and returns them as a liststatic StepgetInitialStep(int nIdForm) Returns the initial step of the given form idstatic fr.paris.lutece.util.ReferenceListgetStepReferenceListByForm(int nFormId) Load the data of all the steps linked to a given form and returns them as a ReferenceListLoad the data of all the step objects and returns them as a listgetStepsListByForm(int nFormId) Load the data of all the steps linked to a given form and returns them as a liststatic fr.paris.lutece.util.ReferenceListLoad the data of all the step objects and returns them as a referenceListstatic voidremove(int nKey) Remove the step whose identifier is specified in parameterstatic StepUpdate of the step which is specified in parameter
-
Method Details
-
create
Create an instance of the step class- Parameters:
step- The instance of the Step which contains the informations to store- Returns:
- The instance of step which has been created with its primary key.
-
update
Update of the step which is specified in parameter- Parameters:
step- The instance of the Step which contains the data to store- Returns:
- The instance of the step which has been updated
-
remove
public static void remove(int nKey) Remove the step whose identifier is specified in parameter- Parameters:
nKey- The step Id
-
findByPrimaryKey
Returns an instance of a step whose identifier is specified in parameter- Parameters:
nKey- The step primary key- Returns:
- an instance of Step
-
getInitialStep
Returns the initial step of the given form id- Parameters:
nIdForm- The step form primary key- Returns:
- the initial step of the given form id
-
getFinalsStep
Returns finals step of the given form id- Parameters:
nIdForm- The step form primary key- Returns:
- the initial step of the given form id
-
getStepsList
Load the data of all the step objects and returns them as a list- Returns:
- the list which contains the data of all the step objects
-
getStepsListByForm
Load the data of all the steps linked to a given form and returns them as a list- Parameters:
nFormId- the form identifier- Returns:
- the list which contains the data of all the step objects
-
getStepReferenceListByForm
public static fr.paris.lutece.util.ReferenceList getStepReferenceListByForm(int nFormId) Load the data of all the steps linked to a given form and returns them as a ReferenceList- Parameters:
nFormId- the form identifier- Returns:
- the ReferenceList which contains the data of all the step objects
-
getIdStepsList
Load the id of all the step objects and returns them as a list- Returns:
- the list which contains the id of all the step objects
-
getIdStepsListByForm
Load the id of all the step objects linked to a given form and returns them as a list- Parameters:
nIdForm- the form identifier- Returns:
- the list which contains the id of all the step objects
-
getStepsReferenceList
public static fr.paris.lutece.util.ReferenceList getStepsReferenceList()Load the data of all the step objects and returns them as a referenceList- Returns:
- the referenceList which contains the data of all the step objects
-
countFinalStepsByFormIds
Returns the number of final steps for each given form.- Parameters:
formIds- list of form IDs- Returns:
- map: form ID → count of final steps
-
countOtherFinalSteps
public static int countOtherFinalSteps(int idForm, int idStepToExclude) Counts final steps of a form, excluding a specific one.- Parameters:
idForm- form IDidStepToExclude- step ID to ignore- Returns:
- umber of final steps excluding the given one
-