Class AttributeServiceImpl

    • Constructor Detail

      • AttributeServiceImpl

        public AttributeServiceImpl()
    • Method Detail

      • searchAttributes

        public java.util.List<Attribute> searchAttributes​(java.lang.String query,
                                                          java.lang.String offset,
                                                          java.lang.String limit)
        Description copied from interface: AttributeService
        This method does search requests and returns data as list.
        Specified by:
        searchAttributes in interface AttributeService
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • searchMeasurements

        public java.util.List<Measurement> searchMeasurements​(java.lang.String query,
                                                              java.lang.String offset,
                                                              java.lang.String limit)
        Description copied from interface: AttributeService
        This method does search requests and returns data as list.
        Specified by:
        searchMeasurements in interface AttributeService
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • searchOptions

        public java.util.List<Option> searchOptions​(java.lang.String query,
                                                    java.lang.String offset,
                                                    java.lang.String limit)
        Description copied from interface: AttributeService
        This method does search requests and returns data as list.
        Specified by:
        searchOptions in interface AttributeService
        Parameters:
        query - search query
        offset - offset for returned items
        limit - limit for returned items
        Returns:
        database entities as list
      • getOptionsFromAttribute

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

        public java.lang.String getMeasurementValueFromAttribute​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method returns a value as text.
        Specified by:
        getMeasurementValueFromAttribute in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be retrieved
        Returns:
        value as text
      • getAttributeValue

        public java.lang.String getAttributeValue​(java.lang.String attributeValueId)
        Description copied from interface: AttributeService
        This method returns a value as text.
        Specified by:
        getAttributeValue in interface AttributeService
        Parameters:
        attributeValueId - identification for database entity which will be retrieved
        Returns:
        value as text
      • createMeasurement

        @Transactional
        public java.util.Optional<Measurement> createMeasurement​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> measureAsMap)
        Description copied from interface: AttributeService
        This method creates a database entity.
        Specified by:
        createMeasurement in interface AttributeService
        Parameters:
        measureAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createOption

        @Transactional
        public java.util.Optional<Option> createOption​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> optionAsMap)
        Description copied from interface: AttributeService
        This method creates a database entity.
        Specified by:
        createOption in interface AttributeService
        Parameters:
        optionAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • createAttribute

        @Transactional
        public java.util.Optional<Attribute> createAttribute​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        Description copied from interface: AttributeService
        This method creates a database entity.
        Specified by:
        createAttribute in interface AttributeService
        Parameters:
        attrAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • addAttributeToProduct

        @Transactional
        public Attribute addAttributeToProduct​(java.lang.String productId,
                                               java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        Description copied from interface: AttributeService
        This method does a relationship between entities.
        Specified by:
        addAttributeToProduct in interface AttributeService
        Parameters:
        productId - identification for database entity which will be updated
        attrAsMap - map-representation of database entity
        Returns:
        database entity
      • addAttributeToSKU

        @Transactional
        public Attribute addAttributeToSKU​(java.lang.String skuId,
                                           java.util.LinkedHashMap<java.lang.String,​java.lang.Object> attrAsMap)
        Description copied from interface: AttributeService
        This method does a relationship between entities.
        Specified by:
        addAttributeToSKU in interface AttributeService
        Parameters:
        skuId - identification for database entity which will be updated
        attrAsMap - map-representation of database entity
        Returns:
        database entity
      • saveAttribute

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

        public Measurement saveMeasurement​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> msrAsMap)
        Description copied from interface: AttributeService
        This method save an updates of database entity.
        Specified by:
        saveMeasurement in interface AttributeService
        Parameters:
        msrAsMap - map-representation of database entity
        Returns:
        saved instance of database entity
      • saveOption

        public Option saveOption​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> optAsMap)
        Description copied from interface: AttributeService
        This method save an updates of database entity.
        Specified by:
        saveOption in interface AttributeService
        Parameters:
        optAsMap - map-representation of database entity
        Returns:
        optional value to externally interaction
      • prepareRelations

        public void prepareRelations​(Attribute aUI)
        Description copied from interface: AttributeService
        This method does preparations of relationships between database entities.
        Specified by:
        prepareRelations in interface AttributeService
        Parameters:
        aUI - database entity
      • removeRelations

        @Transactional
        public void removeRelations​(Attribute aUI,
                                    Attribute aDB)
        Description copied from interface: AttributeService
        This method removes all relationships between database entities.
        Specified by:
        removeRelations in interface AttributeService
        Parameters:
        aUI - source database entity
        aDB - target database entity
      • addRelations

        @Transactional
        public void addRelations​(Attribute aUI)
        Description copied from interface: AttributeService
        This method creates all relationships between database entities.
        Specified by:
        addRelations in interface AttributeService
        Parameters:
        aUI - source database entity
      • prepareRelationsForOption

        public void prepareRelationsForOption​(Option oUI)
        Description copied from interface: AttributeService
        This method does preparations of relationships between database entities.
        Specified by:
        prepareRelationsForOption in interface AttributeService
        Parameters:
        oUI - database entity
      • removeRelationsForOption

        public void removeRelationsForOption​(Option oUI,
                                             Option oDB)
        Description copied from interface: AttributeService
        This method removes all relationships between database entities.
        Specified by:
        removeRelationsForOption in interface AttributeService
        Parameters:
        oUI - source database entity
        oDB - target database entity
      • addRelationsForOption

        public void addRelationsForOption​(Option oUI)
        Description copied from interface: AttributeService
        This method creates all relationships between database entities.
        Specified by:
        addRelationsForOption in interface AttributeService
        Parameters:
        oUI - source database entity
      • removeAttributeFromProduct

        @Transactional
        public void removeAttributeFromProduct​(java.lang.String attrId,
                                               java.lang.String productId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromProduct in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
        productId - identification for database entity which will be updated
      • removeAttributeFromProducts

        @Transactional
        public void removeAttributeFromProducts​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromProducts in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromSKU

        @Transactional
        public void removeAttributeFromSKU​(java.lang.String attrId,
                                           java.lang.String skuId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromSKU in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
        skuId - identification for database entity which will be updated
      • removeAttributeFromSKUs

        @Transactional
        public void removeAttributeFromSKUs​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromSKUs in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeValue

        public void removeAttributeValue​(java.lang.String avId)
        Description copied from interface: AttributeService
        This method removes database entity.
        Specified by:
        removeAttributeValue in interface AttributeService
        Parameters:
        avId - identification for database entity which will be removed
      • removeAttributeFromTranslation

        @Transactional
        public void removeAttributeFromTranslation​(java.lang.String attrId,
                                                   java.lang.String tranId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromTranslation in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
        tranId - identification for database entity which will be updated
      • removeAttributeFromTranslations

        @Transactional
        public void removeAttributeFromTranslations​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromTranslations in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromOption

        @Transactional
        public void removeAttributeFromOption​(java.lang.String attrId,
                                              java.lang.String optionId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromOption in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
        optionId - identification for database entity which will be updated
      • removeAttributeFromOptions

        @Transactional
        public void removeAttributeFromOptions​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromOptions in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeFromMeasurement

        @Transactional
        public void removeAttributeFromMeasurement​(java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeAttributeFromMeasurement in interface AttributeService
        Parameters:
        attrId - identification for database entity which will be removed
      • removeAttributeAndClean

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

        @Transactional
        public void removeMeasurementFromAttribute​(java.lang.String measureId,
                                                   java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeMeasurementFromAttribute in interface AttributeService
        Parameters:
        measureId - identification for database entity which will be removed
        attrId - identification for database entity which will be updated
      • removeMeasurementFromAttributes

        public void removeMeasurementFromAttributes​(java.lang.String measureId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeMeasurementFromAttributes in interface AttributeService
        Parameters:
        measureId - identification for database entity which will be removed
      • removeMeasurementAndClean

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

        @Transactional
        public void removeOptionFromAttribute​(java.lang.String optionId,
                                              java.lang.String attrId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeOptionFromAttribute in interface AttributeService
        Parameters:
        optionId - identification for database entity which will be removed
        attrId - identification for database entity which will be updated
      • removeOptionFromAttributes

        @Transactional
        public void removeOptionFromAttributes​(java.lang.String optionId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeOptionFromAttributes in interface AttributeService
        Parameters:
        optionId - identification for database entity which will be removed
      • removeOptionFromTranslation

        @Transactional
        public void removeOptionFromTranslation​(java.lang.String optionId,
                                                java.lang.String tranId)
        Description copied from interface: AttributeService
        This method removes relationship between database entities.
        Specified by:
        removeOptionFromTranslation in interface AttributeService
        Parameters:
        optionId - identification for database entity which will be removed
        tranId - identification for database entity which will be updated
      • removeOptionAndClean

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

        public void removeAttributeValuesByAttributeId​(java.lang.String attributeId)
        Description copied from interface: AttributeService
        This method removes all relationships between database entities.
        Specified by:
        removeAttributeValuesByAttributeId in interface AttributeService
        Parameters:
        attributeId - identification for database entity which will be updated
      • removeAttributesByIds

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

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

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