|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RecordHelper
Helper interface for serializing/deserializing the generic Entity DTO to/from its actual domain object
representation.
BasicPersistenceModule},
MapStructurePersistenceModule},
AdornedTargetListPersistenceModule}| Method Summary | |
|---|---|
EntityResult |
add(PersistencePackage persistencePackage,
boolean includeRealEntityObject)
|
Serializable |
createPopulatedInstance(Serializable instance,
Entity entity,
Map<String,FieldMetadata> unfilteredProperties,
Boolean setId)
Delegates to the overloaded method with validateUnsubmittedProperties set to true. |
Serializable |
createPopulatedInstance(Serializable instance,
Entity entity,
Map<String,FieldMetadata> mergedProperties,
Boolean setId,
Boolean validateUnsubmittedProperties)
Populates a Hibernate entity instance based on the values from entity (the DTO representation of instance) and the metadata from mergedProperties. |
PersistenceModule |
getCompatibleModule(OperationType operationType)
|
FieldManager |
getFieldManager()
|
List<FilterMapping> |
getFilterMappings(PersistencePerspective persistencePerspective,
CriteriaTransferObject cto,
String ceilingEntityFullyQualifiedClassname,
Map<String,FieldMetadata> mergedProperties)
|
List<FilterMapping> |
getFilterMappings(PersistencePerspective persistencePerspective,
CriteriaTransferObject cto,
String ceilingEntityFullyQualifiedClassname,
Map<String,FieldMetadata> mergedUnfilteredProperties,
RestrictionFactory customRestrictionFactory)
|
Serializable |
getMaxValue(String ceilingEntity,
List<FilterMapping> filterMappings,
String maxField)
|
List<Serializable> |
getPersistentRecords(String ceilingEntity,
List<FilterMapping> filterMappings,
Integer firstResult,
Integer maxResults)
|
Object |
getPrimaryKey(Entity entity,
Map<String,FieldMetadata> mergedProperties)
|
Entity |
getRecord(Class<?> ceilingEntityClass,
PersistencePerspective persistencePerspective,
Serializable record)
|
Entity |
getRecord(Map<String,FieldMetadata> primaryMergedProperties,
Serializable record,
Map<String,FieldMetadata> alternateMergedProperties,
String pathToTargetObject)
|
Entity[] |
getRecords(Class<?> ceilingEntityClass,
PersistencePerspective persistencePerspective,
List<? extends Serializable> records)
|
Entity[] |
getRecords(Map<String,FieldMetadata> primaryMergedProperties,
List<? extends Serializable> records)
|
Entity[] |
getRecords(Map<String,FieldMetadata> primaryMergedProperties,
List<? extends Serializable> records,
Map<String,FieldMetadata> alternateMergedProperties,
String pathToTargetObject)
|
Map<String,FieldMetadata> |
getSimpleMergedProperties(String entityName,
PersistencePerspective persistencePerspective)
|
String |
getStringValueFromGetter(Serializable instance,
String propertyName)
Returns a string representation of the field on the given instance specified by the property name. |
Integer |
getTotalRecords(String ceilingEntity,
List<FilterMapping> filterMappings)
|
EntityResult |
update(PersistencePackage persistencePackage,
boolean includeRealEntityObject)
|
boolean |
validate(Entity entity,
Serializable populatedInstance,
Map<String,FieldMetadata> mergedProperties)
Delegates to the overloaded method with validateUnsubmittedProperties set to true. |
boolean |
validate(Entity entity,
Serializable populatedInstance,
Map<String,FieldMetadata> mergedProperties,
boolean validateUnsubmittedProperties)
Validates the Entity based on the validators associated with each property |
| Methods inherited from interface org.broadleafcommerce.openadmin.server.service.persistence.module.DataFormatProvider |
|---|
formatValue, getDecimalFormatter, getSimpleDateFormatter |
| Method Detail |
|---|
List<FilterMapping> getFilterMappings(PersistencePerspective persistencePerspective,
CriteriaTransferObject cto,
String ceilingEntityFullyQualifiedClassname,
Map<String,FieldMetadata> mergedProperties)
List<FilterMapping> getFilterMappings(PersistencePerspective persistencePerspective,
CriteriaTransferObject cto,
String ceilingEntityFullyQualifiedClassname,
Map<String,FieldMetadata> mergedUnfilteredProperties,
RestrictionFactory customRestrictionFactory)
Entity[] getRecords(Map<String,FieldMetadata> primaryMergedProperties,
List<? extends Serializable> records,
Map<String,FieldMetadata> alternateMergedProperties,
String pathToTargetObject)
Entity[] getRecords(Map<String,FieldMetadata> primaryMergedProperties,
List<? extends Serializable> records)
Entity[] getRecords(Class<?> ceilingEntityClass,
PersistencePerspective persistencePerspective,
List<? extends Serializable> records)
Entity getRecord(Map<String,FieldMetadata> primaryMergedProperties,
Serializable record,
Map<String,FieldMetadata> alternateMergedProperties,
String pathToTargetObject)
Entity getRecord(Class<?> ceilingEntityClass,
PersistencePerspective persistencePerspective,
Serializable record)
Serializable createPopulatedInstance(Serializable instance,
Entity entity,
Map<String,FieldMetadata> mergedProperties,
Boolean setId,
Boolean validateUnsubmittedProperties)
throws ValidationException
Populates a Hibernate entity instance based on the values from entity (the DTO representation of instance) and the metadata from mergedProperties.
While populating instance, validation is also performed using the EntityValidatorService. If this
validation fails, then the instance is left unchanged and a ValidationExcpetion is thrown. In the common
case, this exception bubbles up to the DynamicRemoteService which catches the exception and communicates
appropriately to the invoker
instance - entity - mergedProperties - setId - validateUnsubmittedProperties - if set to true, will ignore validation for properties that weren't submitted
along with the entity
ValidationException - if after populating instance via the values in entity then
EntityValidatorService#validate(Entity, Serializable, Map) returns falseEntityValidatorService}
Serializable createPopulatedInstance(Serializable instance,
Entity entity,
Map<String,FieldMetadata> unfilteredProperties,
Boolean setId)
throws ValidationException
ValidationExceptioncreatePopulatedInstance(Serializable, Entity, Map, Boolean, Boolean)
Object getPrimaryKey(Entity entity,
Map<String,FieldMetadata> mergedProperties)
Map<String,FieldMetadata> getSimpleMergedProperties(String entityName,
PersistencePerspective persistencePerspective)
FieldManager getFieldManager()
PersistenceModule getCompatibleModule(OperationType operationType)
boolean validate(Entity entity,
Serializable populatedInstance,
Map<String,FieldMetadata> mergedProperties,
boolean validateUnsubmittedProperties)
Entity based on the validators associated with each property
entity - the instance that is attempted to be saved from. Implementers should set Entity.isValidationFailure()
accordingly as a result of the validationpopulatedInstance - mergedProperties - TODOvalidateUnsubmittedProperties - if set to true, will ignore validation for properties that weren't submitted
along with the entity
Entity.isValidationFailure()
after invoking this method
boolean validate(Entity entity,
Serializable populatedInstance,
Map<String,FieldMetadata> mergedProperties)
validate(Entity, Serializable, Map, boolean)
Integer getTotalRecords(String ceilingEntity,
List<FilterMapping> filterMappings)
Serializable getMaxValue(String ceilingEntity,
List<FilterMapping> filterMappings,
String maxField)
List<Serializable> getPersistentRecords(String ceilingEntity,
List<FilterMapping> filterMappings,
Integer firstResult,
Integer maxResults)
EntityResult update(PersistencePackage persistencePackage,
boolean includeRealEntityObject)
throws ServiceException
ServiceException
EntityResult add(PersistencePackage persistencePackage,
boolean includeRealEntityObject)
throws ServiceException
ServiceException
String getStringValueFromGetter(Serializable instance,
String propertyName)
throws IllegalAccessException,
InvocationTargetException,
NoSuchMethodException
instance - propertyName -
IllegalAccessException
InvocationTargetException
NoSuchMethodException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||