BasePersistenceService¶
- public abstract class BasePersistenceService¶
The BasePersistenceService class provides utility methods for communication with the database for HistoryServiceImpl and TrashServiceImpl. It allows to create and retrieve instances, load proper classes and parse values.
Methods¶
create¶
- protected <T> Object create(Class<T> clazz, Object src, EntityType type, ObjectReference objectReference)¶
findService¶
- protected MotechDataService findService(Class<?> clazz)¶
getClass¶
- protected Class<?> getClass(Object src, EntityType type)¶
getClass¶
- protected Class<?> getClass(String srcClassName, EntityType type)¶
getPersistenceManagerFactory¶
- protected PersistenceManagerFactory getPersistenceManagerFactory()¶
getValue¶
- protected Object getValue(Field field, Object src, Object target, EntityType type, ObjectReference objectReference)¶
setAllEntities¶
- public void setAllEntities(AllEntities allEntities)¶
setBundleContext¶
- public void setBundleContext(BundleContext bundleContext)¶
setPersistenceManagerFactory¶
- public void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory)¶