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.EntityInfrastructureBuilderbut 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)¶
getRepository¶
-
protected MotechDataRepository<T>
getRepository()¶
retrieveAll¶
-
public List<T>
retrieveAll(QueryParams queryParams)¶
setAllEntities¶
-
public void
setAllEntities(AllEntities allEntities)¶
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)¶