Interface AttributeService

    • Method Detail

      • searchAttributes

        java.util.List<Attribute> searchAttributes​(java.lang.String query,
                                                   java.lang.String offset,
                                                   java.lang.String limit)
        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

        java.util.List<Measurement> searchMeasurements​(java.lang.String query,
                                                       java.lang.String offset,
                                                       java.lang.String limit)
        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

        java.util.List<Option> searchOptions​(java.lang.String query,
                                             java.lang.String offset,
                                             java.lang.String limit)
        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
      • 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
      • 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
      • 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
      • 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
      • 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
      • prepareRelations

        void prepareRelations​(Attribute aUI)
        This method does preparations of relationships between database entities.
        Parameters:
        aUI - database entity
      • removeRelations

        void removeRelations​(Attribute aUI,
                             Attribute aDB)
        This method removes all relationships between database entities.
        Parameters:
        aUI - source database entity
        aDB - target database entity
      • addRelations

        void addRelations​(Attribute aUI)
        This method creates all relationships between database entities.
        Parameters:
        aUI - source database entity
      • prepareRelationsForMeasurement

        void prepareRelationsForMeasurement​(Measurement mUI)
        This method does preparations of relationships between database entities.
        Parameters:
        mUI - database entity
      • removeRelationsForMeasurement

        void removeRelationsForMeasurement​(Measurement mUI,
                                           Measurement mDB)
        This method removes all relationships between database entities.
        Parameters:
        mUI - source database entity
        mDB - target database entity
      • addRelationsForMeasurement

        void addRelationsForMeasurement​(Measurement mUI)
        This method creates all relationships between database entities.
        Parameters:
        mUI - source database entity
      • prepareRelationsForOption

        void prepareRelationsForOption​(Option oUI)
        This method does preparations of relationships between database entities.
        Parameters:
        oUI - database entity
      • removeRelationsForOption

        void removeRelationsForOption​(Option oUI,
                                      Option oDB)
        This method removes all relationships between database entities.
        Parameters:
        oUI - source database entity
        oDB - target database entity
      • addRelationsForOption

        void addRelationsForOption​(Option oUI)
        This method creates all relationships between database entities.
        Parameters:
        oUI - source database entity
      • 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)
      • 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