Interface AttributeService

    • Method Detail

      • getPaginationFilter

        java.util.Deque<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.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • searchAttributes

        java.util.LinkedHashSet<AttributeDTO> searchAttributes​(java.lang.String requestJson)
        This method does search requests and returns data as list.
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchAttributesPaged

        org.springframework.data.domain.Page<Attribute> searchAttributesPaged​(java.lang.String requestJson)
        This method does search requests and returns data as pages.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • getPaginationMeasurements

        java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationMeasurements​(java.lang.String requestJson)
        This method does calculation for a pages based on the request.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • searchMeasurements

        java.util.LinkedHashSet<MeasurementDTO> searchMeasurements​(java.lang.String requestJson)
        This method does search requests and returns data as list.
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchMeasurementsPaged

        org.springframework.data.domain.Page<Measurement> searchMeasurementsPaged​(java.lang.String requestJson)
        This method does search requests and returns data as pages.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • getPaginationOptions

        java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationOptions​(java.lang.String requestJson)
        This method does calculation for a pages based on the request.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • searchOptions

        java.util.LinkedHashSet<OptionDTO> searchOptions​(java.lang.String requestJson)
        This method does search requests and returns data as list.
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchOptionsPaged

        org.springframework.data.domain.Page<Option> searchOptionsPaged​(java.lang.String requestJson)
        This method does search requests and returns data as pages.
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • searchAttributes

        @Deprecated
        java.util.List<Attribute> searchAttributes​(java.lang.String query,
                                                   java.lang.String offset,
                                                   java.lang.String limit)
        Deprecated.
        This method does search requests and returns data as list.
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • findAttributes

        java.util.List<Attribute> findAttributes()
        This method returns data as list.
        Returns:
        database entities as list
      • searchMeasurements

        @Deprecated
        java.util.List<Measurement> searchMeasurements​(java.lang.String query,
                                                       java.lang.String offset,
                                                       java.lang.String limit)
        Deprecated.
        This method does search requests and returns data as list.
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • findMeasurements

        java.util.List<Measurement> findMeasurements()
        This method returns data as list.
        Returns:
        database entities as list
      • searchOptions

        @Deprecated
        java.util.List<Option> searchOptions​(java.lang.String query,
                                             java.lang.String offset,
                                             java.lang.String limit)
        Deprecated.
        This method does search requests and returns data as list.
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • findOptions

        java.util.List<Option> findOptions()
        This method returns data as list.
        Returns:
        database entities as list
      • getOptionsFromAttribute

        java.util.List<Option> getOptionsFromAttribute​(java.lang.String attrId)
        This method does request to retrieve data as list.
        Parameters:
        attrId - this attribute id is used for return all related options
        Returns:
        all related options
      • getMeasurementValueFromAttribute

        java.lang.String getMeasurementValueFromAttribute​(java.lang.String attrId)
        This method returns a value as text.
        Parameters:
        attrId - identification for database entity which will be retrieved
        Returns:
        value as text
      • getAttributeValue

        java.lang.String getAttributeValue​(java.lang.String attributeValueId)
        This method returns a value as text.
        Parameters:
        attributeValueId - identification for database entity which will be retrieved
        Returns:
        value as text
      • createMeasurement

        java.util.Optional<Measurement> createMeasurement​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> measureAsMap)
        This method creates a database entity.
        Parameters:
        measureAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createOption

        java.util.Optional<Option> createOption​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> optionAsMap)
        This method creates a database entity.
        Parameters:
        optionAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createAttribute

        java.util.Optional<Attribute> createAttribute​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        This method creates a database entity.
        Parameters:
        attrAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createMeasurement

        java.util.Optional<Measurement> createMeasurement​(Measurement measurement)
        This method creates a database entity.
        Parameters:
        measurement - database entity
        Returns:
        optional value to externally interaction
      • createOption

        java.util.Optional<Option> createOption​(Option option)
        This method creates a database entity.
        Parameters:
        option - database entity
        Returns:
        optional value to externally interaction
      • createAttribute

        java.util.Optional<Attribute> createAttribute​(Attribute attribute)
        This method creates a database entity.
        Parameters:
        attribute - database entity
        Returns:
        optional value to externally interaction
      • addAttributeToProduct

        Attribute addAttributeToProduct​(java.lang.String productId,
                                        java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        This method does a relationship between entities.
        Parameters:
        productId - identification for database entity which will be updated
        attrAsMap - map-representation of database entity
        Returns:
        database entity
      • addAttributeToProduct

        Attribute addAttributeToProduct​(java.lang.String productId,
                                        java.lang.String attributeId)
        This method does a relationship between entities.
        Parameters:
        productId - identification for database entity which will be updated
        attributeId - attribute identifier
        Returns:
        database entity
      • addAttributeToSKU

        Attribute addAttributeToSKU​(java.lang.String skuId,
                                    java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        This method does a relationship between entities.
        Parameters:
        skuId - identification for database entity which will be updated
        attrAsMap - map-representation of database entity
        Returns:
        database entity
      • addAttributeToSKU

        Attribute addAttributeToSKU​(java.lang.String skuId,
                                    java.lang.String attributeId)
        This method does a relationship between entities.
        Parameters:
        skuId - identification for database entity which will be updated
        attributeId - attribute identifier
        Returns:
        database entity
      • saveAttribute

        Attribute saveAttribute​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        This method save an updates of database entity.
        Parameters:
        attrAsMap - map-representation of database entity
        Returns:
        saved instance of database entity
      • saveAttribute

        Attribute saveAttribute​(Attribute attribute)
        This method saves a database entity.
        Parameters:
        attribute - database entity
        Returns:
        saved instance of database entity
      • saveMeasurement

        Measurement saveMeasurement​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> msrAsMap)
        This method save an updates of database entity.
        Parameters:
        msrAsMap - map-representation of database entity
        Returns:
        saved instance of database entity
      • saveMeasurement

        Measurement saveMeasurement​(Measurement msr)
        This method save an updates of database entity.
        Parameters:
        msr - database entity
        Returns:
        saved instance of database entity
      • saveOption

        Option saveOption​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> optAsMap)
        This method save an updates of database entity.
        Parameters:
        optAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • saveOption

        Option saveOption​(Option option)
        This method save an updates of database entity.
        Parameters:
        option - database entity
        Returns:
        value to externally interaction
      • removeAttributeFromProduct

        void removeAttributeFromProduct​(java.lang.String attrId,
                                        java.lang.String productId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
        productId - identification for database entity which will be updated
      • removeAttributeFromProducts

        void removeAttributeFromProducts​(java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromSKU

        void removeAttributeFromSKU​(java.lang.String attrId,
                                    java.lang.String skuId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
        skuId - identification for database entity which will be updated
      • removeAttributeFromSKUs

        void removeAttributeFromSKUs​(java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeValue

        void removeAttributeValue​(java.lang.String avId)
        This method removes database entity.
        Parameters:
        avId - identification for database entity which will be removed
      • removeAttributeFromTranslation

        void removeAttributeFromTranslation​(java.lang.String attrId,
                                            java.lang.String tranId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
        tranId - identification for database entity which will be updated
      • removeAttributeFromTranslations

        void removeAttributeFromTranslations​(java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromOption

        void removeAttributeFromOption​(java.lang.String attrId,
                                       java.lang.String optionId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
        optionId - identification for database entity which will be updated
      • removeAttributeFromOptions

        void removeAttributeFromOptions​(java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromMeasurement

        void removeAttributeFromMeasurement​(java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeAndClean

        void removeAttributeAndClean​(java.lang.String attrId)
        This method removes a database entity and clean all relationships from another entities.
        Parameters:
        attrId - identification for database entity which will be removed
      • removeMeasurementFromAttribute

        void removeMeasurementFromAttribute​(java.lang.String measureId,
                                            java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        measureId - identification for database entity which will be removed
        attrId - identification for database entity which will be updated
      • removeMeasurementFromAttributes

        void removeMeasurementFromAttributes​(java.lang.String measureId)
        This method removes relationship between database entities.
        Parameters:
        measureId - identification for database entity which will be removed
      • removeMeasurementAndClean

        void removeMeasurementAndClean​(java.lang.String measureId)
        This method removes a database entity and clean all relationships from another entities.
        Parameters:
        measureId - identification for database entity which will be removed
      • removeOptionFromAttribute

        void removeOptionFromAttribute​(java.lang.String optionId,
                                       java.lang.String attrId)
        This method removes relationship between database entities.
        Parameters:
        optionId - identification for database entity which will be removed
        attrId - identification for database entity which will be updated
      • removeOptionFromAttributes

        void removeOptionFromAttributes​(java.lang.String optionId)
        This method removes relationship between database entities.
        Parameters:
        optionId - identification for database entity which will be removed
      • removeOptionFromTranslation

        void removeOptionFromTranslation​(java.lang.String optionId,
                                         java.lang.String tranId)
        This method removes relationship between database entities.
        Parameters:
        optionId - identification for database entity which will be removed
        tranId - identification for database entity which will be updated
      • removeOptionFromTranslations

        void removeOptionFromTranslations​(java.lang.String optionId)
        This method removes relationship between database entities.
        Parameters:
        optionId - identification for database entity which will be removed
      • removeOptionAndClean

        void removeOptionAndClean​(java.lang.String optionId)
        This method removes a database entity and clean all relationships from another entities.
        Parameters:
        optionId - identification for database entity which will be removed
      • removeAttributeValuesByAttributeId

        void removeAttributeValuesByAttributeId​(java.lang.String attributeId)
        This method removes all relationships between database entities.
        Parameters:
        attributeId - identification for database entity which will be updated
      • removeAttributesByIds

        void removeAttributesByIds​(java.util.ArrayList<java.lang.String> attributeIds)
        This method removes a list of database entities.
        Parameters:
        attributeIds - the list of database entities which will be removed
      • removeMeasurementsByIds

        void removeMeasurementsByIds​(java.util.ArrayList<java.lang.String> measurementsIds)
        This method removes a list of database entities.
        Parameters:
        measurementsIds - the list of database entities which will be removed
      • removeOptionsByIds

        void removeOptionsByIds​(java.util.ArrayList<java.lang.String> optionsIds)
        This method removes a list of database entities.
        Parameters:
        optionsIds - the list of database entities which will be removed
      • mapAttributeToDto

        AttributeDTO mapAttributeToDto​(Attribute attr,
                                       boolean optimal)
        This method does map product entity to dto object
        Parameters:
        attr - database entity which be used to map to dto
        optimal - this pointer optimises the data transfer object
        Returns:
        data transport object
      • mapOptionToDto

        OptionDTO mapOptionToDto​(Option opt,
                                 boolean optimal)
        This method does map product entity to dto object
        Parameters:
        opt - database entity which be used to map to dto
        optimal - this pointer optimises the data transfer object
        Returns:
        data transport object
      • mapMeasurementToDto

        MeasurementDTO mapMeasurementToDto​(Measurement msr,
                                           boolean optimal)
        This method does map product entity to dto object
        Parameters:
        msr - database entity which be used to map to dto
        optimal - this pointer optimises the data transfer object
        Returns:
        data transport object