public interface FieldPersistenceProvider
extends org.springframework.core.Ordered
FieldPersistenceProvider instances are part of BasicPersistenceModule,
and therefore relate to variations on persistence of basic fields. Implementers should generally
extend FieldPersistenceProviderAdapter.PersistenceModule| Modifier and Type | Field and Description |
|---|---|
static int |
BASIC |
static int |
MAP_FIELD |
static int |
MEDIA
The
MediaFieldPersistenceProvider MUST come prior to the normal Map field provider since they can both
respond to the same type of map fields. |
static int |
MONEY |
static int |
RULE
The
RuleFieldPersistenceProvider MUST come prior to the normal map field provider. |
| Modifier and Type | Method and Description |
|---|---|
FieldProviderResponse |
addSearchMapping(AddSearchMappingRequest addSearchMappingRequest,
List<FilterMapping> filterMappings)
Add
FilterMapping instances. |
boolean |
alwaysRun()
If the provider should always run, regardless if a previous provider returned a response of HANDLED_BREAK
|
FieldProviderResponse |
extractValue(ExtractValueRequest extractValueRequest,
Property property)
Retrieve the property value from the requestedValue field from the request.
|
FieldProviderResponse |
filterProperties(AddFilterPropertiesRequest addFilterPropertiesRequest,
Map<String,FieldMetadata> properties)
Filter the list of properties posted by the admin during and add or update.
|
FieldProviderResponse |
populateValue(PopulateValueRequest populateValueRequest,
Serializable instance)
Set the property value on the target object.
|
static final int BASIC
static final int MEDIA
MediaFieldPersistenceProvider MUST come prior to the normal Map field provider since they can both
respond to the same type of map fields. However, the Media fields are a special case since it needs to parse out the
Media DTOstatic final int RULE
RuleFieldPersistenceProvider MUST come prior to the normal map field provider. They both deal with map
field types but rules are a special casestatic final int MAP_FIELD
static final int MONEY
FieldProviderResponse populateValue(PopulateValueRequest populateValueRequest, Serializable instance)
populateValueRequest - contains the requested value and support classes.instance - the persistence entity instance on which to set the value harvested from the requestFieldProviderResponse extractValue(ExtractValueRequest extractValueRequest, Property property)
extractValueRequest - contains the requested value and support classes.property - the property for the admin that will contain the information harvested from the persistence valueFieldProviderResponse addSearchMapping(AddSearchMappingRequest addSearchMappingRequest, List<FilterMapping> filterMappings)
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.addSearchMappingRequest - contains the requested cto and support classes.filterMappings - filter criteria should be added here. It is used to generate the final search criteria.FieldProviderResponse filterProperties(AddFilterPropertiesRequest addFilterPropertiesRequest, Map<String,FieldMetadata> properties)
addFilterPropertiesRequest - contains the Entity instance.properties - the collection of properties to filterboolean alwaysRun()
Copyright © 2015. All rights reserved.