Class AttributeServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.AttributeServiceImpl
-
- All Implemented Interfaces:
AttributeService
@Service public class AttributeServiceImpl extends java.lang.Object implements AttributeService
-
-
Field Summary
Fields Modifier and Type Field Description private AttributeRepositoryattributeRepositoryprivate AttributeValueRepositoryattributeValueRepositoryprivate CommonPropertiescommonPropertiesprivate LanguageRepositorylanguageRepositoryprivate static com.fasterxml.jackson.databind.ObjectMappermapperprivate MeasurementRepositorymeasurementRepositoryprivate org.springframework.data.mongodb.core.MongoTemplatemongoTemplateprivate OptionRepositoryoptionRepositoryprivate ProductRepositoryproductRepositoryprivate SequenceGeneratorServicesequenceGeneratorprivate SKURepositoryskuRepositoryprivate MongoStorageServicestorageServiceprivate TranslationServicetranslationServiceprivate TranslationsRepositorytranslationsRepository
-
Constructor Summary
Constructors Constructor Description AttributeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AttributeaddAttributeToProduct(java.lang.String productId, java.lang.String attributeId)This method does a relationship between entities.AttributeaddAttributeToProduct(java.lang.String productId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)This method does a relationship between entities.AttributeaddAttributeToSKU(java.lang.String skuId, java.lang.String attributeId)This method does a relationship between entities.AttributeaddAttributeToSKU(java.lang.String skuId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)This method does a relationship between entities.private voidaddRelations(Attribute aUI)private voidaddRelationsForMeasurement(Measurement mUI)private voidaddRelationsForOption(Option oUI)java.util.Optional<Attribute>createAttribute(Attribute attribute)This method creates a database entity.java.util.Optional<Attribute>createAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)This method creates a database entity.java.util.Optional<Measurement>createMeasurement(Measurement measurement)This method creates a database entity.java.util.Optional<Measurement>createMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> measureAsMap)This method creates a database entity.java.util.Optional<Option>createOption(Option option)This method creates a database entity.java.util.Optional<Option>createOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optionAsMap)This method creates a database entity.java.util.List<Attribute>findAttributes()This method returns data as list.java.util.List<Measurement>findMeasurements()This method returns data as list.java.util.List<Option>findOptions()This method returns data as list.java.lang.StringgetAttributeValue(java.lang.String attributeValueId)This method returns a value as text.MeasurementRepositorygetMeasurementRepository()java.lang.StringgetMeasurementValueFromAttribute(java.lang.String attrId)This method returns a value as text.java.util.List<Option>getOptionsFromAttribute(java.lang.String attrId)This method does request to retrieve data as list.OptionRepositorygetOptionsRepository()java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>getPaginationFilter(java.lang.String requestJson)Deprecated.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>getPaginationMeasurements(java.lang.String requestJson)Deprecated.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>getPaginationOptions(java.lang.String requestJson)Deprecated.AttributeRepositorygetRepository()AttributeDTOmapAttributeToDto(Attribute attr, boolean optimal)Deprecated.MeasurementDTOmapMeasurementToDto(Measurement msr, boolean optimal)Deprecated.OptionDTOmapOptionToDto(Option opt, boolean optimal)Deprecated.private voidprepareRelations(Attribute aUI)private voidprepareRelationsForMeasurement(Measurement mUI)private voidprepareRelationsForOption(Option oUI)voidremoveAttributeAndClean(java.lang.String attrId)This method removes a database entity and clean all relationships from another entities.voidremoveAttributeFromMeasurement(java.lang.String attrId)This method removes relationship between database entities.voidremoveAttributeFromOption(java.lang.String attrId, java.lang.String optionId)This method removes relationship between database entities.voidremoveAttributeFromOptions(java.lang.String attrId)This method removes relationship between database entities.voidremoveAttributeFromProduct(java.lang.String attrId, java.lang.String productId)This method removes relationship between database entities.voidremoveAttributeFromProducts(java.lang.String attrId)This method removes relationship between database entities.voidremoveAttributeFromSKU(java.lang.String attrId, java.lang.String skuId)This method removes relationship between database entities.voidremoveAttributeFromSKUs(java.lang.String attrId)This method removes relationship between database entities.voidremoveAttributeFromTranslation(java.lang.String attrId, java.lang.String tranId)This method removes relationship between database entities.voidremoveAttributeFromTranslations(java.lang.String attrId)This method removes relationship between database entities.voidremoveAttributesByIds(java.util.ArrayList<java.lang.String> attributeIds)This method removes a list of database entities.voidremoveAttributeValue(java.lang.String avId)This method removes database entity.private voidremoveAttributeValuesByAttribute(Attribute attribute)voidremoveAttributeValuesByAttributeId(java.lang.String attributeId)This method removes all relationships between database entities.voidremoveMeasurementAndClean(java.lang.String measureId)This method removes a database entity and clean all relationships from another entities.voidremoveMeasurementFromAttribute(java.lang.String measureId, java.lang.String attrId)This method removes relationship between database entities.voidremoveMeasurementFromAttributes(java.lang.String measureId)This method removes relationship between database entities.voidremoveMeasurementsByIds(java.util.ArrayList<java.lang.String> measurementsIds)This method removes a list of database entities.voidremoveOptionAndClean(java.lang.String optionId)This method removes a database entity and clean all relationships from another entities.voidremoveOptionFromAttribute(java.lang.String optionId, java.lang.String attrId)This method removes relationship between database entities.voidremoveOptionFromAttributes(java.lang.String optionId)This method removes relationship between database entities.voidremoveOptionFromTranslation(java.lang.String optionId, java.lang.String tranId)This method removes relationship between database entities.voidremoveOptionFromTranslations(java.lang.String optionId)This method removes relationship between database entities.voidremoveOptionsByIds(java.util.ArrayList<java.lang.String> optionsIds)This method removes a list of database entities.private voidremoveRelations(Attribute aUI, Attribute aDB)private voidremoveRelationsForMeasurement(Measurement mUI, Measurement mDB)private voidremoveRelationsForOption(Option oUI, Option oDB)AttributesaveAttribute(Attribute attribute)This method saves a database entity.AttributesaveAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)This method save an updates of database entity.MeasurementsaveMeasurement(Measurement msr)This method save an updates of database entity.MeasurementsaveMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> msrAsMap)This method save an updates of database entity.OptionsaveOption(Option option)This method save an updates of database entity.OptionsaveOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optAsMap)This method save an updates of database entity.java.util.LinkedHashSet<AttributeDTO>searchAttributes(java.lang.String requestJson)Deprecated.java.util.List<Attribute>searchAttributes(java.lang.String query, java.lang.String offset, java.lang.String limit)Deprecated.co.mastermindcms.modules.beans.SearchResponsesearchAttributes(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)This method does search requests and returns data as list.co.mastermindcms.modules.beans.SearchResponsesearchAttributesLightweight(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)Retrieves lightweight attributes based on the given request JSON.org.springframework.data.domain.Page<Attribute>searchAttributesPaged(java.lang.String requestJson)Deprecated.java.util.LinkedHashSet<MeasurementDTO>searchMeasurements(java.lang.String requestJson)Deprecated.java.util.List<Measurement>searchMeasurements(java.lang.String query, java.lang.String offset, java.lang.String limit)Deprecated.co.mastermindcms.modules.beans.SearchResponsesearchMeasurements(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)This method does search requests and returns data as list.org.springframework.data.domain.Page<Measurement>searchMeasurementsPaged(java.lang.String requestJson)Deprecated.java.util.LinkedHashSet<OptionDTO>searchOptions(java.lang.String requestJson)Deprecated.java.util.List<Option>searchOptions(java.lang.String query, java.lang.String offset, java.lang.String limit)Deprecated.co.mastermindcms.modules.beans.SearchResponsesearchOptions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)This method does search requests and returns data as list.org.springframework.data.domain.Page<Option>searchOptionsPaged(java.lang.String requestJson)Deprecated.
-
-
-
Field Detail
-
translationsRepository
@Autowired private TranslationsRepository translationsRepository
-
languageRepository
@Autowired private LanguageRepository languageRepository
-
attributeRepository
@Autowired private AttributeRepository attributeRepository
-
attributeValueRepository
@Autowired private AttributeValueRepository attributeValueRepository
-
measurementRepository
@Autowired private MeasurementRepository measurementRepository
-
optionRepository
@Autowired private OptionRepository optionRepository
-
productRepository
@Autowired private ProductRepository productRepository
-
skuRepository
@Autowired private SKURepository skuRepository
-
sequenceGenerator
@Autowired private SequenceGeneratorService sequenceGenerator
-
storageService
@Autowired private MongoStorageService storageService
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
translationService
@Autowired private TranslationService translationService
-
commonProperties
@Autowired private CommonProperties commonProperties
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
getRepository
public AttributeRepository getRepository()
- Specified by:
getRepositoryin interfaceAttributeService
-
getMeasurementRepository
public MeasurementRepository getMeasurementRepository()
- Specified by:
getMeasurementRepositoryin interfaceAttributeService
-
getOptionsRepository
public OptionRepository getOptionsRepository()
- Specified by:
getOptionsRepositoryin interfaceAttributeService
-
getPaginationFilter
@Deprecated public java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationFilter(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does calculation for a pages based on the request.- Specified by:
getPaginationFilterin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchAttributesLightweight
public co.mastermindcms.modules.beans.SearchResponse searchAttributesLightweight(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Description copied from interface:AttributeServiceRetrieves lightweight attributes based on the given request JSON.- Specified by:
searchAttributesLightweightin interfaceAttributeService- Parameters:
requestJson- a LinkedHashMap containing the request parameters- Returns:
- a SearchResponse object containing the lightweight attributes
-
searchAttributes
public co.mastermindcms.modules.beans.SearchResponse searchAttributes(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchAttributesin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchAttributes
@Deprecated public java.util.LinkedHashSet<AttributeDTO> searchAttributes(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchAttributesin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchAttributesPaged
@Deprecated public org.springframework.data.domain.Page<Attribute> searchAttributesPaged(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as pages.- Specified by:
searchAttributesPagedin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
getPaginationMeasurements
@Deprecated public java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationMeasurements(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does calculation for a pages based on the request.- Specified by:
getPaginationMeasurementsin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchMeasurements
public co.mastermindcms.modules.beans.SearchResponse searchMeasurements(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchMeasurementsin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchMeasurements
@Deprecated public java.util.LinkedHashSet<MeasurementDTO> searchMeasurements(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchMeasurementsin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchMeasurementsPaged
@Deprecated public org.springframework.data.domain.Page<Measurement> searchMeasurementsPaged(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as pages.- Specified by:
searchMeasurementsPagedin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
getPaginationOptions
@Deprecated public java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationOptions(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does calculation for a pages based on the request.- Specified by:
getPaginationOptionsin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchOptions
public co.mastermindcms.modules.beans.SearchResponse searchOptions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchOptionsin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchOptions
@Deprecated public java.util.LinkedHashSet<OptionDTO> searchOptions(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchOptionsin interfaceAttributeService- Parameters:
requestJson- search request- Returns:
- data transport entities as list
-
searchOptionsPaged
@Deprecated public org.springframework.data.domain.Page<Option> searchOptionsPaged(java.lang.String requestJson)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as pages.- Specified by:
searchOptionsPagedin interfaceAttributeService- Parameters:
requestJson- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
searchAttributes
@Deprecated public java.util.List<Attribute> searchAttributes(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchAttributesin interfaceAttributeService- Parameters:
query- search queryoffset- offset for returned itemslimit- limit for returned items- Returns:
- database entities as list
-
findAttributes
public java.util.List<Attribute> findAttributes()
Description copied from interface:AttributeServiceThis method returns data as list.- Specified by:
findAttributesin interfaceAttributeService- Returns:
- database entities as list
-
searchMeasurements
@Deprecated public java.util.List<Measurement> searchMeasurements(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchMeasurementsin interfaceAttributeService- Parameters:
query- search queryoffset- offset for returned itemslimit- limit for returned items- Returns:
- database entities as list
-
findMeasurements
public java.util.List<Measurement> findMeasurements()
Description copied from interface:AttributeServiceThis method returns data as list.- Specified by:
findMeasurementsin interfaceAttributeService- Returns:
- database entities as list
-
searchOptions
@Deprecated public java.util.List<Option> searchOptions(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.Description copied from interface:AttributeServiceThis method does search requests and returns data as list.- Specified by:
searchOptionsin interfaceAttributeService- Parameters:
query- search queryoffset- offset for returned itemslimit- limit for returned items- Returns:
- database entities as list
-
findOptions
public java.util.List<Option> findOptions()
Description copied from interface:AttributeServiceThis method returns data as list.- Specified by:
findOptionsin interfaceAttributeService- Returns:
- database entities as list
-
getOptionsFromAttribute
public java.util.List<Option> getOptionsFromAttribute(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method does request to retrieve data as list.- Specified by:
getOptionsFromAttributein interfaceAttributeService- 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:AttributeServiceThis method returns a value as text.- Specified by:
getMeasurementValueFromAttributein interfaceAttributeService- 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:AttributeServiceThis method returns a value as text.- Specified by:
getAttributeValuein interfaceAttributeService- 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:AttributeServiceThis method creates a database entity.- Specified by:
createMeasurementin interfaceAttributeService- 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:AttributeServiceThis method creates a database entity.- Specified by:
createOptionin interfaceAttributeService- 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:AttributeServiceThis method creates a database entity.- Specified by:
createAttributein interfaceAttributeService- Parameters:
attrAsMap- map-representation of database entity- Returns:
- optional value to externally interaction
-
createMeasurement
public java.util.Optional<Measurement> createMeasurement(Measurement measurement)
Description copied from interface:AttributeServiceThis method creates a database entity.- Specified by:
createMeasurementin interfaceAttributeService- Parameters:
measurement- database entity- Returns:
- optional value to externally interaction
-
createOption
public java.util.Optional<Option> createOption(Option option)
Description copied from interface:AttributeServiceThis method creates a database entity.- Specified by:
createOptionin interfaceAttributeService- Parameters:
option- database entity- Returns:
- optional value to externally interaction
-
createAttribute
public java.util.Optional<Attribute> createAttribute(Attribute attribute)
Description copied from interface:AttributeServiceThis method creates a database entity.- Specified by:
createAttributein interfaceAttributeService- Parameters:
attribute- 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:AttributeServiceThis method does a relationship between entities.- Specified by:
addAttributeToProductin interfaceAttributeService- Parameters:
productId- identification for database entity which will be updatedattrAsMap- map-representation of database entity- Returns:
- database entity
-
addAttributeToProduct
@Transactional public Attribute addAttributeToProduct(java.lang.String productId, java.lang.String attributeId)
Description copied from interface:AttributeServiceThis method does a relationship between entities.- Specified by:
addAttributeToProductin interfaceAttributeService- Parameters:
productId- identification for database entity which will be updatedattributeId- attribute identifier- 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:AttributeServiceThis method does a relationship between entities.- Specified by:
addAttributeToSKUin interfaceAttributeService- Parameters:
skuId- identification for database entity which will be updatedattrAsMap- map-representation of database entity- Returns:
- database entity
-
addAttributeToSKU
@Transactional public Attribute addAttributeToSKU(java.lang.String skuId, java.lang.String attributeId)
Description copied from interface:AttributeServiceThis method does a relationship between entities.- Specified by:
addAttributeToSKUin interfaceAttributeService- Parameters:
skuId- identification for database entity which will be updatedattributeId- attribute identifier- Returns:
- database entity
-
saveAttribute
@Transactional public Attribute saveAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
Description copied from interface:AttributeServiceThis method save an updates of database entity.- Specified by:
saveAttributein interfaceAttributeService- Parameters:
attrAsMap- map-representation of database entity- Returns:
- saved instance of database entity
-
saveAttribute
public Attribute saveAttribute(Attribute attribute)
Description copied from interface:AttributeServiceThis method saves a database entity.- Specified by:
saveAttributein interfaceAttributeService- Parameters:
attribute- 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:AttributeServiceThis method save an updates of database entity.- Specified by:
saveMeasurementin interfaceAttributeService- Parameters:
msrAsMap- map-representation of database entity- Returns:
- saved instance of database entity
-
saveMeasurement
public Measurement saveMeasurement(Measurement msr)
Description copied from interface:AttributeServiceThis method save an updates of database entity.- Specified by:
saveMeasurementin interfaceAttributeService- Parameters:
msr- 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:AttributeServiceThis method save an updates of database entity.- Specified by:
saveOptionin interfaceAttributeService- Parameters:
optAsMap- map-representation of database entity- Returns:
- optional value to externally interaction
-
saveOption
public Option saveOption(Option option)
Description copied from interface:AttributeServiceThis method save an updates of database entity.- Specified by:
saveOptionin interfaceAttributeService- Parameters:
option- database entity- Returns:
- value to externally interaction
-
prepareRelations
private void prepareRelations(Attribute aUI)
-
addRelations
private void addRelations(Attribute aUI)
-
prepareRelationsForMeasurement
private void prepareRelationsForMeasurement(Measurement mUI)
-
removeRelationsForMeasurement
private void removeRelationsForMeasurement(Measurement mUI, Measurement mDB)
-
addRelationsForMeasurement
private void addRelationsForMeasurement(Measurement mUI)
-
prepareRelationsForOption
private void prepareRelationsForOption(Option oUI)
-
addRelationsForOption
private void addRelationsForOption(Option oUI)
-
removeAttributeFromProduct
@Transactional public void removeAttributeFromProduct(java.lang.String attrId, java.lang.String productId)Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromProductin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removedproductId- identification for database entity which will be updated
-
removeAttributeFromProducts
@Transactional public void removeAttributeFromProducts(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromProductsin interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromSKUin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removedskuId- identification for database entity which will be updated
-
removeAttributeFromSKUs
@Transactional public void removeAttributeFromSKUs(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromSKUsin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removed
-
removeAttributeValue
public void removeAttributeValue(java.lang.String avId)
Description copied from interface:AttributeServiceThis method removes database entity.- Specified by:
removeAttributeValuein interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromTranslationin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removedtranId- identification for database entity which will be updated
-
removeAttributeFromTranslations
@Transactional public void removeAttributeFromTranslations(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromTranslationsin interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromOptionin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removedoptionId- identification for database entity which will be updated
-
removeAttributeFromOptions
@Transactional public void removeAttributeFromOptions(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromOptionsin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removed
-
removeAttributeFromMeasurement
@Transactional public void removeAttributeFromMeasurement(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeAttributeFromMeasurementin interfaceAttributeService- Parameters:
attrId- identification for database entity which will be removed
-
removeAttributeAndClean
@Transactional public void removeAttributeAndClean(java.lang.String attrId)
Description copied from interface:AttributeServiceThis method removes a database entity and clean all relationships from another entities.- Specified by:
removeAttributeAndCleanin interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeMeasurementFromAttributein interfaceAttributeService- Parameters:
measureId- identification for database entity which will be removedattrId- identification for database entity which will be updated
-
removeMeasurementFromAttributes
public void removeMeasurementFromAttributes(java.lang.String measureId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeMeasurementFromAttributesin interfaceAttributeService- Parameters:
measureId- identification for database entity which will be removed
-
removeMeasurementAndClean
@Transactional public void removeMeasurementAndClean(java.lang.String measureId)
Description copied from interface:AttributeServiceThis method removes a database entity and clean all relationships from another entities.- Specified by:
removeMeasurementAndCleanin interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeOptionFromAttributein interfaceAttributeService- Parameters:
optionId- identification for database entity which will be removedattrId- identification for database entity which will be updated
-
removeOptionFromAttributes
@Transactional public void removeOptionFromAttributes(java.lang.String optionId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeOptionFromAttributesin interfaceAttributeService- 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:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeOptionFromTranslationin interfaceAttributeService- Parameters:
optionId- identification for database entity which will be removedtranId- identification for database entity which will be updated
-
removeOptionFromTranslations
@Transactional public void removeOptionFromTranslations(java.lang.String optionId)
Description copied from interface:AttributeServiceThis method removes relationship between database entities.- Specified by:
removeOptionFromTranslationsin interfaceAttributeService- Parameters:
optionId- identification for database entity which will be removed
-
removeOptionAndClean
@Transactional public void removeOptionAndClean(java.lang.String optionId)
Description copied from interface:AttributeServiceThis method removes a database entity and clean all relationships from another entities.- Specified by:
removeOptionAndCleanin interfaceAttributeService- Parameters:
optionId- identification for database entity which will be removed
-
removeAttributeValuesByAttributeId
public void removeAttributeValuesByAttributeId(java.lang.String attributeId)
Description copied from interface:AttributeServiceThis method removes all relationships between database entities.- Specified by:
removeAttributeValuesByAttributeIdin interfaceAttributeService- 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:AttributeServiceThis method removes a list of database entities.- Specified by:
removeAttributesByIdsin interfaceAttributeService- 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:AttributeServiceThis method removes a list of database entities.- Specified by:
removeMeasurementsByIdsin interfaceAttributeService- 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:AttributeServiceThis method removes a list of database entities.- Specified by:
removeOptionsByIdsin interfaceAttributeService- Parameters:
optionsIds- the list of database entities which will be removed
-
mapAttributeToDto
@Deprecated public AttributeDTO mapAttributeToDto(Attribute attr, boolean optimal)
Deprecated.Description copied from interface:AttributeServiceThis method does map product entity to dto object- Specified by:
mapAttributeToDtoin interfaceAttributeService- Parameters:
attr- database entity which be used to map to dtooptimal- this pointer optimises the data transfer object- Returns:
- data transport object
-
mapOptionToDto
@Deprecated public OptionDTO mapOptionToDto(Option opt, boolean optimal)
Deprecated.Description copied from interface:AttributeServiceThis method does map product entity to dto object- Specified by:
mapOptionToDtoin interfaceAttributeService- Parameters:
opt- database entity which be used to map to dtooptimal- this pointer optimises the data transfer object- Returns:
- data transport object
-
mapMeasurementToDto
@Deprecated public MeasurementDTO mapMeasurementToDto(Measurement msr, boolean optimal)
Deprecated.Description copied from interface:AttributeServiceThis method does map product entity to dto object- Specified by:
mapMeasurementToDtoin interfaceAttributeService- Parameters:
msr- database entity which be used to map to dtooptimal- this pointer optimises the data transfer object- Returns:
- data transport object
-
removeAttributeValuesByAttribute
private void removeAttributeValuesByAttribute(Attribute attribute)
-
-