Class FormDatabaseService
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.service.FormDatabaseService
-
- All Implemented Interfaces:
IFormDatabaseService
public class FormDatabaseService extends Object implements IFormDatabaseService
-
-
Constructor Summary
Constructors Constructor Description FormDatabaseService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description fr.paris.lutece.plugins.genericattributes.business.EntrycopyEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)copy an entryvoidcreateControl(Control control)Create a controlvoidcreateEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)Create an entryvoidcreateField(fr.paris.lutece.plugins.genericattributes.business.Field field)Create a fieldvoidcreateFormDisplay(FormDisplay formDisplay)Create a formDisplayvoidcreateGroup(Group group)Create a groupvoidcreateMappingControl(int nIdcontrol, int nIdQuestion, String strValue)voidcreateQuestion(Question question)Create a questionvoidcreateStep(Step step)Create a stepFormDisplayfindDisplayByPrimaryKey(int idDisplay)Find a formdisplay by its idfr.paris.lutece.plugins.genericattributes.business.EntryfindEntryByPrimaryKey(int idEntry)Find an entry by its idfr.paris.lutece.plugins.genericattributes.business.FieldfindFieldByPrimaryKey(int idField)Find a field by its idGroupfindGroupByPrimaryKey(int idGroup)Find a group by its idIntegerfindIdReferenceItemByIdField(int idField)Loads records form the database.QuestionfindQuestionByPrimaryKey(int idQuestion)Find a qusteion by its idStepfindStepByPrimaryKey(int idStep)Find a step by its idList<Control>getControlByQuestion(int nIdQuestion)Loads control list based on its attached question and control typeList<ControlMapping>getControlMappingListByIdControl(int nIdControl)Load the data of all the control objects and returns them as a listFormDisplaygetFormDisplayByFormStepAndComposite(int nIdForm, int nIdStep, int nIdComposite)Return the FormDisplay associated to the given parametersList<FormDisplay>getFormDisplayListByParent(int nIdStep, int nIdParent)Load the data of all the formDisplay that are direct children of a given parent and returns them as a listList<Group>getGroupsListByIdStepList(List<Integer> idStepList)Load the data of all the group objects and returns them as a listList<Question>getListQuestionByForm(int nIdForm)Find all Questions by formList<Question>getQuestionsListByStep(int nIdStep)Load the data of all the question objects and returns them as a listvoidupdateEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)update an entryvoidupdateField(fr.paris.lutece.plugins.genericattributes.business.Field field)update a fieldvoidupdateFormDisplay(FormDisplay formDisplay)update a FormDisplayvoidupdateGroup(Group group)update a groupvoidupdateQuestion(Question question)update a question
-
-
-
Field Detail
-
BEAN_NAME
public static final String BEAN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEntry
public void createEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Description copied from interface:IFormDatabaseServiceCreate an entry- Specified by:
createEntryin interfaceIFormDatabaseService
-
createField
public void createField(fr.paris.lutece.plugins.genericattributes.business.Field field)
Description copied from interface:IFormDatabaseServiceCreate a field- Specified by:
createFieldin interfaceIFormDatabaseService
-
createQuestion
public void createQuestion(Question question)
Description copied from interface:IFormDatabaseServiceCreate a question- Specified by:
createQuestionin interfaceIFormDatabaseService
-
createGroup
public void createGroup(Group group)
Description copied from interface:IFormDatabaseServiceCreate a group- Specified by:
createGroupin interfaceIFormDatabaseService
-
updateGroup
public void updateGroup(Group group)
Description copied from interface:IFormDatabaseServiceupdate a group- Specified by:
updateGroupin interfaceIFormDatabaseService
-
findGroupByPrimaryKey
public Group findGroupByPrimaryKey(int idGroup)
Description copied from interface:IFormDatabaseServiceFind a group by its id- Specified by:
findGroupByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
findStepByPrimaryKey
public Step findStepByPrimaryKey(int idStep)
Description copied from interface:IFormDatabaseServiceFind a step by its id- Specified by:
findStepByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
updateEntry
public void updateEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Description copied from interface:IFormDatabaseServiceupdate an entry- Specified by:
updateEntryin interfaceIFormDatabaseService
-
createFormDisplay
public void createFormDisplay(FormDisplay formDisplay)
Description copied from interface:IFormDatabaseServiceCreate a formDisplay- Specified by:
createFormDisplayin interfaceIFormDatabaseService
-
getListQuestionByForm
public List<Question> getListQuestionByForm(int nIdForm)
Description copied from interface:IFormDatabaseServiceFind all Questions by form- Specified by:
getListQuestionByFormin interfaceIFormDatabaseService- Returns:
-
findQuestionByPrimaryKey
public Question findQuestionByPrimaryKey(int idQuestion)
Description copied from interface:IFormDatabaseServiceFind a qusteion by its id- Specified by:
findQuestionByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
findEntryByPrimaryKey
public fr.paris.lutece.plugins.genericattributes.business.Entry findEntryByPrimaryKey(int idEntry)
Description copied from interface:IFormDatabaseServiceFind an entry by its id- Specified by:
findEntryByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
updateField
public void updateField(fr.paris.lutece.plugins.genericattributes.business.Field field)
Description copied from interface:IFormDatabaseServiceupdate a field- Specified by:
updateFieldin interfaceIFormDatabaseService
-
findFieldByPrimaryKey
public fr.paris.lutece.plugins.genericattributes.business.Field findFieldByPrimaryKey(int idField)
Description copied from interface:IFormDatabaseServiceFind a field by its id- Specified by:
findFieldByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
findDisplayByPrimaryKey
public FormDisplay findDisplayByPrimaryKey(int idDisplay)
Description copied from interface:IFormDatabaseServiceFind a formdisplay by its id- Specified by:
findDisplayByPrimaryKeyin interfaceIFormDatabaseService- Returns:
-
updateQuestion
public void updateQuestion(Question question)
Description copied from interface:IFormDatabaseServiceupdate a question- Specified by:
updateQuestionin interfaceIFormDatabaseService
-
getFormDisplayListByParent
public List<FormDisplay> getFormDisplayListByParent(int nIdStep, int nIdParent)
Description copied from interface:IFormDatabaseServiceLoad the data of all the formDisplay that are direct children of a given parent and returns them as a list- Specified by:
getFormDisplayListByParentin interfaceIFormDatabaseService- Parameters:
nIdStep- The step primary keynIdParent- The parent primary key- Returns:
- the list which contains the data of all the formDisplay objects by parent
-
updateFormDisplay
public void updateFormDisplay(FormDisplay formDisplay)
Description copied from interface:IFormDatabaseServiceupdate a FormDisplay- Specified by:
updateFormDisplayin interfaceIFormDatabaseService
-
copyEntry
public fr.paris.lutece.plugins.genericattributes.business.Entry copyEntry(fr.paris.lutece.plugins.genericattributes.business.Entry entry)
Description copied from interface:IFormDatabaseServicecopy an entry- Specified by:
copyEntryin interfaceIFormDatabaseService- Returns:
-
getControlByQuestion
public List<Control> getControlByQuestion(int nIdQuestion)
Description copied from interface:IFormDatabaseServiceLoads control list based on its attached question and control type- Specified by:
getControlByQuestionin interfaceIFormDatabaseService- Parameters:
nIdQuestion- the question id- Returns:
- the requested Control list
-
getFormDisplayByFormStepAndComposite
public FormDisplay getFormDisplayByFormStepAndComposite(int nIdForm, int nIdStep, int nIdComposite)
Description copied from interface:IFormDatabaseServiceReturn the FormDisplay associated to the given parameters- Specified by:
getFormDisplayByFormStepAndCompositein interfaceIFormDatabaseService- Parameters:
nIdForm- The identifier of the Form to matchnIdStep- The identifier of the Step to matchnIdComposite- The identifier of the Composite to match- Returns:
- the formDisplay associated to the given parameters
-
createControl
public void createControl(Control control)
Description copied from interface:IFormDatabaseServiceCreate a control- Specified by:
createControlin interfaceIFormDatabaseService
-
getGroupsListByIdStepList
public List<Group> getGroupsListByIdStepList(List<Integer> idStepList)
Description copied from interface:IFormDatabaseServiceLoad the data of all the group objects and returns them as a list- Specified by:
getGroupsListByIdStepListin interfaceIFormDatabaseService- Returns:
- the list which contains the data of all the group objects
-
getQuestionsListByStep
public List<Question> getQuestionsListByStep(int nIdStep)
Description copied from interface:IFormDatabaseServiceLoad the data of all the question objects and returns them as a list- Specified by:
getQuestionsListByStepin interfaceIFormDatabaseService- Parameters:
nIdStep- The step primary key- Returns:
- the list which contains the data of all the question objects
-
findIdReferenceItemByIdField
public Integer findIdReferenceItemByIdField(int idField)
Description copied from interface:IFormDatabaseServiceLoads records form the database.- Specified by:
findIdReferenceItemByIdFieldin interfaceIFormDatabaseService- Returns:
-
getControlMappingListByIdControl
public List<ControlMapping> getControlMappingListByIdControl(int nIdControl)
Description copied from interface:IFormDatabaseServiceLoad the data of all the control objects and returns them as a list- Specified by:
getControlMappingListByIdControlin interfaceIFormDatabaseService- Parameters:
nIdControl- the Control id- Returns:
- the referenceList which contains the data of all the control objects
-
createStep
public void createStep(Step step)
Description copied from interface:IFormDatabaseServiceCreate a step- Specified by:
createStepin interfaceIFormDatabaseService
-
createMappingControl
public void createMappingControl(int nIdcontrol, int nIdQuestion, String strValue)- Specified by:
createMappingControlin interfaceIFormDatabaseService
-
-