org.broadleafcommerce.openadmin.server.service.persistence.module.provider
Class MapFieldPersistenceProvider
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.BasicFieldPersistenceProvider
org.broadleafcommerce.openadmin.server.service.persistence.module.provider.MapFieldPersistenceProvider
- All Implemented Interfaces:
- FieldPersistenceProvider, org.springframework.core.Ordered
@Component(value="blMapFieldPersistenceProvider")
@Scope(value="prototype")
public class MapFieldPersistenceProvider
- extends BasicFieldPersistenceProvider
- Author:
- Jeff Fischer
| 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 |
MapFieldPersistenceProvider
public MapFieldPersistenceProvider()
canHandlePersistence
protected boolean canHandlePersistence(PopulateValueRequest populateValueRequest,
Serializable instance)
- Overrides:
canHandlePersistence in class BasicFieldPersistenceProvider
canHandleExtraction
protected boolean canHandleExtraction(ExtractValueRequest extractValueRequest,
Property property)
- Overrides:
canHandleExtraction in class BasicFieldPersistenceProvider
populateValue
public FieldProviderResponse populateValue(PopulateValueRequest populateValueRequest,
Serializable instance)
- Description copied from interface:
FieldPersistenceProvider
- Set the property value on the target object. Implementations should translate the requestedValue
field from the request and set on the instance parameter. You are basically taking the string value
submitted by the admin application and converting it into the format required to set on the target
field of instance (which should be a JPA managed entity). Used during admin create and update events.
- Specified by:
populateValue in interface FieldPersistenceProvider- Overrides:
populateValue in class BasicFieldPersistenceProvider
- Parameters:
populateValueRequest - contains the requested value and support classes.instance - the persistence entity instance on which to set the value harvested from the request
- Returns:
- whether or not the implementation handled the persistence request
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 BasicFieldPersistenceProvider
- 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
addSearchMapping
public FieldProviderResponse addSearchMapping(AddSearchMappingRequest addSearchMappingRequest,
List<FilterMapping> filterMappings)
- Description copied from interface:
FieldPersistenceProvider
- Add
FilterMapping instances. The FilterMappings are used by the system to refine the fetch criteria
used to retrieve lists of records for the admin. The requestedCto contains filters requested from the admin
and is generally used to drive the added FilterMapping instances.
- Specified by:
addSearchMapping in interface FieldPersistenceProvider- Overrides:
addSearchMapping in class BasicFieldPersistenceProvider
- Parameters:
addSearchMappingRequest - contains the requested cto and support classes.filterMappings - filter criteria should be added here. It is used to generate the final search criteria.
- Returns:
- whether or not the implementation handled the persistence request
getOrder
public int getOrder()
- Specified by:
getOrder in interface org.springframework.core.Ordered- Overrides:
getOrder in class BasicFieldPersistenceProvider
Copyright © 2013. All Rights Reserved.