Class SavedQueryServiceImpl
- java.lang.Object
-
- de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
-
- de.hybris.platform.cockpit.services.query.impl.SavedQueryServiceImpl
-
- All Implemented Interfaces:
SavedQueryService
- Direct Known Subclasses:
ProductSavedQueryServiceImpl
public class SavedQueryServiceImpl extends AbstractServiceImpl implements SavedQueryService
Default implementation ofSavedQueryService
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCOLLECTION_DELIMprotected static java.lang.StringDATE_MARKprotected static java.lang.StringENUM_DELIMprotected static java.lang.StringENUM_MARKprotected static java.lang.StringFEATURE_VALUE_DELIMprotected static java.lang.StringFEATURE_VALUE_MARKprotected static intFEATURE_VALUE_STRING_VALUE_POSprotected static intFEATURE_VALUE_UNIT_POSprotected static intNUMBER_CLASS_NAME_POSprotected static java.lang.StringNUMBER_MARKprotected static java.lang.StringNUMBER_VALUE_DELIMprotected static intNUMBER_VALUE_POSprotected static java.lang.StringPK_MARKprotected SearchServicesearchService-
Fields inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
modelService, typeService
-
-
Constructor Summary
Constructors Constructor Description SavedQueryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddSpecialParameters(CockpitSavedQuery cockpitSavedQuery, Query query)Deprecated.since 6.3, useaddSpecialParameters(CockpitSavedQueryModel, Query)insteadprotected voidaddSpecialParameters(CockpitSavedQueryModel cockpitSavedQueryModel, Query query)Override this to add special parameters from context to search queryCockpitSavedQueryModelcreateSavedQuery(java.lang.String label, Query query, UserModel user)Creates the saved query.protected java.lang.Stringdecode(java.lang.String value)voiddeleteQuery(CockpitSavedQueryModel query)Delete query.protected java.util.List<java.lang.String>getDecodedValues(java.lang.Object paramValue)protected java.lang.StringgetPKsString(java.util.Collection<? extends ItemModel> items)QuerygetQuery(CockpitSavedQueryModel savedQuery)Gets the query.java.util.Collection<CockpitSavedQueryModel>getSavedQueries(SearchProvider provider, UserModel user)Gets the saved queries for given parameters.protected SavedQueryDaogetSavedQueryDao()voidpublishSavedQuery(CockpitSavedQueryModel query)Publish saved query.voidrenameQuery(CockpitSavedQueryModel query, java.lang.String label)Rename query.voidsetEnumerationService(EnumerationService enumerationService)voidsetSavedQueryDao(SavedQueryDao savedQueryDao)voidsetSearchService(SearchService searchService)voidstoreUpdates(CockpitSavedQueryModel query)Store updates.protected java.util.List<java.lang.Object>unwrapCollectionValues(java.lang.String value)protected FeatureValueunwrapFeatureValue(java.lang.String wrappedValue)protected java.lang.NumberunwrapNumber(java.lang.String wrappedValue)protected java.lang.ObjectunwrapSingleValue(java.lang.String value)protected ConditionValuewrap(java.lang.String valStr, Operator operator)protected java.lang.StringwrapCollectionValues(java.util.List<java.lang.String> values)protected java.lang.StringwrapFeatureValue(FeatureValue featureValue)protected java.lang.StringwrapNumber(java.lang.Number value)protected java.lang.StringwrapSingleValue(java.lang.Object value)-
Methods inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
getEnum, getEnums, getLocalizedLabel, getLocalizedLabel, getModelService, getTypeService, setCockpitTypeService, setLabelResolver, setModelService
-
-
-
-
Field Detail
-
PK_MARK
protected static final java.lang.String PK_MARK
- See Also:
- Constant Field Values
-
DATE_MARK
protected static final java.lang.String DATE_MARK
- See Also:
- Constant Field Values
-
ENUM_MARK
protected static final java.lang.String ENUM_MARK
- See Also:
- Constant Field Values
-
NUMBER_MARK
protected static final java.lang.String NUMBER_MARK
- See Also:
- Constant Field Values
-
FEATURE_VALUE_MARK
protected static final java.lang.String FEATURE_VALUE_MARK
- See Also:
- Constant Field Values
-
ENUM_DELIM
protected static final java.lang.String ENUM_DELIM
- See Also:
- Constant Field Values
-
COLLECTION_DELIM
protected static final java.lang.String COLLECTION_DELIM
- See Also:
- Constant Field Values
-
FEATURE_VALUE_DELIM
protected static final java.lang.String FEATURE_VALUE_DELIM
- See Also:
- Constant Field Values
-
NUMBER_VALUE_DELIM
protected static final java.lang.String NUMBER_VALUE_DELIM
- See Also:
- Constant Field Values
-
NUMBER_CLASS_NAME_POS
protected static final int NUMBER_CLASS_NAME_POS
- See Also:
- Constant Field Values
-
NUMBER_VALUE_POS
protected static final int NUMBER_VALUE_POS
- See Also:
- Constant Field Values
-
FEATURE_VALUE_STRING_VALUE_POS
protected static final int FEATURE_VALUE_STRING_VALUE_POS
- See Also:
- Constant Field Values
-
FEATURE_VALUE_UNIT_POS
protected static final int FEATURE_VALUE_UNIT_POS
- See Also:
- Constant Field Values
-
searchService
protected SearchService searchService
-
-
Method Detail
-
getPKsString
protected java.lang.String getPKsString(java.util.Collection<? extends ItemModel> items)
-
addSpecialParameters
@Deprecated protected void addSpecialParameters(CockpitSavedQuery cockpitSavedQuery, Query query)
Deprecated.since 6.3, useaddSpecialParameters(CockpitSavedQueryModel, Query)insteadOverride this to add special parameters from context to search query
-
addSpecialParameters
protected void addSpecialParameters(CockpitSavedQueryModel cockpitSavedQueryModel, Query query)
Override this to add special parameters from context to search query
-
createSavedQuery
public CockpitSavedQueryModel createSavedQuery(java.lang.String label, Query query, UserModel user)
Description copied from interface:SavedQueryServiceCreates the saved query.- Specified by:
createSavedQueryin interfaceSavedQueryService- Parameters:
label- the labelquery- the queryuser- the user- Returns:
- the cockpit saved query model
-
getDecodedValues
protected java.util.List<java.lang.String> getDecodedValues(java.lang.Object paramValue)
-
getSavedQueries
public java.util.Collection<CockpitSavedQueryModel> getSavedQueries(SearchProvider provider, UserModel user)
Description copied from interface:SavedQueryServiceGets the saved queries for given parameters.- Specified by:
getSavedQueriesin interfaceSavedQueryService- Parameters:
provider- the provideruser- the user- Returns:
- the saved queries
-
storeUpdates
public void storeUpdates(CockpitSavedQueryModel query)
Description copied from interface:SavedQueryServiceStore updates.- Specified by:
storeUpdatesin interfaceSavedQueryService- Parameters:
query- the query
-
getQuery
public Query getQuery(CockpitSavedQueryModel savedQuery)
Description copied from interface:SavedQueryServiceGets the query.- Specified by:
getQueryin interfaceSavedQueryService- Parameters:
savedQuery- the saved query- Returns:
- the query
-
deleteQuery
public void deleteQuery(CockpitSavedQueryModel query)
Description copied from interface:SavedQueryServiceDelete query.- Specified by:
deleteQueryin interfaceSavedQueryService- Parameters:
query- the query
-
publishSavedQuery
public void publishSavedQuery(CockpitSavedQueryModel query)
Description copied from interface:SavedQueryServicePublish saved query.- Specified by:
publishSavedQueryin interfaceSavedQueryService- Parameters:
query- the query
-
renameQuery
public void renameQuery(CockpitSavedQueryModel query, java.lang.String label)
Description copied from interface:SavedQueryServiceRename query.- Specified by:
renameQueryin interfaceSavedQueryService- Parameters:
query- the querylabel- the label
-
setSearchService
public void setSearchService(SearchService searchService)
-
setEnumerationService
public void setEnumerationService(EnumerationService enumerationService)
-
unwrapSingleValue
protected java.lang.Object unwrapSingleValue(java.lang.String value)
-
wrapSingleValue
protected java.lang.String wrapSingleValue(java.lang.Object value)
-
wrapCollectionValues
protected java.lang.String wrapCollectionValues(java.util.List<java.lang.String> values)
-
wrapFeatureValue
protected java.lang.String wrapFeatureValue(FeatureValue featureValue)
-
unwrapFeatureValue
protected FeatureValue unwrapFeatureValue(java.lang.String wrappedValue)
-
wrapNumber
protected java.lang.String wrapNumber(java.lang.Number value)
-
unwrapNumber
protected java.lang.Number unwrapNumber(java.lang.String wrappedValue)
-
decode
protected java.lang.String decode(java.lang.String value)
-
unwrapCollectionValues
protected java.util.List<java.lang.Object> unwrapCollectionValues(java.lang.String value)
-
wrap
protected ConditionValue wrap(java.lang.String valStr, Operator operator)
-
getSavedQueryDao
protected SavedQueryDao getSavedQueryDao()
-
setSavedQueryDao
public void setSavedQueryDao(SavedQueryDao savedQueryDao)
-
-