DefaultMotechDataService¶
- public abstract class DefaultMotechDataService<T> implements MotechDataService<T>¶
This is a basic implementation of org.motechproject.mds.service.MotechDataService. Mainly it is used as super class to create a service related with the given entity schema in org.motechproject.mds.builder.EntityInfrastructureBuilder but it can be also used by other services inside this package.
Parameters: - <T> – the type of entity schema.
Methods¶
doInTransaction¶
- public <R> R doInTransaction(TransactionCallback<R> transactionCallback)¶
executeQuery¶
- public <R> R executeQuery(QueryExecution<R> queryExecution)¶
filter¶
- public List<T> filter(Filter filter, QueryParams queryParams)¶
getRepository¶
- protected MotechDataRepository<T> getRepository()¶
retrieveAll¶
- public List<T> retrieveAll(QueryParams queryParams)¶
setAllEntities¶
- public void setAllEntities(AllEntities allEntities)¶
setEntityService¶
- public void setEntityService(EntityService entityService)¶
setHistoryService¶
- public void setHistoryService(HistoryService historyService)¶
setRepository¶
- public void setRepository(MotechDataRepository<T> repository)¶
setTransactionManager¶
- public void setTransactionManager(JdoTransactionManager transactionManager)¶
setTrashService¶
- public void setTrashService(TrashService trashService)¶
validateCredentials¶
- protected InstanceSecurityRestriction validateCredentials()¶
validateCredentials¶
- protected InstanceSecurityRestriction validateCredentials(T instance)¶