Class ProductManager
- java.lang.Object
-
- de.hybris.platform.jalo.Manager
-
- de.hybris.platform.jalo.product.ProductManager
-
- All Implemented Interfaces:
ItemLifecycleListener,java.io.Serializable
@Deprecated public class ProductManager extends Manager
Deprecated.since ages - as of release 4.3, please useProductServiceThe ProductManager is used to create and find Products, Bundles, Variants and Units.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classProductManager.ProductManagerSerializableDTODeprecated.since ages - as of release 4.3, no replacement-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEDeprecated.since ages - as of release 4.3, please useProductServiceinstead
-
Constructor Summary
Constructors Constructor Description ProductManager()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item)Deprecated.since ages - as of release 4.3, no replacementProductcreateProduct(SessionContext ctx, PK pk, java.lang.String code)Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)ProductcreateProduct(SessionContext ctx, PK pkBase, java.lang.String code, ComposedType type)Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)ProductcreateProduct(SessionContext ctx, java.lang.String code)Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)ProductcreateProduct(SessionContext ctx, java.lang.String code, ComposedType type)Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)ProductcreateProduct(java.lang.String code)Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)UnitcreateUnit(PK pkBase, java.lang.String type, java.lang.String code)Deprecated.since ages - as of release 4.3, no replacement, please createUnitModelusingModelService.create(Class)UnitcreateUnit(java.lang.String type, java.lang.String code)Deprecated.since agesjava.util.Collection<Product>getAllProducts()Deprecated.since ages - as of release 4.3, please write your own flexible search queryjava.util.CollectiongetAllProductsChangedAfter(java.util.Date date)Deprecated.since ages - as of release 4.3, please write your own flexible search queryjava.util.CollectiongetAllUnits()Deprecated.since ages - as of release 4.3, please useUnitService.getAllUnits()java.util.CollectiongetAllUnitTypes()Deprecated.since ages - as of release 4.3, please useUnitService.getAllUnitTypes()static ProductManagergetInstance()Deprecated.since ages - as of release 4.3, please useProductServiceinsteadProductgetProductByPK(PK pk)Deprecated.since ages - as of release 4.3, please useModelService.get(PK)java.util.CollectiongetProductsByCode(java.lang.String filter)Deprecated.since ages - as of release 4.3, no replacement, instead please useProductService.getProduct(String)orProductService.getProduct(de.hybris.platform.catalog.model.CatalogVersionModel, String)protected java.lang.StringgetProductTypeCode()Deprecated.since ages - as of release 4.3, please useProductModel._TYPECODEintgetQuantityOfProducts()Deprecated.since ages - as of release 4.3, no replacement because products are catalog aware, please write your own flexible search query.UnitgetUnit(PK pk)Deprecated.since ages - as of release 4.3, please useModelService.get(PK)) insteadUnitgetUnit(java.lang.String code)Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)UnitgetUnit(java.lang.String type, java.lang.String code)Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique, type is not usefuljava.util.Collection<Unit>getUnitsByCode(java.lang.String code)Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique it returns single valuejava.util.Collection<Unit>getUnitsByTypeAndCode(java.lang.String type, java.lang.String code)Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique, type is not usefuljava.util.Collection<Unit>getUnitsByUnitType(java.lang.String type)Deprecated.since ages - as of release 4.3, please useUnitService.getUnitsForUnitType(String)protected java.lang.StringgetUnitTypeCode()Deprecated.since ages - as of release 4.3, please useUnitModel._TYPECODEprotected voidnotifyItemRemoval(SessionContext ctx, Item item)Deprecated.since ages - as of release 4.3, no replacementjava.util.CollectionsearchUnits(java.lang.String code, java.lang.String type)Deprecated.as of release 4.3, since code is unique it's uselessjava.lang.ObjectwriteReplace()Deprecated.since ages - as of release 4.3, no replacement-
Methods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrap
-
-
-
-
Field Detail
-
BEAN_NAME
@Deprecated public static final java.lang.String BEAN_NAME
Deprecated.since ages - as of release 4.3, please useProductServiceinstead- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
@Deprecated public static ProductManager getInstance()
Deprecated.since ages - as of release 4.3, please useProductServiceinstead- Returns:
- instance of this manager
-
checkBeforeItemRemoval
@Deprecated protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
Deprecated.since ages - as of release 4.3, no replacementSuperclass method overridden to avoid call to EJB layer
Description copied from class:ManagerTODO improve API doc Override this method to implement pre-removal consistency checks. This method is called upon eachManagerand allows aborting removal by throwing aConsistencyCheckException. If no manager did so each one is notified by callingManager.notifyItemRemoval(SessionContext, Item).This method does nothing and may be overridden.
- Overrides:
checkBeforeItemRemovalin classManager- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors- Since:
- 2.10
-
notifyItemRemoval
@Deprecated protected void notifyItemRemoval(SessionContext ctx, Item item)
Deprecated.since ages - as of release 4.3, no replacementSuperclass method overridden to avoid call to EJB layer
Description copied from class:ManagerTODO improve API doc Is called just before a item is being removed. No exception should be thrown here. UseManager.checkBeforeItemRemoval(SessionContext, Item)instead.This method does nothing and may be overridden.
- Overrides:
notifyItemRemovalin classManager- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
getProductTypeCode
@Deprecated protected java.lang.String getProductTypeCode()
Deprecated.since ages - as of release 4.3, please useProductModel._TYPECODE
-
getUnitTypeCode
@Deprecated protected java.lang.String getUnitTypeCode()
Deprecated.since ages - as of release 4.3, please useUnitModel._TYPECODE
-
getProductByPK
@Deprecated public Product getProductByPK(PK pk) throws JaloItemNotFoundException
Deprecated.since ages - as of release 4.3, please useModelService.get(PK)convenience method for getting a product this method just calls
- Parameters:
pk- the PK of the product- Returns:
- the product
- Throws:
JaloItemNotFoundException- if item was not foundjava.lang.ClassCastException- if item was not product- See Also:
JaloSession.getItem(PK)
-
createProduct
@Deprecated public Product createProduct(SessionContext ctx, java.lang.String code)
Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)Creates a new
Product.- Parameters:
ctx- the session contextcode- the code of the new product (not unique)- Returns:
- the new
Product
-
createProduct
@Deprecated public Product createProduct(SessionContext ctx, PK pk, java.lang.String code)
Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)Creates a new
Product.- Parameters:
ctx- the session contextpk- the pk for the new item; it will be equipped with type code additionally (- ) code- the code of the new product (not unique)- Returns:
- the new
Product
-
createProduct
@Deprecated public Product createProduct(SessionContext ctx, java.lang.String code, ComposedType type)
Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)Creates a new
Productwith a specified type.Please note that this does not include setting any attribute declared by this type! use
ComposedType.newInstance(Map)instead.- Parameters:
ctx- theSessionContextcode- the code of the new producttype- the type of the new product- Returns:
- the new
Product
-
createProduct
@Deprecated public Product createProduct(SessionContext ctx, PK pkBase, java.lang.String code, ComposedType type)
Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)Creates a new
Productwith a specified type.- Parameters:
ctx- theSessionContextpkBase- the pk for the new item; it will be equipped with type code additionally (- ) code- the code of the new producttype- the type of the new product- Returns:
- the new
Product
-
getAllProducts
@Deprecated public java.util.Collection<Product> getAllProducts()
Deprecated.since ages - as of release 4.3, please write your own flexible search queryReturns a
Collectionof allProducts.- Returns:
- a
Collectioncontaining allProducts.
-
getProductsByCode
@Deprecated public java.util.Collection getProductsByCode(java.lang.String filter)
Deprecated.since ages - as of release 4.3, no replacement, instead please useProductService.getProduct(String)orProductService.getProduct(de.hybris.platform.catalog.model.CatalogVersionModel, String)Returns all products whose code match the given string. It will be performed a search with equal sign (WHERE code='filter') except you use the wildcard sign '%' or '_', then a like query will be used (WHERE code LIKE 'filter').
If you use wildcards be aware of a lower performance!- Parameters:
filter- the searched code. TheStringcan contain%characters as wildcard. Using%hybris%as the filter would return all Products whose code containshybris. Be aware of lower performance if using wildcards- Returns:
- a
Collectionof all Products whose code matches the given filter.
-
getQuantityOfProducts
@Deprecated public int getQuantityOfProducts()
Deprecated.since ages - as of release 4.3, no replacement because products are catalog aware, please write your own flexible search query.Returns the total number of products.
- Returns:
- the total number of products.
-
createProduct
@Deprecated public Product createProduct(java.lang.String code)
Deprecated.since ages - as of release 4.3, no replacement, please createProductModelusingModelService.create(Class)Creates a new
Product.- Parameters:
code- the code of the new product (not unique)- Returns:
- the new
Product
-
getUnit
@Deprecated public Unit getUnit(PK pk) throws JaloItemNotFoundException
Deprecated.since ages - as of release 4.3, please useModelService.get(PK)) instead- Parameters:
pk- thePKof the searchedUnit- Returns:
- the
Unitwith the specifiedPK - Throws:
JaloItemNotFoundException- if there is noUnitwith the specifiedPK
-
searchUnits
@Deprecated public java.util.Collection searchUnits(java.lang.String code, java.lang.String type)Deprecated.as of release 4.3, since code is unique it's uselessSearches units by code and type.
- Parameters:
code- the unit code (null ignores the field)type- the unit type (null ignores the field)- Returns:
- a
Collectionof all units matching the given code and type.
-
createUnit
@Deprecated public Unit createUnit(java.lang.String type, java.lang.String code)
Deprecated.since ages* @deprecated as of release 4.3, no replacement, please createUnitModelusingModelService.create(Class)Create a new
Unitwith the given type and code- Parameters:
type- the type of the newUnitcode- the code of the newUnit- Returns:
- the new
Unit
-
createUnit
@Deprecated public Unit createUnit(PK pkBase, java.lang.String type, java.lang.String code)
Deprecated.since ages - as of release 4.3, no replacement, please createUnitModelusingModelService.create(Class)Create a new
Unitwith the given type and code- Parameters:
pkBase- the pk for the new item; it will be equipped with type code additionally (- ) type- the type of the newUnitcode- the code of the newUnit- Returns:
- the new
Unit
-
getAllUnits
@Deprecated public java.util.Collection getAllUnits()
Deprecated.since ages - as of release 4.3, please useUnitService.getAllUnits()Returns all Units.
- Returns:
- a
Collectioncontaining all units.
-
getUnitsByUnitType
@Deprecated public java.util.Collection<Unit> getUnitsByUnitType(java.lang.String type)
Deprecated.since ages - as of release 4.3, please useUnitService.getUnitsForUnitType(String)Returns a
Collectionof all units of one type (e.g. 'weight' ).- Parameters:
type- the type of the searches units.- Returns:
- a
Collectionof all units of one type (e.g. 'weight' ).
-
getUnit
@Deprecated public Unit getUnit(java.lang.String code)
Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)Convernience method for fetching one unit provided that the given unit code is unique.
- Parameters:
code- the unit code- Returns:
- the unit or
nullif no such unit exists - Throws:
JaloInvalidParameterException- if the unit code is not unique
-
getUnitsByCode
@Deprecated public java.util.Collection<Unit> getUnitsByCode(java.lang.String code)
Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique it returns single value
-
getUnit
@Deprecated public Unit getUnit(java.lang.String type, java.lang.String code)
Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique, type is not usefulConvenience method for fetching one unit provided that the given unit code and type combination is unique.
- Parameters:
type- the unit typecode- the unit code- Returns:
- the unit or
nullif no such unit exists - Throws:
JaloInvalidParameterException- if the unit code and type combination is not unique
-
getUnitsByTypeAndCode
@Deprecated public java.util.Collection<Unit> getUnitsByTypeAndCode(java.lang.String type, java.lang.String code)
Deprecated.since ages - as of release 4.3, please useUnitService.getUnitForCode(String)as code is unique, type is not useful
-
getAllUnitTypes
@Deprecated public java.util.Collection getAllUnitTypes()
Deprecated.since ages - as of release 4.3, please useUnitService.getAllUnitTypes()Finds all unit types (e.g. 'weight', 'size' ).
- Returns:
- a collection of type strings
-
getAllProductsChangedAfter
@Deprecated public java.util.Collection getAllProductsChangedAfter(java.util.Date date)
Deprecated.since ages - as of release 4.3, please write your own flexible search queryGet all products that have been modified since the given time
- Parameters:
date- the date- Returns:
- a collection of
Products
-
writeReplace
@Deprecated public java.lang.Object writeReplace() throws java.io.ObjectStreamExceptionDeprecated.since ages - as of release 4.3, no replacement- Specified by:
writeReplacein classManager- Throws:
java.io.ObjectStreamException
-
-