Class EntryTypeDAO
java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.EntryTypeDAO
- All Implemented Interfaces:
IEntryTypeDAO
class EntryTypeDAO
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe plugins insert their entry types with fixed ids, and may add new ones in a later upgrade script: the derived entry types get ids from this value on, out of the range those scripts use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountDerivedEntryTypes(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Count the entry types derived from an entry typeintcountEntries(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Count the entries using an entry typevoiddelete(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an entry typevoidInsert a new entry typeload(int idKey, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of the entry type from the tableLoad the data of all entry type associated with a given plugin and returns them in a listselectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all entry type and returns them in a listintselectMaxOrder(String strPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the highest display order of the entry types of a pluginvoidUpdates the EntryType
-
Field Details
-
DERIVED_ENTRY_TYPE_MIN_ID
public static final int DERIVED_ENTRY_TYPE_MIN_IDThe plugins insert their entry types with fixed ids, and may add new ones in a later upgrade script: the derived entry types get ids from this value on, out of the range those scripts use.- See Also:
-
-
Constructor Details
-
EntryTypeDAO
public EntryTypeDAO()
-
-
Method Details
-
load
Load the data of the entry type from the table- Specified by:
loadin interfaceIEntryTypeDAO- Parameters:
idKey- The identifier of the entry typeplugin- the plugin- Returns:
- the instance of the EntryType
-
selectAll
Description copied from interface:IEntryTypeDAOLoad the data of all entry type and returns them in a list- Specified by:
selectAllin interfaceIEntryTypeDAO- Parameters:
plugin- the plugin- Returns:
- the list of entry type associated with the plugin
-
select
public List<EntryType> select(String strPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load the data of all entry type associated with a given plugin and returns them in a list- Specified by:
selectin interfaceIEntryTypeDAO- Parameters:
strPlugin- The name of plugin to get entry types ofplugin- the plugin- Returns:
- the list of entry type associated with the plugin
-
insert
Insert a new entry type- Specified by:
insertin interfaceIEntryTypeDAO- Parameters:
entryType- the entry type to insert, its id is set after the insertionplugin- the plugin
-
store
Description copied from interface:IEntryTypeDAOUpdates the EntryType- Specified by:
storein interfaceIEntryTypeDAO
-
delete
public void delete(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an entry type- Specified by:
deletein interfaceIEntryTypeDAO- Parameters:
nIdType- the id of the entry typeplugin- the plugin
-
selectMaxOrder
Get the highest display order of the entry types of a plugin- Specified by:
selectMaxOrderin interfaceIEntryTypeDAO- Parameters:
strPlugin- the name of the plugin owning the entry typesplugin- the plugin- Returns:
- the highest display order, 0 if the plugin has no entry type
-
countEntries
public int countEntries(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Count the entries using an entry type- Specified by:
countEntriesin interfaceIEntryTypeDAO- Parameters:
nIdType- the id of the entry typeplugin- the plugin- Returns:
- the number of entries of this type
-
countDerivedEntryTypes
public int countDerivedEntryTypes(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin) Count the entry types derived from an entry type- Specified by:
countDerivedEntryTypesin interfaceIEntryTypeDAO- Parameters:
nIdType- the id of the entry typeplugin- the plugin- Returns:
- the number of entry types derived from it
-