de.hybris.platform.product.ProductService
The ProductManager is used to create and find Products, Bundles, Variants and Units.@Deprecated public class ProductManager extends Manager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ProductManager.ProductManagerSerializableDTO
Deprecated.
as of release 4.3, no replacement
|
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.ProductService instead |
| Constructor and Description |
|---|
ProductManager()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkBeforeItemRemoval(SessionContext ctx,
Item item)
Deprecated.
as of release 4.3, no replacement
Superclass method overridden to avoid call to EJB layer
|
Product |
createProduct(SessionContext ctx,
PK pk,
String code)
Deprecated.
as of release 4.3, no replacement, please create
ProductModel using
ModelService.create(Class)
Creates a new Product. |
Product |
createProduct(SessionContext ctx,
PK pkBase,
String code,
ComposedType type)
Deprecated.
as of release 4.3, no replacement, please create
ProductModel using
ModelService.create(Class)
Creates a new Product with a specified type. |
Product |
createProduct(SessionContext ctx,
String code)
Deprecated.
as of release 4.3, no replacement, please create
ProductModel using
ModelService.create(Class)
Creates a new Product. |
Product |
createProduct(SessionContext ctx,
String code,
ComposedType type)
Deprecated.
as of release 4.3, no replacement, please create
ProductModel using
ModelService.create(Class)
Creates a new Product with a specified type.
Please note that this does not include setting any attribute declared by this type! use
|
Product |
createProduct(String code)
Deprecated.
as of release 4.3, no replacement, please create
ProductModel using
ModelService.create(Class)
Creates a new Product. |
Unit |
createUnit(PK pkBase,
String type,
String code)
Deprecated.
as of release 4.3, no replacement, please create
UnitModel using
ModelService.create(Class)
Create a new Unit with the given type and code |
Unit |
createUnit(String type,
String code)
Deprecated.
|
Collection<Product> |
getAllProducts()
Deprecated.
as of release 4.3, please write your own flexible search query
Returns a
Collection of all Products. |
Collection |
getAllProductsChangedAfter(Date date)
Deprecated.
as of release 4.3, please write your own flexible search query
Get all products that have been modified since the given time
|
Collection |
getAllUnits()
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getAllUnits()
Returns all Units. |
Collection |
getAllUnitTypes()
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getAllUnitTypes()
Finds all unit types (e.g. 'weight', 'size' ). |
static ProductManager |
getInstance()
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.ProductService instead |
Product |
getProductByPK(PK pk)
Deprecated.
as of release 4.3, please use
ModelService.get(PK)
convenience method for getting a product this method just calls |
Collection |
getProductsByCode(String filter)
Deprecated.
as of release 4.3, no replacement, instead please use
de.hybris.platform.product.ProductService#getProduct(String) or
de.hybris.platform.product.ProductService#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! |
protected String |
getProductTypeCode()
Deprecated.
as of release 4.3, please use
ProductModel._TYPECODE |
int |
getQuantityOfProducts()
Deprecated.
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.
|
Unit |
getUnit(PK pk)
Deprecated.
as of release 4.3, please use
ModelService.get(PK))
instead |
Unit |
getUnit(String code)
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getUnitForCode(String)
Convernience method for fetching one unit provided that the given unit code is unique. |
Unit |
getUnit(String type,
String code)
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique, type is not useful
Convenience method for fetching one unit provided that the given unit code and type combination is
unique. |
Collection<Unit> |
getUnitsByCode(String code)
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique it returns single value |
Collection<Unit> |
getUnitsByTypeAndCode(String type,
String code)
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique, type is not useful |
Collection<Unit> |
getUnitsByUnitType(String type)
Deprecated.
as of release 4.3, please use
de.hybris.platform.product.UnitService#getUnitsForUnitType(String)
Returns a Collection of all units of one type (e.g. 'weight' ). |
protected String |
getUnitTypeCode()
Deprecated.
as of release 4.3, please use
UnitModel._TYPECODE |
protected void |
notifyItemRemoval(SessionContext ctx,
Item item)
Deprecated.
as of release 4.3, no replacement
Superclass method overridden to avoid call to EJB layer
|
Collection |
searchUnits(String code,
String type)
Deprecated.
as of release 4.3, since code is unique it's useless
Searches units by code and type.
|
Object |
writeReplace()
Deprecated.
as of release 4.3, no replacement
|
afterItemCreation, beforeItemCreation, destroy, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemote, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, unwrap, unwrap, wrap@Deprecated public static final String BEAN_NAME
de.hybris.platform.product.ProductService instead@Deprecated public static ProductManager getInstance()
de.hybris.platform.product.ProductService instead@Deprecated protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
ManagerManager and allows aborting removal by throwing a ConsistencyCheckException. If no manager
did so each one is notified by calling Manager.notifyItemRemoval(SessionContext, Item).
This method does nothing and may be overridden.
checkBeforeItemRemoval in class Managerctx - the current session contextitem - the item which should be removedConsistencyCheckException - thrown to abort removal due to consistency errors@Deprecated protected void notifyItemRemoval(SessionContext ctx, Item item)
ManagerManager.checkBeforeItemRemoval(SessionContext, Item) instead.
This method does nothing and may be overridden.
notifyItemRemoval in class Managerctx - the currency session contextitem - the item which is going to be removed@Deprecated protected String getProductTypeCode()
ProductModel._TYPECODE@Deprecated protected String getUnitTypeCode()
UnitModel._TYPECODE@Deprecated public Product getProductByPK(PK pk) throws JaloItemNotFoundException
ModelService.get(PK)
convenience method for getting a product this method just callspk - the PK of the productJaloItemNotFoundException - if item was not foundClassCastException - if item was not productJaloSession.getItem(PK)@Deprecated public Product createProduct(SessionContext ctx, String code)
ProductModel using
ModelService.create(Class)
Creates a new Product.ctx - the session contextcode - the code of the new product (not unique)Product@Deprecated public Product createProduct(SessionContext ctx, PK pk, String code)
ProductModel using
ModelService.create(Class)
Creates a new Product.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)Product@Deprecated public Product createProduct(SessionContext ctx, String code, ComposedType type)
ProductModel using
ModelService.create(Class)
Creates a new Product with a specified type.
Please note that this does not include setting any attribute declared by this type! use
ComposedType.newInstance(Map) instead.
ctx - the SessionContextcode - the code of the new producttype - the type of the new productProduct@Deprecated public Product createProduct(SessionContext ctx, PK pkBase, String code, ComposedType type)
ProductModel using
ModelService.create(Class)
Creates a new Product with a specified type.ctx - the SessionContextpkBase - 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 productProduct@Deprecated public Collection<Product> getAllProducts()
Collection of all Products.Collection containing all Products.@Deprecated public Collection getProductsByCode(String filter)
de.hybris.platform.product.ProductService#getProduct(String) or
de.hybris.platform.product.ProductService#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').filter - the searched code. The String can contain % characters as wildcard. Using
%hybris% as the filter would return all Products whose code contains hybris.
Be aware of lower performance if using wildcardsCollection of all Products whose code matches the given filter.@Deprecated public int getQuantityOfProducts()
@Deprecated public Product createProduct(String code)
ProductModel using
ModelService.create(Class)
Creates a new Product.code - the code of the new product (not unique)Product@Deprecated public Unit getUnit(PK pk) throws JaloItemNotFoundException
ModelService.get(PK))
insteadpk - the PK of the searched UnitUnit with the specified PKJaloItemNotFoundException - if there is no Unit with the specified PK@Deprecated public Collection searchUnits(String code, String type)
code - the unit code (null ignores the field)type - the unit type (null ignores the field)Collection of all units matching the given code and type.@Deprecated public Unit createUnit(String type, String code)
UnitModel using
ModelService.create(Class)
Create a new Unit with the given type and codetype - the type of the new Unitcode - the code of the new UnitUnit@Deprecated public Unit createUnit(PK pkBase, String type, String code)
UnitModel using
ModelService.create(Class)
Create a new Unit with the given type and codepkBase - the pk for the new item; it will be equipped with type code additionally (type - the type of the new Unitcode - the code of the new UnitUnit@Deprecated public Collection getAllUnits()
de.hybris.platform.product.UnitService#getAllUnits()
Returns all Units.Collection containing all units.@Deprecated public Collection<Unit> getUnitsByUnitType(String type)
de.hybris.platform.product.UnitService#getUnitsForUnitType(String)
Returns a Collection of all units of one type (e.g. 'weight' ).type - the type of the searches units.Collection of all units of one type (e.g. 'weight' ).@Deprecated public Unit getUnit(String code)
de.hybris.platform.product.UnitService#getUnitForCode(String)
Convernience method for fetching one unit provided that the given unit code is unique.code - the unit codenull if no such unit existsJaloInvalidParameterException - if the unit code is not unique@Deprecated public Collection<Unit> getUnitsByCode(String code)
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique it returns single value@Deprecated public Unit getUnit(String type, String code)
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique, type is not useful
Convenience method for fetching one unit provided that the given unit code and type combination is
unique.type - the unit typecode - the unit codenull if no such unit existsJaloInvalidParameterException - if the unit code and type combination is not unique@Deprecated public Collection<Unit> getUnitsByTypeAndCode(String type, String code)
de.hybris.platform.product.UnitService#getUnitForCode(String) as
code is unique, type is not useful@Deprecated public Collection getAllUnitTypes()
de.hybris.platform.product.UnitService#getAllUnitTypes()
Finds all unit types (e.g. 'weight', 'size' ).@Deprecated public Collection getAllProductsChangedAfter(Date date)
date - the dateProducts@Deprecated public Object writeReplace() throws ObjectStreamException
writeReplace in class ManagerObjectStreamExceptionCopyright © 2017 SAP SE. All Rights Reserved.