Class EntryDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.genericattributes.business.EntryDAO
-
-
Constructor Summary
Constructors Constructor Description EntryDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecrementOrderByOne(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)Decrements the order of all the entries (conditional questions) after the one which will be removedvoiddelete(int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tableEntryfindByOrderAndIdFieldAndIdResource(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)Finds the entry (conditional question) with a given order, idDependField and the id of the resourcejava.util.List<Entry>findEntriesWithoutParent(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdResource, java.lang.String strResourceType)Finds all the entries without any parent associated to a given resourcejava.util.Map<java.lang.Integer,java.lang.String>findEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm)java.lang.StringgetEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse)intinsert(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.Entryload(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of the entry from the tablejava.util.List<Entry>loadMultiple(java.util.List<java.lang.Integer> idList, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of the entry from the tablejava.util.List<Entry>selectEntryListByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of all the entry who verify the filter and returns them in a listintselectNumberEntryByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Return the number of entry who verify the filtervoidstore(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the entry in the table
-
-
-
Method Detail
-
insert
public int insert(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.
-
load
public Entry load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the entry from the table
-
loadMultiple
public java.util.List<Entry> loadMultiple(java.util.List<java.lang.Integer> idList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:IEntryDAOLoad the data of the entry from the table- Specified by:
loadMultiplein interfaceIEntryDAO- Parameters:
idList- The identifiers of the entriesplugin- the plugin- Returns:
- the instance of the Entry
-
delete
public void delete(int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table
-
store
public void store(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the entry in the table
-
selectEntryListByFilter
public java.util.List<Entry> selectEntryListByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the entry who verify the filter and returns them in a list- Specified by:
selectEntryListByFilterin interfaceIEntryDAO- Parameters:
filter- the filterplugin- the plugin- Returns:
- the list of entry
-
selectNumberEntryByFilter
public int selectNumberEntryByFilter(EntryFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return the number of entry who verify the filter- Specified by:
selectNumberEntryByFilterin interfaceIEntryDAO- Parameters:
filter- the filterplugin- the plugin- Returns:
- the number of entry who verify the filter
-
findEntriesWithoutParent
public java.util.List<Entry> findEntriesWithoutParent(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdResource, java.lang.String strResourceType)
Finds all the entries without any parent associated to a given resource- Specified by:
findEntriesWithoutParentin interfaceIEntryDAO- Parameters:
plugin- the pluginnIdResource- the id of the resourcestrResourceType- the resource type- Returns:
- the list of all the entries without parent
-
findByOrderAndIdFieldAndIdResource
public Entry findByOrderAndIdFieldAndIdResource(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)
Finds the entry (conditional question) with a given order, idDependField and the id of the resource- Specified by:
findByOrderAndIdFieldAndIdResourcein interfaceIEntryDAO- Parameters:
plugin- the pluginnOrder- the ordernIdField- the id of the fieldnIdResource- the id of the resourcestrResourceType- The resource type of the entry to get- Returns:
- the list of all the entries without parent
-
decrementOrderByOne
public void decrementOrderByOne(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nOrder, int nIdField, int nIdResource, java.lang.String strResourceType)Decrements the order of all the entries (conditional questions) after the one which will be removed- Specified by:
decrementOrderByOnein interfaceIEntryDAO- Parameters:
plugin- The pluginnOrder- the order of the entry which will be removednIdField- the id of the fieldnIdResource- the id of the resourcestrResourceType- The resource type
-
findEntryByForm
public java.util.Map<java.lang.Integer,java.lang.String> findEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm)- Specified by:
findEntryByFormin interfaceIEntryDAO- Parameters:
plugin- The pluginnIdForm- if form- Returns:
-
getEntryValueByIdResponse
public java.lang.String getEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse)- Specified by:
getEntryValueByIdResponsein interfaceIEntryDAO- Parameters:
plugin- the pluginnIdEntry- id entrynIdResponse- id entry response- Returns:
- entry value
-
-