Class DemandTypeHome


  • public final class DemandTypeHome
    extends Object
    DemandTypeHome
    • Method Detail

      • newPrimaryKey

        public static int newPrimaryKey()
        Generates a new primary key
        Returns:
        The new primary key
      • create

        public static int create​(DemandType demandType)
        Insert a new record in the table.
        Parameters:
        demandType - instance of the DemandType object to insert
        Returns:
        the key of the newly created demandType
      • update

        public static void update​(DemandType demandType)
        Update the record in the table
        Parameters:
        demandType - the reference of the demandType
      • remove

        public static void remove​(int nIdDemandType)
        Delete a record from the table
        Parameters:
        nIdDemandType - int identifier of the demandType to delete
      • findByPrimaryKey

        public static DemandType findByPrimaryKey​(int nIdDemandType)
        Load the data from the table
        Parameters:
        nIdDemandType - The identifier of the demandType
        Returns:
        The instance of the demandType
      • findByOrder

        public static DemandType findByOrder​(int nOrder)
        Find the demandType by its order
        Parameters:
        nOrder - the order
        Returns:
        a DemandType
      • findByIdCategoryAndDate

        public static List<DemandType> findByIdCategoryAndDate​(int nIdCategory,
                                                               Date dateToday)
        Find the list of demandTypes by id category and date
        Parameters:
        nIdCategory - the ID category
        dateToday - the date of today
        Returns:
        a list of DemandType
      • findDemandTypes

        public static fr.paris.lutece.util.ReferenceList findDemandTypes()
        Find all demandTypes as a ReferenceList
        Returns:
        a ReferenceList
      • findMaxOrder

        public static int findMaxOrder()
        Find the max order
        Returns:
        the max order
      • findNoDateEndDemandTypes

        public static List<DemandType> findNoDateEndDemandTypes()
        Find demand types that have not a date end
        Returns:
        a list of DemandType