java.lang.Object
fr.paris.lutece.plugins.genericattributes.business.EntryTypeDAO
All Implemented Interfaces:
IEntryTypeDAO

@ApplicationScoped public class EntryTypeDAO extends Object implements IEntryTypeDAO
class EntryTypeDAO
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countDerivedEntryTypes(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Count the entry types derived from an entry type
    int
    countEntries(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Count the entries using an entry type
    void
    delete(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete an entry type
    void
    insert(EntryType entryType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new entry type
    load(int idKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of the entry type from the table
    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
    selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all entry type and returns them in a list
    int
    selectMaxOrder(String strPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Get the highest display order of the entry types of a plugin
    void
    store(EntryType entryType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Updates the EntryType

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DERIVED_ENTRY_TYPE_MIN_ID

      public static final int DERIVED_ENTRY_TYPE_MIN_ID
      The 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

      public EntryType load(int idKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of the entry type from the table
      Specified by:
      load in interface IEntryTypeDAO
      Parameters:
      idKey - The identifier of the entry type
      plugin - the plugin
      Returns:
      the instance of the EntryType
    • selectAll

      public List<EntryType> selectAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IEntryTypeDAO
      Load the data of all entry type and returns them in a list
      Specified by:
      selectAll in interface IEntryTypeDAO
      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:
      select in interface IEntryTypeDAO
      Parameters:
      strPlugin - The name of plugin to get entry types of
      plugin - the plugin
      Returns:
      the list of entry type associated with the plugin
    • insert

      public void insert(EntryType entryType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new entry type
      Specified by:
      insert in interface IEntryTypeDAO
      Parameters:
      entryType - the entry type to insert, its id is set after the insertion
      plugin - the plugin
    • store

      public void store(EntryType entryType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IEntryTypeDAO
      Updates the EntryType
      Specified by:
      store in interface IEntryTypeDAO
    • delete

      public void delete(int nIdType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete an entry type
      Specified by:
      delete in interface IEntryTypeDAO
      Parameters:
      nIdType - the id of the entry type
      plugin - the plugin
    • selectMaxOrder

      public int selectMaxOrder(String strPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the highest display order of the entry types of a plugin
      Specified by:
      selectMaxOrder in interface IEntryTypeDAO
      Parameters:
      strPlugin - the name of the plugin owning the entry types
      plugin - 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:
      countEntries in interface IEntryTypeDAO
      Parameters:
      nIdType - the id of the entry type
      plugin - 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:
      countDerivedEntryTypes in interface IEntryTypeDAO
      Parameters:
      nIdType - the id of the entry type
      plugin - the plugin
      Returns:
      the number of entry types derived from it