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 inorg.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)¶
executeSQLQuery¶
-
public <R> R
executeSQLQuery
(SqlQueryExecution<R> queryExecution)¶
filter¶
-
public List<T>
filter
(Filters filters, QueryParams queryParams)¶
findByIds¶
-
public List<T>
findByIds
(Collection<Long> ids)¶
getRepository¶
-
protected MotechDataRepository<T>
getRepository
()¶
retrieveAll¶
-
public List<T>
retrieveAll
(QueryParams queryParams)¶
revertToHistoricalRevision¶
setApplicationContext¶
-
public void
setApplicationContext
(ApplicationContext applicationContext)¶
setEntityInfoReader¶
-
public void
setEntityInfoReader
(EntityInfoReader entityInfoReader)¶
setHistoryService¶
-
public void
setHistoryService
(HistoryService historyService)¶
setOsgiEventProxy¶
-
public void
setOsgiEventProxy
(OsgiEventProxy osgiEventProxy)¶
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)¶