Class ServiceContractHome


  • public final class ServiceContractHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for ServiceContract objects
    • Method Detail

      • create

        public static ServiceContract create​(ServiceContract serviceContract,
                                             int clientApplicationId)
        Create an instance of the serviceContract class
        Parameters:
        serviceContract - The instance of the ServiceContract which contains the information to store
        Returns:
        The instance of serviceContract which has been created with its primary key.
      • update

        public static ServiceContract update​(ServiceContract serviceContract,
                                             int clientApplicationId)
        Update of the serviceContract which is specified in parameter
        Parameters:
        serviceContract - The instance of the ServiceContract which contains the data to store
        Returns:
        The instance of the serviceContract which has been updated
      • close

        public static ServiceContract close​(ServiceContract serviceContract)
        Closes the serviceContract by setting an and date
        Parameters:
        serviceContract - The instance of the ServiceContract which contains the data to store
        Returns:
        The instance of the serviceContract which has been updated
      • remove

        public static void remove​(int nKey)
        Remove the serviceContract whose identifier is specified in parameter
        Parameters:
        nKey - The serviceContract Id
      • findByPrimaryKey

        public static java.util.Optional<ServiceContract> findByPrimaryKey​(int nKey)
        Returns an instance of a serviceContract whose identifier is specified in parameter
        Parameters:
        nKey - The serviceContract primary key
        Returns:
        an instance of ServiceContract
      • getIdServiceContractsList

        public static java.util.List<java.lang.Integer> getIdServiceContractsList()
        Load the id of all the serviceContract objects and returns them as a list
        Returns:
        the list which contains the id of all the serviceContract objects
      • getFilteredIdServiceContractsList

        public static java.util.List<java.lang.Integer> getFilteredIdServiceContractsList​(java.util.Map<java.lang.String,​java.lang.String> params)
        Load the id of all the serviceContract objects and returns them as a list
        Returns:
        the list which contains the id of all the serviceContract objects
      • getServiceContractsListByIds

        public static java.util.List<org.apache.commons.lang3.tuple.ImmutablePair<ServiceContract,​java.lang.String>> getServiceContractsListByIds​(java.util.List<java.lang.Integer> listIds)
        Load the data of all the avant objects and returns them as a list
        Parameters:
        listIds - liste of ids
        Returns:
        the list which contains the data of all the avant objects
      • getServiceContractsListBetweenDates

        public static java.util.List<ServiceContract> getServiceContractsListBetweenDates​(java.sql.Date startingDate,
                                                                                          java.sql.Date endingDate)
        Load the data of all the service contracts between two date and returns them as a list
        Parameters:
        startingDate - starting date of the contract
        endingDate - ending date of the contract
        Returns:
        The list which contains the data of all the avant objects
      • getServiceContractsListWithMinEndDate

        public static java.util.List<ServiceContract> getServiceContractsListWithMinEndDate​(java.sql.Date minEndDate)
        Load the data of all the service contracts with a min end date as specified
        Parameters:
        minEndDate - - the min end date
        Returns:
        List
      • getAllServiceContractsList

        public static java.util.List<ServiceContract> getAllServiceContractsList()
        Load the data of all the service contracts and returns them as a list
        Returns:
        The list which contains the data of all the ServiceContract objects
      • selectApplicationRights

        public static java.util.List<AttributeRight> selectApplicationRights​(ServiceContract serviceContract)
        returns rights of provided application
        Parameters:
        serviceContract - service contract
        Returns:
        list of rights
      • addAttributeRights

        public static void addAttributeRights​(java.util.List<AttributeRight> lstAttributeRights,
                                              ServiceContract serviceContract)
        add rights to the application
        Parameters:
        lstAttributeRights - attribute rights to add
      • selectCertificationLevels

        public static java.util.List<RefCertificationLevel> selectCertificationLevels()
      • removeAttributeRights

        public static void removeAttributeRights​(ServiceContract serviceContract)
      • removeAttributeCertifications

        public static void removeAttributeCertifications​(ServiceContract serviceContract)
      • removeAttributeRequirements

        public static void removeAttributeRequirements​(ServiceContract serviceContract)
      • updateServiceContractLastUpdateAndAuthor

        public static void updateServiceContractLastUpdateAndAuthor​(int idServiceContract,
                                                                    java.lang.String authorName)