fr.paris.lutece.plugins.form.business
Class FormDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.form.business.FormDAO
All Implemented Interfaces:
IFormDAO

public final class FormDAO
extends Object
implements IFormDAO

class FormDAO


Constructor Summary
FormDAO()
           
 
Method Summary
 void delete(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 List<Integer> getAnonymizeEntryList(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of entries of a form to anonymize
 fr.paris.lutece.util.ReferenceList getEnableFormList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all enable form returns them in a reference list
 List<Form> getFormListForAutomaticCleaning(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of forms that must be cleaned automatically.
 Map<Integer,fr.paris.lutece.portal.business.style.Theme> getXPageThemesMap(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load all the themes for form xpages
 int insert(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertAnonymizeEntry(int nIdForm, int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert an entry in the anonymize entries table
 Form load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the Form from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 void removeAnonymizeEntry(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove entries in the anonymize entries table
 List<Form> selectFormList(FormFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the form who verify the filter and returns them in a list
 void store(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the form in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormDAO

public FormDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key

Parameters:
plugin - the plugin
Returns:
The new primary key

insert

public int insert(Form form,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IFormDAO
Parameters:
form - instance of the Form to insert
plugin - the plugin
Returns:
the new form create

load

public Form load(int nId,
                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the Form from the table

Specified by:
load in interface IFormDAO
Parameters:
nId - The identifier of the form
plugin - the plugin
Returns:
the instance of the Form

delete

public void delete(int nIdForm,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IFormDAO
Parameters:
nIdForm - The identifier of the form
plugin - the plugin

store

public void store(Form form,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the form in the table

Specified by:
store in interface IFormDAO
Parameters:
form - instance of the Form object to update
plugin - the plugin

selectFormList

public List<Form> selectFormList(FormFilter filter,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the form who verify the filter and returns them in a list

Specified by:
selectFormList in interface IFormDAO
Parameters:
filter - the filter
plugin - the plugin
Returns:
the list of form

getEnableFormList

public fr.paris.lutece.util.ReferenceList getEnableFormList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all enable form returns them in a reference list

Specified by:
getEnableFormList in interface IFormDAO
Parameters:
plugin - the plugin
Returns:
a reference list of form

getXPageThemesMap

public Map<Integer,fr.paris.lutece.portal.business.style.Theme> getXPageThemesMap(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface: IFormDAO
Load all the themes for form xpages

Specified by:
getXPageThemesMap in interface IFormDAO
Parameters:
plugin - the plugin
Returns:
a map containing the themes by form id

getAnonymizeEntryList

public List<Integer> getAnonymizeEntryList(int nIdForm,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of entries of a form to anonymize

Specified by:
getAnonymizeEntryList in interface IFormDAO
Parameters:
nIdForm - The id of the form
plugin - The plugin
Returns:
The list of ids of entries to anonymize, or an empty list if the form was not fount or if no entries of this form should be anonymized

insertAnonymizeEntry

public void insertAnonymizeEntry(int nIdForm,
                                 int nIdEntry,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert an entry in the anonymize entries table

Specified by:
insertAnonymizeEntry in interface IFormDAO
Parameters:
nIdForm - The id of the form the entry is associated with
nIdEntry - The id of the entry to anonymize
plugin - The plugin

removeAnonymizeEntry

public void removeAnonymizeEntry(int nIdForm,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove entries in the anonymize entries table

Specified by:
removeAnonymizeEntry in interface IFormDAO
Parameters:
nIdForm - The id of the form
plugin - The plugin

getFormListForAutomaticCleaning

public List<Form> getFormListForAutomaticCleaning(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of forms that must be cleaned automatically. Only id, automatic cleaning and cleaning by removal attributes or form are fetched.

Specified by:
getFormListForAutomaticCleaning in interface IFormDAO
Parameters:
plugin - The plugin
Returns:
the list of form, or an empty list if no form was found. Only id, automatic cleaning and cleaning by removal attributes or form are fetched.


Copyright © 2013 Mairie de Paris. All Rights Reserved.