Class Europe1PriceFactory
- All Implemented Interfaces:
ItemLifecycleListener,PriceFactory,Serializable
- Direct Known Subclasses:
CatalogAwareEurope1PriceFactory
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected classUsed for ordering discount rows in discount priority order.protected classUsed for ordering price rows in best match order.protected classUsed for ordering price rows in best match order.protected classUsed for ordering discount rows in discount priority order.Nested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProviderNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longstatic final StringEnables/disabled fast query mode for getting product price, tax and discount rows.Fields inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
DEFAULT_INITIAL_ATTRIBUTES, PRODUCT2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER, PRODUCT2OWNEUROPE1PRICESOWNEUROPE1PRICESHANDLER, PRODUCT2OWNEUROPE1TAXESOWNEUROPE1TAXESHANDLER, USER2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DateadjustDate(Date date) Cut (set to zero) specific parts of a Date field to allow caching of time based pricing.protected voidappendProductConditions(StringBuilder query, String alias, Product product, EnumerationValue productGroup, Map values, String pgConstant) protected voidappendUserConditions(StringBuilder query, String alias, User user, EnumerationValue userGroup, Map values, String ugConst) voidbeforeItemCreation(SessionContext ctx, ComposedType type, Item.ItemAttributeMap attributes) This method will be called before an item is created BUT AFTER the default values of this type are assignedvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesvoidDeprecated.since agesprotected voidcheckBeforeItemRemoval(SessionContext ctx, Item item) Superclass method overridden to avoid call to EJB layercreateDiscountRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) Creates a new DiscountRow.createDiscountRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) Same as createDiscountRow(Product,String,User,String,Currency,boolean,double,DateRange,Discount)} but for a specific SessionContext.voidcreateEssentialData(Map params, JspContext jspc) createGlobalDiscountRow(SessionContext ctx, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) Same as createGlobalDiscountRow(User,String,Currency,boolean,double,DateRange,Discount)} but for a specific SessionContext.createGlobalDiscountRow(User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) Creates a new global DiscountRow.createPriceRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price) Creates a new PriceRow.createPriceRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price, EnumerationValue channel) Overloaded method to support Channel dimension to PriceRow.createPriceRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price) Same ascreatePriceRow(Product, EnumerationValue, User, EnumerationValue, long, Currency, Unit, int, boolean, DateRange, double)but with specific SessionContext.createPriceRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price, EnumerationValue channel) Same ascreatePriceRow(Product, EnumerationValue, User, EnumerationValue, long, Currency, Unit, int, boolean, DateRange, double, EnumerationValue)but with specific SessionContext.createProductTaxGroup(String code) voidcreateProjectData(Map params, JspContext jspc) createTaxRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax) Deprecated.since ages - please usecreateTaxRow(Product, EnumerationValue, User, EnumerationValue, Tax, DateRange, Double)to specify all values ( here DateRange and Value are set tonull)createTaxRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax, DateRange dateRange, Double value) Creates a new TaxRow.createTaxRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax, DateRange dateRange, Double value) Same as createTaxRow(Product,String,User,String,Tax,boolean)} but for a specific SessionContext.createUserPriceGroup(String code) createUserTaxGroup(String code) protected StringextractProductId(Product product) protected StringextractProductId(SessionContext ctx, Product product) protected voidFills private cache with catalog version aware tax entriesprotected List<? extends AbstractDiscountRow>filterDiscountRows4Price(Collection<? extends AbstractDiscountRow> rows, Date date) Filters discount rows which do not match the given parameters.filterPriceRows(List<PriceRow> priceRows) Removes price rows from set of matching rows if they will never be applicable.filterPriceRows4Info(Collection<PriceRow> rows, Currency curr, Date date, PriceRowChannel channel) Filters price rows which do not match the given parameters.filterPriceRows4Price(Collection<PriceRow> rows, long _quantity, Unit unit, Currency curr, Date date, boolean giveAwayMode, PriceRowChannel channel) Filters price rows which do not match the given parameters.filterTaxRows4Price(Collection<TaxRow> rows, Date date) Filters tax rows which do not match the given parameters.getAllPriceInformations(SessionContext ctx, Product product, Date date, boolean net) Calculates a product price quote containing all applicable prices, discounts and taxes for the given product and net/gross state.getBasePrice(AbstractOrderEntry entry) override to define the base price of an order entryprotected Collection<Europe1PriceFactory.CachedTaxValue>getCachedTaxes(Product product, EnumerationValue productTaxGroup, User user, EnumerationValue userTaxGroup, Date date) Reads the private cache of catalog version aware tax entries.protected DiscountRowgetCounterpartItem(SessionContext ctx, DiscountRow discountrow, CatalogVersion targetVersion) protected PriceRowgetCounterpartItem(SessionContext ctx, PriceRow pricerow, CatalogVersion targetVersion) protected TaxRowgetCounterpartItem(SessionContext ctx, TaxRow taxrow, CatalogVersion targetVersion) protected ListgetDiscountInformations(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, Date date) getDiscountValues(AbstractOrder order) override to define (global) discounts for an order.override to define discount values for an order entry.protected EnumerationValuegetEnumFromContextOrItem(SessionContext ctx, ExtensibleItem item, String qualifier) Helper method to fetch a (price)group enumeration value from context and as fallback from the provided item.protected EnumerationValuegetEnumFromGroups(User user, String attribute) getEurope1Discounts(Product item) getEurope1Discounts(SessionContext ctx, Product product) Attribute getter for Product.europe1discounts.getEurope1Discounts(SessionContext ctx, User user) Attribute getter for User.europe1discounts.getEurope1Discounts(User user) getEurope1Prices(Product item) getEurope1Prices(SessionContext ctx, Product product) Attribute getter for Product.europe1prices.getEurope1Taxes(Product item) getEurope1Taxes(SessionContext ctx, Product product) Attribute getter for Product.europe1taxes.static Europe1PriceFactoryprotected EnumerationValuegetPDG(SessionContext ctx, AbstractOrderEntry entry) getPDG(SessionContext ctx, Product product) protected PDTRowsQueryBuilderCreates query builder for given PDT row typeprotected EnumerationValuegetPPG(SessionContext ctx, AbstractOrderEntry entry) getPPG(SessionContext ctx, Product product) protected ListgetPriceInformations(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, boolean net, Date date, Collection taxValues) getProductDiscountInformations(SessionContext ctx, Product product, Date date, boolean net) override this to show all discounts which may apply to the given productgetProductDiscountRows(Product product, EnumerationValue productGroup) getProductDiscountRows(SessionContext ctx, Product product, EnumerationValue productGroup) getProductDiscountRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) getProductPriceInformations(SessionContext ctx, Product product, Date date, boolean net) Override this to show all prices available for the given productgetProductPriceRows(Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.getProductPriceRows(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.getProductPriceRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.getProductTaxGroup(String code) getProductTaxInformations(SessionContext ctx, Product product, Date date) override this to show all taxes which apply to the given productgetProductTaxRows(Product product, EnumerationValue productGroup) getProductTaxRows(SessionContext ctx, Product product, EnumerationValue productGroup) getProductTaxRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) protected EnumerationValuegetPTG(SessionContext ctx, AbstractOrderEntry entry) getPTG(SessionContext ctx, Product product) getRealPartOfPriceRows(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.protected Collection<Europe1PriceFactory.CachedTaxValue>getSuperCachedTaxes(Product product, EnumerationValue productTaxGroup, User user, EnumerationValue userTaxGroup, Date date) protected ListgetTaxInformations(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date) getTaxValues(AbstractOrderEntry entry) override to define tax values for an order entry.protected EnumerationValuegetUDG(SessionContext ctx, AbstractOrder order) protected EnumerationValuegetUDG(SessionContext ctx, AbstractOrderEntry entry) getUDG(SessionContext ctx, User user) protected EnumerationValuegetUPG(SessionContext ctx, AbstractOrder order) protected EnumerationValuegetUPG(SessionContext ctx, AbstractOrderEntry entry) getUPG(SessionContext ctx, User user) getUserGlobalDiscountRows(User user, EnumerationValue userGroup) getUserPriceGroup(String code) getUserTaxGroup(String code) protected EnumerationValuegetUTG(SessionContext ctx, AbstractOrder order) protected EnumerationValuegetUTG(SessionContext ctx, AbstractOrderEntry entry) getUTG(SessionContext ctx, User user) voidinit()called once for each tenant, so this method fits best to perform some initialization stuffprotected voidprotected booleanbooleanPart ofDataCreatorinterface.matchDiscountRows(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, Date date, int maxCount) matchPriceRowForPrice(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, long qtd, Unit unit, Currency currency, Date date, boolean net, boolean giveAwayMode) matches price rows by product or product group, user or user group, min quantity, currency and daterange.matchPriceRowsForInfo(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency currency, Date date, boolean net) matchTaxRows(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date, int maxCount) protected voidnotifyItemRemoval(SessionContext ctx, Item item) Avoids calls to ejb layer exceptprotected Collection<? extends AbstractDiscountRow>queryDiscounts4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) Runs database query for fetching discount rows for calculating entry and order discount values.protected Collection<PriceRow>queryPriceRows4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) protected Collection<PriceRow>queryPriceRows4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date, Currency currency, boolean giveAwayMode) Runs database query for fetching price rows for calculating base prices.protected Collection<TaxRow>queryTax4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) protected voidremoveRowsFor(SessionContext ctx, Currency currency) protected voidremoveRowsFor(SessionContext ctx, EnumerationValue enumerationValue) protected voidremoveRowsFor(SessionContext ctx, Discount discount) protected voidremoveRowsFor(SessionContext ctx, Tax tax) protected voidremoveRowsFor(SessionContext ctx, Product product) protected voidremoveRowsFor(SessionContext ctx, Unit unit) protected voidremoveRowsFor(SessionContext ctx, User user) voidsetEurope1Discounts(Product product, Collection discounts) voidsetEurope1Discounts(SessionContext ctx, Product item, Collection discounts) Attribute setter for Product.europe1discounts.voidsetEurope1Discounts(SessionContext ctx, User user, Collection discounts) Attribute setter for User.europe1discounts.voidsetEurope1Discounts(User user, Collection discounts) voidsetEurope1Prices(Product item, Collection<PriceRow> value) voidsetEurope1Prices(SessionContext ctx, Product item, Collection prices) Attribute setter for Product.europe1prices.voidsetEurope1Taxes(Product item, Collection<TaxRow> value) voidsetEurope1Taxes(SessionContext ctx, Product item, Collection taxes) Attribute setter for Product.europe1taxes.voidsetRetrieveChannelStrategy(RetrieveChannelStrategy retrieveChannelStrategy) protected Collection<TaxRow>superQueryTax4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) Runs database query for fetching tax rows for calculating entry and order discount values.Methods inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Prices, addToOwnEurope1Prices, addToOwnEurope1Taxes, addToOwnEurope1Taxes, createDiscountRow, createDiscountRow, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createTaxRow, createTaxRow, getDefaultAttributeModes, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getName, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Prices, getOwnEurope1Prices, getOwnEurope1Taxes, getOwnEurope1Taxes, getUserDiscountGroup, getUserDiscountGroup, getUserPriceGroup, getUserPriceGroup, getUserTaxGroup, getUserTaxGroup, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Prices, removeFromOwnEurope1Prices, removeFromOwnEurope1Taxes, removeFromOwnEurope1Taxes, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Prices, setOwnEurope1Prices, setOwnEurope1Taxes, setOwnEurope1Taxes, setUserDiscountGroup, setUserDiscountGroup, setUserPriceGroup, setUserPriceGroup, setUserTaxGroup, setUserTaxGroupMethods inherited from class de.hybris.platform.jalo.order.price.AbstractPriceFactory
getAllPriceInformations, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformations, isNetUserMethods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeInitialization, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, notifyInitializationEnd, notifyInitializationStart, onFirstSessionCreation, writeReplaceMethods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrap
-
Field Details
-
MATCH_ANY
public static final long MATCH_ANY -
MATCH_BY_PRODUCT_ID
public static final long MATCH_BY_PRODUCT_ID -
USE_FAST_ALGORITHMS
Enables/disabled fast query mode for getting product price, tax and discount rows. Use as session context parameter. Default istrue- See Also:
-
-
Constructor Details
-
Europe1PriceFactory
public Europe1PriceFactory()
-
-
Method Details
-
getInstance
-
init
public void init()Description copied from class:Managercalled once for each tenant, so this method fits best to perform some initialization stuff -
invalidateTaxCache
protected void invalidateTaxCache() -
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException Superclass method overridden to avoid call to EJB layer- Overrides:
checkBeforeItemRemovalin classExtension- 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
Avoids calls to ejb layer except- Overrides:
notifyItemRemovalin classExtension- Parameters:
ctx- the currency session contextitem- the item which is going to be removed- Since:
- 2.10
-
removeRowsFor
- Throws:
ConsistencyCheckException
-
removeRowsFor
- Throws:
ConsistencyCheckException
-
removeRowsFor
protected void removeRowsFor(SessionContext ctx, Currency currency) throws ConsistencyCheckException - Throws:
ConsistencyCheckException
-
removeRowsFor
- Throws:
ConsistencyCheckException
-
removeRowsFor
- Throws:
ConsistencyCheckException
-
removeRowsFor
protected void removeRowsFor(SessionContext ctx, Discount discount) throws ConsistencyCheckException - Throws:
ConsistencyCheckException
-
removeRowsFor
protected void removeRowsFor(SessionContext ctx, EnumerationValue enumerationValue) throws ConsistencyCheckException - Throws:
ConsistencyCheckException
-
createPriceRow
public PriceRow createPriceRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price) throws JaloPriceFactoryException Creates a new PriceRow. Allnullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group is the user is already present. Same thing with product and productPriceGroup.- Parameters:
product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)minQuantity- the minimum quantity for which this price is applicable ( > 0 )currency- the Currency for which this price is applicable (not null)unit- the Unit for which this price is applicable (not null)unitFactor- parameter to handle small prices:baseprice = price / unitFactornet- defines if this price should be seen as including or excluding taxesdateRange- the DateRange when this price is applicable (may be null)price- the price (may contain more digits than actually possible with this currency)- Returns:
- the new
PriceRow - Throws:
JaloPriceFactoryException
-
createPriceRow
public PriceRow createPriceRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price, EnumerationValue channel) throws JaloPriceFactoryException Overloaded method to support Channel dimension to PriceRow.Creates a new PriceRow. All
nullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group is the user is already present. Same thing with product and productPriceGroup.- Parameters:
product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)minQuantity- the minimum quantity for which this price is applicable ( > 0 )currency- the Currency for which this price is applicable (not null)unit- the Unit for which this price is applicable (not null)unitFactor- parameter to handle small prices:baseprice = price / unitFactornet- defines if this price should be seen as including or excluding taxesdateRange- the DateRange when this price is applicable (may be null)price- the price (may contain more digits than actually possible with this currency)channel- the channel which special price is represented by this row (may be null)- Returns:
- the new
PriceRow - Throws:
JaloPriceFactoryException
-
createPriceRow
public PriceRow createPriceRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price, EnumerationValue channel) throws JaloPriceFactoryException Same ascreatePriceRow(Product, EnumerationValue, User, EnumerationValue, long, Currency, Unit, int, boolean, DateRange, double, EnumerationValue)but with specific SessionContext.- Parameters:
ctx-product-productPriceGroup-user-userPriceGroup-minQuantity-currency-unit-unitFactor-net-dateRange-price-channel-- Returns:
- the new
PriceRow - Throws:
JaloPriceFactoryException
-
createPriceRow
public PriceRow createPriceRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, long minQuantity, Currency currency, Unit unit, int unitFactor, boolean net, DateRange dateRange, double price) throws JaloPriceFactoryException Same ascreatePriceRow(Product, EnumerationValue, User, EnumerationValue, long, Currency, Unit, int, boolean, DateRange, double)but with specific SessionContext.- Parameters:
ctx-product-productPriceGroup-user-userPriceGroup-minQuantity-currency-unit-unitFactor-net-dateRange-price-- Returns:
- the new
PriceRow - Throws:
JaloPriceFactoryException
-
createTaxRow
@Deprecated(since="ages", forRemoval=false) public TaxRow createTaxRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax) throws JaloPriceFactoryException Deprecated.since ages - please usecreateTaxRow(Product, EnumerationValue, User, EnumerationValue, Tax, DateRange, Double)to specify all values ( here DateRange and Value are set tonull)Creates a new TaxRow. Allnullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group if the user is already present. Same thing with product and productPriceGroup.- Parameters:
product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)tax- the Tax for this rule (not null>)- Returns:
- the new row
- Throws:
JaloPriceFactoryException
-
createTaxRow
public TaxRow createTaxRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax, DateRange dateRange, Double value) throws JaloPriceFactoryException Creates a new TaxRow. Allnullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group is the user is already present. Same thing with product and productPriceGroup.- Parameters:
product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)tax- the Tax for this rule (not null>)dateRange- (optional) the timeframe which the new row is valid withinvalue- (optional) overrides the value of the tax object- Returns:
- the new
TaxRow - Throws:
JaloPriceFactoryException
-
createTaxRow
public TaxRow createTaxRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Tax tax, DateRange dateRange, Double value) throws JaloPriceFactoryException Same as createTaxRow(Product,String,User,String,Tax,boolean)} but for a specific SessionContext.- Parameters:
ctx-product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)tax- the Tax for this rule (not null>)dateRange- the timeframe which the new row is valid within;nullmeans allwaysvalue- (optional) overrides the value of the tax object- Returns:
- the new
TaxRow - Throws:
JaloPriceFactoryException
-
createDiscountRow
public DiscountRow createDiscountRow(Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) throws JaloPriceFactoryException Creates a new DiscountRow. Allnullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group is the user is already present. Same thing with product and productPriceGroup.- Parameters:
product- the product which will be priced by this row (may be null)productPriceGroup- the product price group which will be priced by this row (may be null)user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)currency- the Currency for which this price is applicable (not null)value- a optional value which overrides the value provieded by discountdateRange- the DateRange when this price is applicable (may be null)discount- the Discount object which defines the value of this rule (not null)- Returns:
- the new
DiscountRow - Throws:
JaloPriceFactoryException
-
createDiscountRow
public DiscountRow createDiscountRow(SessionContext ctx, Product product, EnumerationValue productPriceGroup, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) throws JaloPriceFactoryException Same as createDiscountRow(Product,String,User,String,Currency,boolean,double,DateRange,Discount)} but for a specific SessionContext.- Parameters:
ctx-product-productPriceGroup-user-userPriceGroup-currency-value-dateRange-discount-- Returns:
- the new
DiscountRow - Throws:
JaloPriceFactoryException
-
createGlobalDiscountRow
public GlobalDiscountRow createGlobalDiscountRow(User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) throws JaloPriceFactoryException Creates a new global DiscountRow. Allnullvalues mean all resp. allways. Please note that either user or userPriceGroup will be applied but never both. So it makes no sense to specify a group is the user is already present. Same thing with product and productPriceGroup.- Parameters:
user- the user whose special price is represented by this row (may be null)userPriceGroup- the user price group which special price is represented by this row (may be null)currency- the Currency for which this price is applicable (not null)value- a optional value which overrides the value provieded by discountdateRange- the DateRange when this price is applicable (may be null)discount- the Discount object which defines the value of this rule (not null)- Returns:
- the new
DiscountRow - Throws:
JaloPriceFactoryException
-
createGlobalDiscountRow
public GlobalDiscountRow createGlobalDiscountRow(SessionContext ctx, User user, EnumerationValue userPriceGroup, Currency currency, Double value, DateRange dateRange, Discount discount) throws JaloPriceFactoryException Same as createGlobalDiscountRow(User,String,Currency,boolean,double,DateRange,Discount)} but for a specific SessionContext.- Parameters:
ctx-user-userPriceGroup-currency-value-dateRange-discount-- Returns:
- the new
DiscountRow - Throws:
JaloPriceFactoryException
-
checkAllPriceRows
@Deprecated(since="ages", forRemoval=false) public void checkAllPriceRows() throws JaloPriceFactoryExceptionDeprecated.since agesChecks allPriceRowsfor consistency errors.- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllPriceRows
@Deprecated(since="ages", forRemoval=false) public void checkAllPriceRows(SessionContext ctx) throws JaloPriceFactoryException Deprecated.since agesSame ascheckAllPriceRows()but for a specific SessionContext.- Parameters:
ctx-- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllTaxRows
@Deprecated(since="ages", forRemoval=false) public void checkAllTaxRows() throws JaloPriceFactoryExceptionDeprecated.since agesChecks allTaxRowsfor consistency errors.- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllTaxRows
@Deprecated(since="ages", forRemoval=false) public void checkAllTaxRows(SessionContext ctx) throws JaloPriceFactoryException Deprecated.since agesSame ascheckAllTaxRows()but for a specific SessionContext.- Parameters:
ctx-- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllDiscountRows
@Deprecated(since="ages", forRemoval=false) public void checkAllDiscountRows() throws JaloPriceFactoryExceptionDeprecated.since agesChecks allDiscountRowsfor consistency errors.- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllDiscountRows
@Deprecated(since="ages", forRemoval=false) public void checkAllDiscountRows(SessionContext ctx) throws JaloPriceFactoryException Deprecated.since agesSame ascheckAllDiscountRows()but for a specific SessionContext.- Parameters:
ctx-- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllGlobalDiscountRows
@Deprecated(since="ages", forRemoval=false) public void checkAllGlobalDiscountRows() throws JaloPriceFactoryExceptionDeprecated.since agesChecks all globalDiscountRowsfor consistency errors.- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
checkAllGlobalDiscountRows
@Deprecated(since="ages", forRemoval=false) public void checkAllGlobalDiscountRows(SessionContext ctx) throws JaloPriceFactoryException Deprecated.since agesSame ascheckAllGlobalDiscountRows()but for a specific SessionContext.- Parameters:
ctx-- Throws:
JaloRowConsistencyCheckException- if two or more rows clashJaloPriceFactoryException
-
getEurope1Prices
Attribute getter for Product.europe1prices.- Since:
- 3.0M2
-
getEurope1Prices
-
getRealPartOfPriceRows
public Collection<PriceRow> getRealPartOfPriceRows(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.- Parameters:
product- the productproductGroup- the price group- Returns:
- a collection of all price rows for the specified product and price group.
-
setEurope1Prices
Attribute setter for Product.europe1prices.- Since:
- 3.0M2
-
setEurope1Prices
-
getEurope1Taxes
Attribute getter for Product.europe1taxes.- Since:
- 3.0M2
-
getEurope1Taxes
-
setEurope1Taxes
Attribute setter for Product.europe1taxes.- Since:
- 3.0M2
-
setEurope1Taxes
-
getEurope1Discounts
Attribute getter for Product.europe1discounts.- Since:
- 3.0M2
-
getEurope1Discounts
-
setEurope1Discounts
Attribute setter for Product.europe1discounts.- Since:
- 3.0M2
-
getEurope1Discounts
-
setEurope1Discounts
-
getEurope1Discounts
Attribute getter for User.europe1discounts.- Since:
- 3.0M2
-
setEurope1Discounts
-
setEurope1Discounts
Attribute setter for User.europe1discounts.- Since:
- 3.0M2
-
getTaxValues
Description copied from class:AbstractPriceFactoryoverride to define tax values for an order entry.- Specified by:
getTaxValuesin interfacePriceFactory- Overrides:
getTaxValuesin classAbstractPriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
getBasePrice
Description copied from class:AbstractPriceFactoryoverride to define the base price of an order entry- Specified by:
getBasePricein interfacePriceFactory- Specified by:
getBasePricein classAbstractPriceFactory- Returns:
- a price with the order's currency iso code, 0.0 as value and the order's net status
- Throws:
JaloPriceFactoryException
-
getDiscountValues
Description copied from class:AbstractPriceFactoryoverride to define discount values for an order entry.- Specified by:
getDiscountValuesin interfacePriceFactory- Overrides:
getDiscountValuesin classAbstractPriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
getDiscountValues
Description copied from class:AbstractPriceFactoryoverride to define (global) discounts for an order. these discounts are applied to the whole order, not just to one entry likeAbstractPriceFactory.getDiscountValues(AbstractOrderEntry)- Specified by:
getDiscountValuesin interfacePriceFactory- Overrides:
getDiscountValuesin classAbstractPriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
getAllPriceInformations
public ProductPriceInformations getAllPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryCalculates a product price quote containing all applicable prices, discounts and taxes for the given product and net/gross state.This default implementation just calls
AbstractPriceFactory.getProductPriceInformations(Product, Date, boolean),AbstractPriceFactory.getProductTaxInformations(Product, Date)andAbstractPriceFactory.getProductDiscountInformations(Product, Date, boolean)and wraps the results inside aProductPriceInformationsobject.Override to define the prices, taxes and discounts for all occasions when no order or order entry is available, e.g. for product lists. Please take care also to override
AbstractPriceFactory.getProductPriceInformations(Product, Date, boolean),AbstractPriceFactory.getProductTaxInformations(Product, Date)andAbstractPriceFactory.getProductDiscountInformations(Product, Date, boolean)since these methods are called byProductdirectly.- Specified by:
getAllPriceInformationsin interfacePriceFactory- Overrides:
getAllPriceInformationsin classAbstractPriceFactory- Throws:
JaloPriceFactoryException- if a calculation error occured
-
getProductDiscountInformations
public List getProductDiscountInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryoverride this to show all discounts which may apply to the given product- Specified by:
getProductDiscountInformationsin interfacePriceFactory- Specified by:
getProductDiscountInformationsin classAbstractPriceFactoryproduct- the product- Returns:
- a list of
DiscountInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
getProductPriceInformations
public List getProductPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryOverride this to show all prices available for the given product- Specified by:
getProductPriceInformationsin interfacePriceFactory- Specified by:
getProductPriceInformationsin classAbstractPriceFactoryproduct- the productnet- the net/gross state of the requested prices- Returns:
- a list of
PriceInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
getProductTaxInformations
public List getProductTaxInformations(SessionContext ctx, Product product, Date date) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryoverride this to show all taxes which apply to the given product- Specified by:
getProductTaxInformationsin interfacePriceFactory- Specified by:
getProductTaxInformationsin classAbstractPriceFactoryproduct- the product- Returns:
- a list of
TaxInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
getDiscountInformations
protected List getDiscountInformations(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, Date date) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
getPriceInformations
protected List getPriceInformations(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, boolean net, Date date, Collection taxValues) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
getTaxInformations
protected List getTaxInformations(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
filterPriceRows
Removes price rows from set of matching rows if they will never be applicable. This may be the case if two rows have different match values (e.g. product only vs. user+product) but same unit and minimum quantity - only the better matching will ever apply so we omit the second one. We expect the price rows ordered as follows:- unit - order unimportant
- minimum quantity - ascending
- match value - greatest at top
- currency - requested currency on top ; only if requested currency is not base currency )
- net - requested net state is on top
- date range - non-null date ranges at top
-
matchDiscountRows
public List matchDiscountRows(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency curr, Date date, int maxCount) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
filterDiscountRows4Price
protected List<? extends AbstractDiscountRow> filterDiscountRows4Price(Collection<? extends AbstractDiscountRow> rows, Date date) Filters discount rows which do not match the given parameters.- Parameters:
rows- the query result rowsdate- the requested date
-
queryDiscounts4Price
protected Collection<? extends AbstractDiscountRow> queryDiscounts4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) Runs database query for fetching discount rows for calculating entry and order discount values. Please note that this method may return more rows than allowed so make sure they're filtered afterwards!- Parameters:
ctx-product- the product to get discounts forproductGroup- the product group to get discounts foruser- the user to get discounts foruserGroup- the user price group to get discounts for- Throws:
JaloPriceFactoryException
-
matchPriceRowForPrice
public PriceRow matchPriceRowForPrice(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, long qtd, Unit unit, Currency currency, Date date, boolean net, boolean giveAwayMode) throws JaloPriceFactoryException matches price rows by product or product group, user or user group, min quantity, currency and daterange. the result is ordered the following way:match value - greates at top ( currency - requested currency on top ; only if requested currency is not base currency ) net - requested net state is on top ( unit - requested unit at top ; only if convertible units exists for requested unit ) min quantity - greatest quantity at top daterange - non-null dateranges at top- Parameters:
product- the product which the rows have to match; rows without product and group match too !productGroup- the product group which the rows have to match; rows without product and group match too !user- the user which the rows have to match; rows without user and user match too !userGroup- the user group which the rows have to match; rows without user and user match too !qtd- the quantity which rows must not exceedunit- the unit which the rows have to match, its convertible units are included in the search toocurrency- the currency which the rows have to match, the base currency is included toodate- the date to match; rows without daterange always matchnet-- Returns:
- the price row
- Throws:
JaloPriceFactoryException- if any of the parameters isnull
-
filterPriceRows4Price
protected List<PriceRow> filterPriceRows4Price(Collection<PriceRow> rows, long _quantity, Unit unit, Currency curr, Date date, boolean giveAwayMode, PriceRowChannel channel) Filters price rows which do not match the given parameters.- Parameters:
rows- the query result rowsunit- the requested unitcurr- the requested currencydate- the requested dategiveAwayMode- the requested give-away modechannel- the requested channel
-
queryPriceRows4Price
@Deprecated(since="6.7", forRemoval=false) protected Collection<PriceRow> queryPriceRows4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) Deprecated.Runs database query for fetching price rows for calculating base prices. Please note that this method may return more rows than allowed so make sure they're filtered afterwards!- Parameters:
ctx-product- the product to get prices forproductGroup- the product group to get prices foruser- the user to get prices foruserGroup- the user price group to get prices for- Throws:
JaloPriceFactoryException
-
queryPriceRows4Price
protected Collection<PriceRow> queryPriceRows4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date, Currency currency, boolean giveAwayMode) Runs database query for fetching price rows for calculating base prices. The result is preliminary filtered by date, currency and giveAwayMode. Please note that this method may still return more rows than allowed so make sure they're filtered afterwards!- Parameters:
ctx-product-productGroup-user-userGroup-date-currency-giveAwayMode-- Returns:
-
getPDTRowsQueryBuilderFor
Creates query builder for given PDT row type- Parameters:
type- PDT row type
-
matchPriceRowsForInfo
public List<PriceRow> matchPriceRowsForInfo(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Currency currency, Date date, boolean net) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
filterPriceRows4Info
protected List<PriceRow> filterPriceRows4Info(Collection<PriceRow> rows, Currency curr, Date date, PriceRowChannel channel) Filters price rows which do not match the given parameters.- Parameters:
rows- the query result rowscurr- the requested currencydate- the requested datechannel- the requested channel
-
getProductPriceRows
Returns collection of all price rows for the specified product and price group.- Parameters:
product- the productproductGroup- the price group- Returns:
- a collection of all price rows for the specified product and price group.
-
getProductPriceRows
public Collection getProductPriceRows(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group.- Parameters:
product- the productproductGroup- the price group- Returns:
- a collection of all price rows for the specified product and price group.
-
getProductPriceRowsFast
public Collection getProductPriceRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) Returns collection of all price rows for the specified product and price group. This implementation should work faster since it does not order.- Parameters:
product- the productproductGroup- the price group- Returns:
- a collection of all price rows for the specified product and price group.
-
getProductTaxRows
-
getProductTaxRows
public Collection getProductTaxRows(SessionContext ctx, Product product, EnumerationValue productGroup) -
getProductTaxRowsFast
public Collection getProductTaxRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) -
getProductDiscountRows
-
getProductDiscountRows
public Collection getProductDiscountRows(SessionContext ctx, Product product, EnumerationValue productGroup) -
getProductDiscountRowsFast
public Collection getProductDiscountRowsFast(SessionContext ctx, Product product, EnumerationValue productGroup) -
extractProductId
-
extractProductId
-
getUserGlobalDiscountRows
public Collection getUserGlobalDiscountRows(User user, EnumerationValue userGroup) throws JaloInvalidParameterException - Throws:
JaloInvalidParameterException- Since:
- 2.10
-
matchTaxRows
public List matchTaxRows(Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup, Date date, int maxCount) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException
-
filterTaxRows4Price
Filters tax rows which do not match the given parameters.- Parameters:
rows- the query result rowsdate- the requested date
-
superQueryTax4Price
protected Collection<TaxRow> superQueryTax4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) Runs database query for fetching tax rows for calculating entry and order discount values. Please note that this method may return more rows than allowed so make sure they're filtered afterwards!- Parameters:
ctx-product- the product to get taxes forproductGroup- the product group to get taxes foruser- the user to get taxes foruserGroup- the user price group to get taxes for- Throws:
JaloPriceFactoryException
-
queryTax4Price
protected Collection<TaxRow> queryTax4Price(SessionContext ctx, Product product, EnumerationValue productGroup, User user, EnumerationValue userGroup) -
appendProductConditions
protected void appendProductConditions(StringBuilder query, String alias, Product product, EnumerationValue productGroup, Map values, String pgConstant) -
appendUserConditions
protected void appendUserConditions(StringBuilder query, String alias, User user, EnumerationValue userGroup, Map values, String ugConst) -
getEnumFromContextOrItem
protected EnumerationValue getEnumFromContextOrItem(SessionContext ctx, ExtensibleItem item, String qualifier) Helper method to fetch a (price)group enumeration value from context and as fallback from the provided item.- Since:
- 2.10
-
getPTG
- Since:
- 2.10
-
getPTG
- Since:
- 2.10
-
getPDG
- Since:
- 2.10
-
getPDG
- Since:
- 2.10
-
getPPG
- Since:
- 2.10
-
getPPG
- Since:
- 2.10
-
getUTG
protected EnumerationValue getUTG(SessionContext ctx, AbstractOrderEntry entry) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUTG
protected EnumerationValue getUTG(SessionContext ctx, AbstractOrder order) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUTG
- Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUDG
- Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUDG
protected EnumerationValue getUDG(SessionContext ctx, AbstractOrderEntry entry) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUDG
protected EnumerationValue getUDG(SessionContext ctx, AbstractOrder order) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUPG
- Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUPG
protected EnumerationValue getUPG(SessionContext ctx, AbstractOrderEntry entry) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUPG
protected EnumerationValue getUPG(SessionContext ctx, AbstractOrder order) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getEnumFromGroups
protected EnumerationValue getEnumFromGroups(User user, String attribute) throws JaloPriceFactoryException - Throws:
JaloPriceFactoryException- Since:
- 2.10
-
getUserPriceGroup
- Parameters:
code-- Returns:
- userpricegroup
-
createUserPriceGroup
- Parameters:
code- the code of the new user price group- Returns:
- the new UserPriceGroup
- Throws:
ConsistencyCheckException
-
getProductTaxGroup
-
createProductTaxGroup
- Throws:
ConsistencyCheckException
-
getUserTaxGroup
-
createUserTaxGroup
- Throws:
ConsistencyCheckException
-
isCreatorDisabled
public boolean isCreatorDisabled()Description copied from class:ExtensionPart ofDataCreatorinterface. This default implementation returnsfalse- Overrides:
isCreatorDisabledin classExtension- Returns:
false
-
createProjectData
- Overrides:
createProjectDatain classExtension
-
adjustDate
Cut (set to zero) specific parts of a Date field to allow caching of time based pricing. the europe1 Price factory is using this method whenever dealing with Date's. The value can be configured with the "europe1.price.accuracy" project.properties setting. allowed values are - "full" (DEFAULT in hybris 3.0 - "second" - "minute" - "hour" (DEFAULT starting with hybris 3.1) - "day" (DEFAULT starting with hybris 3.1-u4)- Parameters:
date- the input date- Returns:
- the adjusted date
-
getSuperCachedTaxes
protected Collection<Europe1PriceFactory.CachedTaxValue> getSuperCachedTaxes(Product product, EnumerationValue productTaxGroup, User user, EnumerationValue userTaxGroup, Date date) -
isCachingTaxes
protected boolean isCachingTaxes() -
fillTaxCache
protected void fillTaxCache()Fills private cache with catalog version aware tax entries -
getCachedTaxes
protected Collection<Europe1PriceFactory.CachedTaxValue> getCachedTaxes(Product product, EnumerationValue productTaxGroup, User user, EnumerationValue userTaxGroup, Date date) Reads the private cache of catalog version aware tax entries. -
createEssentialData
- Overrides:
createEssentialDatain classExtension- Throws:
Exception
-
getCounterpartItem
protected PriceRow getCounterpartItem(SessionContext ctx, PriceRow pricerow, CatalogVersion targetVersion) -
getCounterpartItem
protected TaxRow getCounterpartItem(SessionContext ctx, TaxRow taxrow, CatalogVersion targetVersion) -
getCounterpartItem
protected DiscountRow getCounterpartItem(SessionContext ctx, DiscountRow discountrow, CatalogVersion targetVersion) -
beforeItemCreation
public void beforeItemCreation(SessionContext ctx, ComposedType type, Item.ItemAttributeMap attributes) throws JaloBusinessException Description copied from class:ManagerThis method will be called before an item is created BUT AFTER the default values of this type are assigned- Overrides:
beforeItemCreationin classManager- Parameters:
ctx- the currency session contexttype- the type of the item which will be createdattributes- the attribute values to be used for creation- Throws:
JaloBusinessException- See Also:
-
setRetrieveChannelStrategy
-