.. java:import:: org.motechproject.mds.filter Filter .. java:import:: org.motechproject.mds.query QueryExecution .. java:import:: org.motechproject.mds.query QueryParams .. java:import:: org.springframework.transaction.support TransactionCallback .. java:import:: java.util List MotechDataService ================= .. java:package:: org.motechproject.mds.service :noindex: .. java:type:: public interface MotechDataService This is a basic service interface with CRUD operations. Mainly it is used as super interface to create service interface related with the given entity schema in \ :java:ref:`org.motechproject.mds.builder.EntityInfrastructureBuilder`\ but it can be also used by other service interfaces inside this package. :param : the type of entity schema. Methods ------- count ^^^^^ .. java:method:: long count() :outertype: MotechDataService countForFilter ^^^^^^^^^^^^^^ .. java:method:: long countForFilter(Filter filter) :outertype: MotechDataService create ^^^^^^ .. java:method:: T create(T object) :outertype: MotechDataService delete ^^^^^^ .. java:method:: void delete(T object) :outertype: MotechDataService delete ^^^^^^ .. java:method:: void delete(String primaryKeyName, Object value) :outertype: MotechDataService deleteAll ^^^^^^^^^ .. java:method:: void deleteAll() :outertype: MotechDataService doInTransaction ^^^^^^^^^^^^^^^ .. java:method:: R doInTransaction(TransactionCallback transactionCallback) :outertype: MotechDataService executeQuery ^^^^^^^^^^^^ .. java:method:: R executeQuery(QueryExecution queryExecution) :outertype: MotechDataService filter ^^^^^^ .. java:method:: List filter(Filter filter) :outertype: MotechDataService filter ^^^^^^ .. java:method:: List filter(Filter filter, QueryParams queryParams) :outertype: MotechDataService findById ^^^^^^^^ .. java:method:: T findById(Long id) :outertype: MotechDataService findTrashInstanceById ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: T findTrashInstanceById(Object instanceId, Object entityId) :outertype: MotechDataService getDetachedField ^^^^^^^^^^^^^^^^ .. java:method:: Object getDetachedField(T instance, String fieldName) :outertype: MotechDataService retrieve ^^^^^^^^ .. java:method:: T retrieve(String primaryKeyName, Object value) :outertype: MotechDataService retrieveAll ^^^^^^^^^^^ .. java:method:: List retrieveAll() :outertype: MotechDataService retrieveAll ^^^^^^^^^^^ .. java:method:: List retrieveAll(QueryParams queryParams) :outertype: MotechDataService revertFromTrash ^^^^^^^^^^^^^^^ .. java:method:: void revertFromTrash(Object newInstance, Object trash) :outertype: MotechDataService update ^^^^^^ .. java:method:: T update(T object) :outertype: MotechDataService