Class CustomPersistenceHandlerAdapter
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
- All Implemented Interfaces:
CustomPersistenceHandler,org.springframework.core.Ordered
- Direct Known Subclasses:
AdminPermissionCustomPersistenceHandler,AdminUserCustomPersistenceHandler,CategoryCustomPersistenceHandler,ChildCategoriesCustomPersistenceHandler,ClassCustomPersistenceHandlerAdapter,CustomerCustomPersistenceHandler,CustomerPasswordCustomPersistenceHandler,FieldOnlyPropertiesCustomPersistenceHandler,IndexFieldCustomPersistenceHandler,ISOCountryPersistenceHandler,PageTemplateCustomPersistenceHandler,ProductCustomPersistenceHandler,ProductOptionsCustomPersistenceHandler,ProductOptionValuesCustomPersistenceHandler,SearchFacetCustomPersistenceHandler,SearchFacetRangeCustomPersistenceHandler,SkuBundleItemCustomPersistenceHandler,SkuCustomPersistenceHandler,SkuLookupByProductCustomPersistenceHandler,StructuredContentTypeCustomPersistenceHandler,SystemPropertyCustomPersistenceHandler,TimeDTOCustomPersistenceHandler,TranslationCustomPersistenceHandler
Convenience class for those
CustomPersistenceHandler implementations
that do not wish to implement all the methods of the interface.- Author:
- Jeff Fischer
-
Field Summary
Fields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDERFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) canHandleAdd(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an add request from the admincanHandleFetch(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an fetch request from the admincanHandleInspect(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an inspect request from the admincanHandleRemove(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with a remove request from the admincanHandleUpdate(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an update request from the adminfetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected ClassgetClassForName(String ceilingEntityFullyQualifiedClassname) protected Map<String,FieldMetadata> getMetadata(PersistencePackage persistencePackage, InspectHelper helper) This is a helper method that can be invoked as a first step in a custom inspect phaseintgetOrder()protected String[]getPolymorphicClasses(Class<?> clazz, jakarta.persistence.EntityManager em, boolean useCache) protected DynamicResultSetgetResultSet(PersistencePackage persistencePackage, InspectHelper helper, Map<String, FieldMetadata> metadata) This is a helper method that can be invoked as the last step in a custom inspect phase.inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) protected booleanprotected booleanisAssignableFrom(String ceilingEntityFullyQualifiedClassname, Class targetClass) protected booleanprotected booleanprotected booleanmeetsCustomCriteria(PersistencePackage pkg, String[] customCriteria) voidremove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) willHandleSecurity(PersistencePackage persistencePackage)
-
Constructor Details
-
CustomPersistenceHandlerAdapter
public CustomPersistenceHandlerAdapter()
-
-
Method Details
-
canHandleInspect
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an inspect request from the admin- Specified by:
canHandleInspectin interfaceCustomPersistenceHandler- Parameters:
persistencePackage- details about the inspect operation- Returns:
- whether or not this handler supports inspects
-
canHandleFetch
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an fetch request from the admin- Specified by:
canHandleFetchin interfaceCustomPersistenceHandler- Parameters:
persistencePackage- details about the fetch operation- Returns:
- whether or not this handler supports fetches
-
canHandleAdd
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an add request from the admin- Specified by:
canHandleAddin interfaceCustomPersistenceHandler- Parameters:
persistencePackage- details about the add operation- Returns:
- whether or not this handler supports adds
-
canHandleRemove
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with a remove request from the admin- Specified by:
canHandleRemovein interfaceCustomPersistenceHandler- Parameters:
persistencePackage- details about the remove operation- Returns:
- whether or not this handler supports remove
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdatein interfaceCustomPersistenceHandler- Parameters:
persistencePackage- details about the update operation- Returns:
- whether or not this handler supports updatess
-
inspect
public DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws ServiceException - Specified by:
inspectin interfaceCustomPersistenceHandler- Throws:
ServiceException
-
fetch
public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
fetchin interfaceCustomPersistenceHandler- Throws:
ServiceException
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
addin interfaceCustomPersistenceHandler- Throws:
ServiceException
-
remove
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
removein interfaceCustomPersistenceHandler- Throws:
ServiceException
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
updatein interfaceCustomPersistenceHandler- Throws:
ServiceException
-
willHandleSecurity
- Specified by:
willHandleSecurityin interfaceCustomPersistenceHandler
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
getMetadata
protected Map<String,FieldMetadata> getMetadata(PersistencePackage persistencePackage, InspectHelper helper) throws ServiceException This is a helper method that can be invoked as a first step in a custom inspect phase- Throws:
ServiceException
-
getResultSet
protected DynamicResultSet getResultSet(PersistencePackage persistencePackage, InspectHelper helper, Map<String, FieldMetadata> metadata) throws ServiceExceptionThis is a helper method that can be invoked as the last step in a custom inspect phase. It will assemble the appropriate DynamicResultSet from the given parameters.- Throws:
ServiceException
-
getPolymorphicClasses
-
getClassForName
-
isAssignableFrom
-
meetsCustomCriteria
-
isBasicOperation
-
isMapOperation
-
isAdornedListOperation
-