Class DefaultPriceInfoService
- java.lang.Object
-
- com.broadleafcommerce.pricing.service.DefaultPriceInfoService
-
- All Implemented Interfaces:
PriceInfoService
public class DefaultPriceInfoService extends Object implements PriceInfoService
- Author:
- Chad Harchar (charchar), Nathan Moore (nathanmoore)
-
-
Field Summary
Fields Modifier and Type Field Description protected static List<String>
DEFAULT_PRICE_LIST_TYPES
-
Constructor Summary
Constructors Constructor Description DefaultPriceInfoService(PriceDataService<PriceData> priceDataService, com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService, PriceableFieldProperties priceableFields, PriceListService<PriceList> priceListService, com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator validator, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
addBaseCostPriceDetail(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.protected void
addBasePriceDetail(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.protected void
addPriceDetail(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo, PriceList priceList, javax.money.MonetaryAmount price, Map<String,List<PriceDataTier>> priceTiers)
protected void
addPriceInfoForTarget(List<com.broadleafcommerce.pricing.client.domain.PriceInfo> priceInfos, com.broadleafcommerce.pricing.client.domain.PriceableTarget priceableTarget, com.broadleafcommerce.pricing.client.domain.PriceDetail bestPriceDetail, PriceableTargetPriceState priceState, boolean skipDetails)
Uses the best price detail found for the target and creates aPriceInfo
for it.protected void
addPriceTypeDetail(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo, String type, com.broadleafcommerce.pricing.client.domain.PriceDetail detail)
protected List<String>
convertPriceListsToPriceListIds(Collection<PriceList> priceLists)
protected Optional<PriceDataTier>
determineMaxTier(com.broadleafcommerce.pricing.client.domain.PriceableTarget priceableTarget, List<PriceDataTier> priceDataTiers)
protected String
formatPrice(javax.money.MonetaryAmount price)
Helper method to format aMonetaryAmount
as a price stringprotected javax.money.MonetaryAmount
getBaseCost(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
By default, gets thePriceableFieldProperties.getBaseCost()
.protected javax.money.MonetaryAmount
getBasePrice(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
By default, gets thePriceableFieldProperties.getBasePrice()
.protected Optional<com.broadleafcommerce.pricing.client.domain.PriceDetail>
getBestPriceForType(Map<PriceList,javax.money.MonetaryAmount> pricesMap)
Picks the best (lowest) price for the price list type out of all the matches found.protected com.broadleafcommerce.pricing.client.domain.PriceDetail
getBestPriceOverall(Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail> prices)
Deprecated.in favor ofgetBestPriceOverall(Map, Currency)
protected com.broadleafcommerce.pricing.client.domain.PriceDetail
getBestPriceOverall(Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail> prices, Currency defaultCurrency)
Retrieves all of thePriceableFieldTypes
in ascending order byPriceableFieldType.order()
.protected org.springframework.validation.Errors
getErrors(com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
protected PriceableFieldProperties
getPriceableFields()
protected PriceDataService<PriceData>
getPriceDataService()
protected Optional<javax.money.MonetaryAmount>
getPriceFromElsewhere(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Extension point for getting price from somewhere other than a price data or modifier before defaulting to the base price on the target.protected Optional<javax.money.MonetaryAmount>
getPriceFromListForTarget(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Checks forPriceData
for thePriceableTarget
If none, checks forPriceModifier
s If none, works up thePriceList
hierarchy look for #1 or #2. If still none, checks for custom logic to get the price from somewhere else (getPriceFromElsewhere(PriceableTarget, PriceList , ContextInfo)
) If still none, returns thePriceableFieldProperties.getBasePrice()
(also seePriceableFieldType.BASE_PRICE
protected Optional<javax.money.MonetaryAmount>
getPriceFromModifier(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected Optional<javax.money.MonetaryAmount>
getPriceFromPriceData(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, String priceListId, PriceableTargetPriceState priceState)
protected String
getPriceKey(String type)
protected Map<org.apache.commons.lang3.tuple.Pair<String,com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>,PriceData>
getPriceListAndTargetPriceDataMap(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget> priceableTargets, List<PriceList> priceLists)
protected PriceListService<PriceList>
getPriceListService()
protected List<String>
getPriceListTypes()
protected Optional<PriceModifier>
getPriceModifierForTarget(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService
getRuleEvaluationService()
protected Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail>
getTargetsBaseDetails(@NonNull com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Builds a map ofPriceDetails
for each field ofPriceableTarget.getPriceableFields()
where the key is the type.protected com.broadleafcommerce.common.extension.TypeFactory
getTypeFactory()
protected com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
getValidator()
protected boolean
isEqualPrice(com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail1, com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail2)
Checks if the givenPriceDetails
have the same price.protected boolean
isSalePrice(com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail)
Checks if the givenPriceDetail
is of typePriceableFieldType.SALE_PRICE
.protected javax.money.MonetaryAmount
modifyPrice(javax.money.MonetaryAmount baseAmount, PriceModifier priceModifier)
Performs thePriceModifier.getModificationType()
on the base price.protected void
modifyPriceContext(com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext)
Extend this if you want to modify the provided price context, for example removing certain attributes for security reasons.boolean
noCurrency(AtomicReference<javax.money.MonetaryAmount> refAmount)
protected javax.money.MonetaryAmount
performOtherOperation(String modificationType, BigDecimal modificationAmount, javax.money.MonetaryAmount baseAmount)
Extension point for performing custom PriceModifier operationsprotected com.broadleafcommerce.pricing.client.domain.PriceDataTierRef
populatePriceDataTierRef(PriceDataTier priceDataTier)
protected List<PriceList>
prepareEligiblePriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Reads all priceLists that are in scope for the priceInfo request and splits them inprotected void
putBestPriceForType(String type, String priceKey, PriceableTargetPriceState priceState)
Records the highest-priority best (lowest) price for the price list type out of all the matches found.protected void
putPricesForType(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Map<String,List<PriceList>> listsByType, String type, PriceableTargetPriceState priceState)
org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo>
retrievePriceInfosByPriceContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
First retrieves thePriceListRefs
for thePriceContext
then retrieves thePriceInfo
associated thereto.org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo>
retrievePriceInfosByPriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
RetrievesPriceData
for the providedPriceInfoContext.getPriceLists()
andPriceInfoContext.getPriceableTargets()
, then translates them into a list ofPriceInfo
.protected org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo>
retrievePriceInfosByPriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, List<PriceList> priceLists)
protected Map<String,List<PriceList>>
splitPriceListsByType(List<PriceList> priceLists)
protected void
updateContextInfoCurrency(List<PriceList> priceLists, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
-
-
Constructor Detail
-
DefaultPriceInfoService
public DefaultPriceInfoService(PriceDataService<PriceData> priceDataService, com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService ruleEvaluationService, PriceableFieldProperties priceableFields, PriceListService<PriceList> priceListService, com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator validator, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Detail
-
retrievePriceInfosByPriceContext
@Transactional("pricingTransactionManager") public org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> retrievePriceInfosByPriceContext(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Description copied from interface:PriceInfoService
First retrieves the
PriceListRefs
for thePriceContext
then retrieves thePriceInfo
associated thereto.Calls
PriceInfoService.retrievePriceInfosByPriceLists(ContextInfo, PriceInfoContext)
- Specified by:
retrievePriceInfosByPriceContext
in interfacePriceInfoService
-
updateContextInfoCurrency
protected void updateContextInfoCurrency(List<PriceList> priceLists, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
retrievePriceInfosByPriceLists
public org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> retrievePriceInfosByPriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Description copied from interface:PriceInfoService
RetrievesPriceData
for the providedPriceInfoContext.getPriceLists()
andPriceInfoContext.getPriceableTargets()
, then translates them into a list ofPriceInfo
.- Specified by:
retrievePriceInfosByPriceLists
in interfacePriceInfoService
-
retrievePriceInfosByPriceLists
protected org.springframework.data.domain.Page<com.broadleafcommerce.pricing.client.domain.PriceInfo> retrievePriceInfosByPriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, List<PriceList> priceLists)
-
modifyPriceContext
protected void modifyPriceContext(com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext)
Extend this if you want to modify the provided price context, for example removing certain attributes for security reasons. Left blank by default.
-
prepareEligiblePriceLists
protected List<PriceList> prepareEligiblePriceLists(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
Reads all priceLists that are in scope for the priceInfo request and splits them in- Parameters:
contextInfo
-priceInfoContext
-- Returns:
-
splitPriceListsByType
protected Map<String,List<PriceList>> splitPriceListsByType(List<PriceList> priceLists)
-
getPriceListAndTargetPriceDataMap
protected Map<org.apache.commons.lang3.tuple.Pair<String,com.broadleafcommerce.pricing.client.domain.PriceableTargetRef>,PriceData> getPriceListAndTargetPriceDataMap(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Set<com.broadleafcommerce.pricing.client.domain.PriceableTarget> priceableTargets, List<PriceList> priceLists)
-
putPricesForType
protected void putPricesForType(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Map<String,List<PriceList>> listsByType, String type, PriceableTargetPriceState priceState)
-
getPriceFromListForTarget
@NonNull protected Optional<javax.money.MonetaryAmount> getPriceFromListForTarget(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
- Checks for
PriceData
for thePriceableTarget
- If none, checks for
PriceModifier
s - If none, works up the
PriceList
hierarchy look for #1 or #2. - If still none, checks for custom logic to get the price from somewhere else
(
getPriceFromElsewhere(PriceableTarget, PriceList , ContextInfo)
) - If still none, returns the
PriceableFieldProperties.getBasePrice()
(also seePriceableFieldType.BASE_PRICE
- Checks for
-
convertPriceListsToPriceListIds
protected List<String> convertPriceListsToPriceListIds(Collection<PriceList> priceLists)
-
getPriceFromPriceData
protected Optional<javax.money.MonetaryAmount> getPriceFromPriceData(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, String priceListId, PriceableTargetPriceState priceState)
-
determineMaxTier
protected Optional<PriceDataTier> determineMaxTier(com.broadleafcommerce.pricing.client.domain.PriceableTarget priceableTarget, List<PriceDataTier> priceDataTiers)
-
getPriceFromModifier
protected Optional<javax.money.MonetaryAmount> getPriceFromModifier(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
getPriceModifierForTarget
protected Optional<PriceModifier> getPriceModifierForTarget(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
-
modifyPrice
protected javax.money.MonetaryAmount modifyPrice(javax.money.MonetaryAmount baseAmount, PriceModifier priceModifier)
Performs thePriceModifier.getModificationType()
on the base price.
-
performOtherOperation
protected javax.money.MonetaryAmount performOtherOperation(String modificationType, BigDecimal modificationAmount, javax.money.MonetaryAmount baseAmount)
Extension point for performing custom PriceModifier operations
-
getPriceFromElsewhere
protected Optional<javax.money.MonetaryAmount> getPriceFromElsewhere(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceList priceList, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Extension point for getting price from somewhere other than a price data or modifier before defaulting to the base price on the target.
-
getTargetsBaseDetails
@NonNull protected Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail> getTargetsBaseDetails(@NonNull @NonNull @NonNull com.broadleafcommerce.pricing.client.domain.PriceableTarget target, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Builds a map ofPriceDetails
for each field ofPriceableTarget.getPriceableFields()
where the key is the type.- Parameters:
target
- ThePriceableTarget
contextInfo
- Additional tenant and sandbox info- Returns:
- A map of
PriceDetails
for each field oftarget#priceableFields
where the key is the type.
-
addBasePriceDetail
@Deprecated protected void addBasePriceDetail(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.
-
addBaseCostPriceDetail
@Deprecated protected void addBaseCostPriceDetail(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, PriceableTargetPriceState priceState, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.
-
getBasePrice
@Nullable protected javax.money.MonetaryAmount getBasePrice(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
By default, gets thePriceableFieldProperties.getBasePrice()
.
-
getBaseCost
@Nullable protected javax.money.MonetaryAmount getBaseCost(com.broadleafcommerce.pricing.client.domain.PriceableTarget target, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
By default, gets thePriceableFieldProperties.getBaseCost()
.
-
putBestPriceForType
protected void putBestPriceForType(String type, String priceKey, PriceableTargetPriceState priceState)
Records the highest-priority best (lowest) price for the price list type out of all the matches found.
-
formatPrice
protected String formatPrice(javax.money.MonetaryAmount price)
Helper method to format aMonetaryAmount
as a price string
-
getBestPriceForType
protected Optional<com.broadleafcommerce.pricing.client.domain.PriceDetail> getBestPriceForType(Map<PriceList,javax.money.MonetaryAmount> pricesMap)
Picks the best (lowest) price for the price list type out of all the matches found.
-
noCurrency
public boolean noCurrency(AtomicReference<javax.money.MonetaryAmount> refAmount)
-
getBestPriceOverall
protected com.broadleafcommerce.pricing.client.domain.PriceDetail getBestPriceOverall(@Nullable Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail> prices, @Nullable Currency defaultCurrency)
Retrieves all of thePriceableFieldTypes
in ascending order byPriceableFieldType.order()
. Then, returns aPriceDetail
for the best price found for the type.Out of the box, if a price with currency matching the default is found, we want to prioritize that. Otherwise, the lowest price is chosen.
If there are more than one price that are equal to the lowest price (i.e. standard and sale price are equally the lowest), then we want to prioritize whichever
PriceDetail
that is not a sale price.- Parameters:
prices
- map of price type (e.g., standardPrice, salePrice, contractPrice) to its correspondingPriceDetail
defaultCurrency
- default currency in the current context- Returns:
PriceDetail
for the best price found
-
isEqualPrice
protected boolean isEqualPrice(com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail1, com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail2)
Checks if the givenPriceDetails
have the same price.- Parameters:
priceDetail1
- the firstPriceDetail
to comparepriceDetail2
- the secondPriceDetail
to compare- Returns:
- true if both
PriceDetails
have the same price, otherwise false
-
isSalePrice
protected boolean isSalePrice(com.broadleafcommerce.pricing.client.domain.PriceDetail priceDetail)
Checks if the givenPriceDetail
is of typePriceableFieldType.SALE_PRICE
.- Parameters:
priceDetail
- thePriceDetail
to check against- Returns:
- true of the given
PriceDetail
is of typePriceableFieldType.SALE_PRICE
, otherwise false
-
getBestPriceOverall
@Deprecated protected com.broadleafcommerce.pricing.client.domain.PriceDetail getBestPriceOverall(Map<String,com.broadleafcommerce.pricing.client.domain.PriceDetail> prices)
Deprecated.in favor ofgetBestPriceOverall(Map, Currency)
Retrieves all of the
PriceableFieldTypes
in ascending order byPriceableFieldType.order()
. Then, returns aPriceDetail
for the best price found for the type.Out of the box, the lowest price is chosen.
-
addPriceInfoForTarget
protected void addPriceInfoForTarget(List<com.broadleafcommerce.pricing.client.domain.PriceInfo> priceInfos, com.broadleafcommerce.pricing.client.domain.PriceableTarget priceableTarget, com.broadleafcommerce.pricing.client.domain.PriceDetail bestPriceDetail, PriceableTargetPriceState priceState, boolean skipDetails)
Uses the best price detail found for the target and creates aPriceInfo
for it. Then, addsPriceTypeDetails
for each type of price found. Optionally, this also addsPriceDetails
for all candidate prices found besides the best one, ifskipDetails == false
.- Parameters:
priceInfos
- The current list ofPriceInfos
into which to add a newPriceInfo
.priceableTarget
- ThePriceableTarget
for which the newPriceInfo
corresponds.bestPriceDetail
- ThePriceDetail
of the best overall price from amongst all types of prices.priceState
- The currentPriceableTargetPriceState
with fall the important pricing info discovered for the targets.skipDetails
- Whether to not includePriceDetails
in thePriceInfo
-
addPriceTypeDetail
protected void addPriceTypeDetail(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo, String type, com.broadleafcommerce.pricing.client.domain.PriceDetail detail)
-
addPriceDetail
protected void addPriceDetail(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo, PriceList priceList, javax.money.MonetaryAmount price, Map<String,List<PriceDataTier>> priceTiers)
-
populatePriceDataTierRef
protected com.broadleafcommerce.pricing.client.domain.PriceDataTierRef populatePriceDataTierRef(PriceDataTier priceDataTier)
-
getErrors
protected org.springframework.validation.Errors getErrors(com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext)
- Parameters:
priceInfoContext
- The price info context to bind an errors object to.- Returns:
- An errors object bound to
priceInfoContext
-
getPriceDataService
protected PriceDataService<PriceData> getPriceDataService()
-
getRuleEvaluationService
protected com.broadleafcommerce.rulesengine.expression.service.RuleEvaluationService getRuleEvaluationService()
-
getPriceableFields
protected PriceableFieldProperties getPriceableFields()
-
getPriceListService
protected PriceListService<PriceList> getPriceListService()
-
getValidator
protected com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator getValidator()
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-
-