org.broadleafcommerce.openadmin.server.service.persistence.module.provider
Class AbstractMoneyFieldPersistenceProvider
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractFieldPersistenceProvider
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.FieldPersistenceProviderAdapter
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.AbstractMoneyFieldPersistenceProvider
- All Implemented Interfaces:
- FieldPersistenceProvider, org.springframework.core.Ordered
- Direct Known Subclasses:
- MoneyFieldPersistenceProvider
public abstract class AbstractMoneyFieldPersistenceProvider
- extends FieldPersistenceProviderAdapter
Abstract persistence provider that provides a method to actually handle formatting moneys.
- Author:
- Andre Azzolini (apazzolini)
| Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMoneyFieldPersistenceProvider
public AbstractMoneyFieldPersistenceProvider()
extractValue
public FieldProviderResponse extractValue(ExtractValueRequest extractValueRequest,
Property property)
throws PersistenceException
- Description copied from interface:
FieldPersistenceProvider
- Retrieve the property value from the requestedValue field from the request. Implementations should translate the requestedValue
and set on the property parameter. The requestedValue is the field value taken from the JPA managed entity instance.
You are taking this field value and converting it into a string representation appropriate for the property
instance parameter. Used during admin fetch events.
- Specified by:
extractValue in interface FieldPersistenceProvider- Overrides:
extractValue in class FieldPersistenceProviderAdapter
- Parameters:
extractValueRequest - contains the requested value and support classes.property - the property for the admin that will contain the information harvested from the persistence value
- Returns:
- whether or not the implementation handled the persistence request
- Throws:
PersistenceException
canHandleExtraction
protected abstract boolean canHandleExtraction(ExtractValueRequest extractValueRequest,
Property property)
getLocale
protected abstract Locale getLocale(ExtractValueRequest extractValueRequest,
Property property)
getCurrency
protected abstract Currency getCurrency(ExtractValueRequest extractValueRequest,
Property property)
Copyright © 2013. All Rights Reserved.