Class EntryHome
java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.EntryHome
This class provides instances management methods (create, find, ...) for Entry objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntryCopy of an instance of Entrystatic intCreation of an instance of Entrystatic voiddecrementOrderByOne(int nOrder, int nIdField, int nIdResource, String strResourceType) Decrements the order of all the entries (conditional questions) after the one which will be removedstatic EntryfindByOrderAndIdFieldAndIdResource(int nOrder, int nIdField, int nIdResource, String strResourceType) Finds the entry (conditional question) with a given order, idDependField, id resource and resource typestatic EntryfindByPrimaryKey(int nKey) Returns an instance of a Entry whose identifier is specified in parameterfindByPrimaryKeyList(List<Integer> idList) Returns a list of a Entry whose identifier is specified in parameterfindEntriesWithoutParent(int nIdResource, String strResourceType) Finds all the entries without any parent associated with a given resourcefindEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm) getEntryList(EntryFilter filter) Load the data of all the entry who verify the filter and returns them in a liststatic StringgetEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse) static intgetNumberEntryByFilter(EntryFilter filter) Return the number of entry who verify the filterstatic voidremove(int nIdEntry) Remove the entry whose identifier is specified in parameterstatic voidUpdate of the entry which is specified in parameter
-
Method Details
-
create
Creation of an instance of Entry- Parameters:
entry- The instance of the Entry which contains the informations to store- Returns:
- The primary key of the new entry.
-
copy
Copy of an instance of Entry- Parameters:
entry- The instance of the Entry who must copy- Returns:
- the copied Entry
-
update
Update of the entry which is specified in parameter- Parameters:
entry- The instance of the Entry which contains the informations to update
-
remove
public static void remove(int nIdEntry) Remove the entry whose identifier is specified in parameter- Parameters:
nIdEntry- The entry Id
-
findByPrimaryKey
Returns an instance of a Entry whose identifier is specified in parameter- Parameters:
nKey- The entry primary key- Returns:
- an instance of Entry
-
findByPrimaryKeyList
Returns a list of a Entry whose identifier is specified in parameter- Parameters:
idList- The primary keys- Returns:
- an instance of Entry
-
getEntryList
Load the data of all the entry who verify the filter and returns them in a list- Parameters:
filter- the filter- Returns:
- the list of entry
-
getNumberEntryByFilter
Return the number of entry who verify the filter- Parameters:
filter- the filter- Returns:
- the number of entry who verify the filter
-
findEntriesWithoutParent
Finds all the entries without any parent associated with a given resource- Parameters:
nIdResource- the id of the resourcestrResourceType- The resource type- Returns:
- the list of all the entries without parent
-
findByOrderAndIdFieldAndIdResource
public static Entry findByOrderAndIdFieldAndIdResource(int nOrder, int nIdField, int nIdResource, String strResourceType) Finds the entry (conditional question) with a given order, idDependField, id resource and resource type- Parameters:
nOrder- 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 static void decrementOrderByOne(int nOrder, int nIdField, int nIdResource, String strResourceType) Decrements the order of all the entries (conditional questions) after the one which will be removed- Parameters:
nOrder- the order of the entry which will be removednIdField- the id of the fieldnIdResource- the id of the resourcestrResourceType- The resource type
-
findEntryByForm
public static Map<Integer,String> findEntryByForm(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdForm) - Parameters:
plugin- the pluginnIdForm- id form- Returns:
- list id entry with their titles
-
getEntryValueByIdResponse
public static String getEntryValueByIdResponse(fr.paris.lutece.portal.service.plugin.Plugin plugin, int nIdEntry, int nIdResponse) - Parameters:
plugin- the pluginnIdEntry- id entrynIdResponse- id entry response- Returns:
- entry value
-