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_ORDER
Fields 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 Class
getClassForName
(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 phaseint
getOrder()
protected String[]
getPolymorphicClasses
(Class<?> clazz, jakarta.persistence.EntityManager em, boolean useCache) protected DynamicResultSet
getResultSet
(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 boolean
protected boolean
isAssignableFrom
(String ceilingEntityFullyQualifiedClassname, Class targetClass) protected boolean
protected boolean
protected boolean
meetsCustomCriteria
(PersistencePackage pkg, String[] customCriteria) void
remove
(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:CustomPersistenceHandler
Is this persistence handler capable of dealing with an inspect request from the admin- Specified by:
canHandleInspect
in interfaceCustomPersistenceHandler
- Parameters:
persistencePackage
- details about the inspect operation- Returns:
- whether or not this handler supports inspects
-
canHandleFetch
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an fetch request from the admin- Specified by:
canHandleFetch
in interfaceCustomPersistenceHandler
- Parameters:
persistencePackage
- details about the fetch operation- Returns:
- whether or not this handler supports fetches
-
canHandleAdd
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an add request from the admin- Specified by:
canHandleAdd
in interfaceCustomPersistenceHandler
- Parameters:
persistencePackage
- details about the add operation- Returns:
- whether or not this handler supports adds
-
canHandleRemove
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with a remove request from the admin- Specified by:
canHandleRemove
in interfaceCustomPersistenceHandler
- Parameters:
persistencePackage
- details about the remove operation- Returns:
- whether or not this handler supports remove
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdate
in 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:
inspect
in interfaceCustomPersistenceHandler
- Throws:
ServiceException
-
fetch
public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
fetch
in interfaceCustomPersistenceHandler
- Throws:
ServiceException
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
add
in interfaceCustomPersistenceHandler
- Throws:
ServiceException
-
remove
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
remove
in interfaceCustomPersistenceHandler
- Throws:
ServiceException
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
update
in interfaceCustomPersistenceHandler
- Throws:
ServiceException
-
willHandleSecurity
- Specified by:
willHandleSecurity
in interfaceCustomPersistenceHandler
-
getOrder
public int getOrder()- Specified by:
getOrder
in 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
-