Class CertificateServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCertificatesByIds​(java.util.ArrayList<java.lang.String> certificatesIds, java.lang.String sellerId)
      This method does a relationship between entities.
      void addCertificateToLoggedSeller​(java.lang.String certificateId)
      This method does a relationship between entities.
      void addCertificateToSeller​(java.lang.String certificateId, java.lang.String sellerId)
      This method does a relationship between entities.
      Certificate createCertificate​(Certificate certificate)
      This method creates a database entity.
      Certificate createCertificate​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> certificateAsMap)
      This method creates a database entity.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationFilter​(java.lang.String requestJson)
      This method does calculation for a pages based on the request.
      java.util.List<Certificate> getSellerCertificates​(java.lang.String sellerId)
      This method returns database entities as list.
      boolean isCertificateExists​(java.lang.String certificateId)
      This method checks is exists database entity.
      boolean isCertificateNotExists​(java.lang.String certificateId)
      This method checks is not exists database entity.
      void removeCertificateAndClean​(java.lang.String certificateId)
      This method removes a database entity and clean all relationships from another entities.
      void removeCertificateFromLoggedSeller​(java.lang.String certificateId)
      This method removes relationship between entities.
      void removeCertificateFromSeller​(java.lang.String certificateId, java.lang.String sellerId)
      This method removes relationship between database entities.
      void removeCertificates​(java.util.ArrayList<java.lang.String> certificateIds)
      This method removes a list of database entities.
      Certificate saveCertificate​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> certificateAsMap)
      This method save an updates of database entity.
      java.util.List<Certificate> searchResults​(java.lang.String requestJson)
      This method does search requests and returns data as list.
      org.springframework.data.domain.Page<Certificate> searchResultsPaged​(java.lang.String requestJson)
      This method does search requests and returns data as pages.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CertificateServiceImpl

        public CertificateServiceImpl()
    • Method Detail

      • searchResults

        public java.util.List<Certificate> searchResults​(java.lang.String requestJson)
        Description copied from interface: CertificateService
        This method does search requests and returns data as list.
        Specified by:
        searchResults in interface CertificateService
        Parameters:
        requestJson - search json
        Returns:
        database entities as list
      • searchResultsPaged

        public org.springframework.data.domain.Page<Certificate> searchResultsPaged​(java.lang.String requestJson)
        Description copied from interface: CertificateService
        This method does search requests and returns data as pages.
        Specified by:
        searchResultsPaged in interface CertificateService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • getPaginationFilter

        public java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationFilter​(java.lang.String requestJson)
        Description copied from interface: CertificateService
        This method does calculation for a pages based on the request.
        Specified by:
        getPaginationFilter in interface CertificateService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • isCertificateExists

        public boolean isCertificateExists​(java.lang.String certificateId)
        Description copied from interface: CertificateService
        This method checks is exists database entity.
        Specified by:
        isCertificateExists in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be checked
        Returns:
        value as boolean
      • isCertificateNotExists

        public boolean isCertificateNotExists​(java.lang.String certificateId)
        Description copied from interface: CertificateService
        This method checks is not exists database entity.
        Specified by:
        isCertificateNotExists in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be checked
        Returns:
        value as boolean
      • addCertificateToLoggedSeller

        @Transactional
        public void addCertificateToLoggedSeller​(java.lang.String certificateId)
        Description copied from interface: CertificateService
        This method does a relationship between entities.
        Specified by:
        addCertificateToLoggedSeller in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be updated
      • removeCertificateFromLoggedSeller

        public void removeCertificateFromLoggedSeller​(java.lang.String certificateId)
        Description copied from interface: CertificateService
        This method removes relationship between entities.
        Specified by:
        removeCertificateFromLoggedSeller in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be updated
      • createCertificate

        @Transactional
        public Certificate createCertificate​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> certificateAsMap)
        Description copied from interface: CertificateService
        This method creates a database entity.
        Specified by:
        createCertificate in interface CertificateService
        Parameters:
        certificateAsMap - map-representation of database entity
        Returns:
        database entity
      • saveCertificate

        @Transactional
        public Certificate saveCertificate​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> certificateAsMap)
        Description copied from interface: CertificateService
        This method save an updates of database entity.
        Specified by:
        saveCertificate in interface CertificateService
        Parameters:
        certificateAsMap - map-representation of database entity
        Returns:
        saved instance of database entity
      • addCertificateToSeller

        @Transactional
        public void addCertificateToSeller​(java.lang.String certificateId,
                                           java.lang.String sellerId)
        Description copied from interface: CertificateService
        This method does a relationship between entities.
        Specified by:
        addCertificateToSeller in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be updated
        sellerId - identification for database entity which will be updated
      • removeCertificateFromSeller

        @Transactional
        public void removeCertificateFromSeller​(java.lang.String certificateId,
                                                java.lang.String sellerId)
        Description copied from interface: CertificateService
        This method removes relationship between database entities.
        Specified by:
        removeCertificateFromSeller in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be removed
        sellerId - identification for database entity which will be updated
      • removeCertificateAndClean

        @Transactional
        public void removeCertificateAndClean​(java.lang.String certificateId)
        Description copied from interface: CertificateService
        This method removes a database entity and clean all relationships from another entities.
        Specified by:
        removeCertificateAndClean in interface CertificateService
        Parameters:
        certificateId - identification for database entity which will be removed
      • removeCertificates

        @Transactional
        public void removeCertificates​(java.util.ArrayList<java.lang.String> certificateIds)
        Description copied from interface: CertificateService
        This method removes a list of database entities.
        Specified by:
        removeCertificates in interface CertificateService
        Parameters:
        certificateIds - the list of database entities which will be removed
      • addCertificatesByIds

        public void addCertificatesByIds​(java.util.ArrayList<java.lang.String> certificatesIds,
                                         java.lang.String sellerId)
        Description copied from interface: CertificateService
        This method does a relationship between entities.
        Specified by:
        addCertificatesByIds in interface CertificateService
        Parameters:
        certificatesIds - the list of database entities which will be added
        sellerId - identification for database entity which will be updated
      • getSellerCertificates

        public java.util.List<Certificate> getSellerCertificates​(java.lang.String sellerId)
        Description copied from interface: CertificateService
        This method returns database entities as list.
        Specified by:
        getSellerCertificates in interface CertificateService
        Parameters:
        sellerId - identification for database entity which related entities list be returned
        Returns:
        database entities as list