AllMotechRoles

public class AllMotechRoles

Implementation of DAO interface that utilizes a MDS back-end for storage. Class responsible for handling MotechRoles.

Methods

add

public void add(MotechRole role)

Creates MotechRole if it doesn’t exists

Parameters:
  • role – to be created

findByRoleName

public MotechRole findByRoleName(String roleName)

Looks for and returns MotechRole with given name

Parameters:
  • roleName – name of MotechRole
Returns:

MotechRole or null if name is a null

getRoles

public List<MotechRole> getRoles()

Returns all MotechRoles

Returns:list that contains roles

remove

public void remove(MotechRole motechRole)

Removes given MotechRole

Parameters:
  • motechRole – to be removed

setDataService

public void setDataService(MotechRolesDataService dataService)

update

public void update(MotechRole motechRole)

Updates given MotechRole

Parameters:
  • motechRole – to be updated