public class CustomPersistenceHandlerAdapter extends Object implements CustomPersistenceHandler
CustomPersistenceHandler
implementations
that do not wish to implement all the methods of the interface.DEFAULT_ORDER
Constructor and Description |
---|
CustomPersistenceHandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
Entity |
add(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
Boolean |
canHandleAdd(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an add request from the admin
|
Boolean |
canHandleFetch(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an fetch request from the admin
|
Boolean |
canHandleInspect(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an inspect request from the admin
|
Boolean |
canHandleRemove(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with a remove request from the admin
|
Boolean |
canHandleUpdate(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an update request from the admin
|
DynamicResultSet |
fetch(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 phase
|
int |
getOrder() |
protected String[] |
getPolymorphicClasses(Class<?> clazz,
javax.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.
|
DynamicResultSet |
inspect(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
InspectHelper helper) |
protected boolean |
isAdornedListOperation(PersistencePackage pkg) |
protected boolean |
isAssignableFrom(String ceilingEntityFullyQualifiedClassname,
Class targetClass) |
protected boolean |
isBasicOperation(PersistencePackage pkg) |
protected boolean |
isMapOperation(PersistencePackage pkg) |
protected boolean |
meetsCustomCriteria(PersistencePackage pkg,
String[] customCriteria) |
void |
remove(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
Entity |
update(PersistencePackage persistencePackage,
DynamicEntityDao dynamicEntityDao,
RecordHelper helper) |
Boolean |
willHandleSecurity(PersistencePackage persistencePackage) |
public Boolean canHandleInspect(PersistencePackage persistencePackage)
CustomPersistenceHandler
canHandleInspect
in interface CustomPersistenceHandler
persistencePackage
- details about the inspect operationpublic Boolean canHandleFetch(PersistencePackage persistencePackage)
CustomPersistenceHandler
canHandleFetch
in interface CustomPersistenceHandler
persistencePackage
- details about the fetch operationpublic Boolean canHandleAdd(PersistencePackage persistencePackage)
CustomPersistenceHandler
canHandleAdd
in interface CustomPersistenceHandler
persistencePackage
- details about the add operationpublic Boolean canHandleRemove(PersistencePackage persistencePackage)
CustomPersistenceHandler
canHandleRemove
in interface CustomPersistenceHandler
persistencePackage
- details about the remove operationpublic Boolean canHandleUpdate(PersistencePackage persistencePackage)
CustomPersistenceHandler
canHandleUpdate
in interface CustomPersistenceHandler
persistencePackage
- details about the update operationpublic DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws ServiceException
inspect
in interface CustomPersistenceHandler
ServiceException
public DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
fetch
in interface CustomPersistenceHandler
ServiceException
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
add
in interface CustomPersistenceHandler
ServiceException
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
remove
in interface CustomPersistenceHandler
ServiceException
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException
update
in interface CustomPersistenceHandler
ServiceException
public Boolean willHandleSecurity(PersistencePackage persistencePackage)
willHandleSecurity
in interface CustomPersistenceHandler
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
protected Map<String,FieldMetadata> getMetadata(PersistencePackage persistencePackage, InspectHelper helper) throws ServiceException
ServiceException
protected DynamicResultSet getResultSet(PersistencePackage persistencePackage, InspectHelper helper, Map<String,FieldMetadata> metadata) throws ServiceException
ServiceException
protected String[] getPolymorphicClasses(Class<?> clazz, javax.persistence.EntityManager em, boolean useCache)
protected boolean isAssignableFrom(String ceilingEntityFullyQualifiedClassname, Class targetClass)
protected boolean meetsCustomCriteria(PersistencePackage pkg, String[] customCriteria)
protected boolean isBasicOperation(PersistencePackage pkg)
protected boolean isMapOperation(PersistencePackage pkg)
protected boolean isAdornedListOperation(PersistencePackage pkg)
Copyright © 2022. All rights reserved.