Class TodosMgmtEJB
- java.lang.Object
-
- info.ejava.examples.jaxrs.todos.ejb.TodosMgmtEJB
-
- All Implemented Interfaces:
TodosMgmtRemote
public class TodosMgmtEJB extends Object implements TodosMgmtRemote
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DtoMapperdtoMapper(package private) EntityManagerem
-
Constructor Summary
Constructors Constructor Description TodosMgmtEJB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTodoListItem(TodoList todoList, TodoItem item)voidaddTodoListItem(String listName, TodoItemDTO item)TodoListcreateTodoList(TodoList todoList)TodoListDTOcreateTodoList(TodoListDTO todoList)voiddeleteAll()voiddeleteTodoList(String listName)voiddeleteTodoListItem(TodoItem item)voiddeleteTodoListItem(String listName, String itemName)intdeleteTodoListLocal(String listName)TodoListDTOgetTodoList(String listName)TodoItemgetTodoListItem(String listName, String itemName)TodoListgetTodoListLocal(String listName)TodoListListDTOgetTodoLists(int offset, int limit)List<TodoList>getTodoListsLocal(int offset, int limit)TodoListDTOrenameTodoList(String oldName, String newName)TodoItemupdateTodoListItem(TodoItem item)TodoItemDTOupdateTodoListItem(String listName, String itemName, TodoItemDTO item)
-
-
-
Field Detail
-
em
@Inject EntityManager em
-
-
Method Detail
-
getTodoLists
public TodoListListDTO getTodoLists(int offset, int limit)
- Specified by:
getTodoListsin interfaceTodosMgmtRemote
-
createTodoList
public TodoListDTO createTodoList(TodoListDTO todoList)
- Specified by:
createTodoListin interfaceTodosMgmtRemote
-
getTodoList
public TodoListDTO getTodoList(String listName) throws ResourceNotFoundException
- Specified by:
getTodoListin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundException
-
renameTodoList
public TodoListDTO renameTodoList(String oldName, String newName) throws ResourceNotFoundException
- Specified by:
renameTodoListin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundException
-
deleteTodoList
public void deleteTodoList(String listName) throws ResourceNotFoundException
- Specified by:
deleteTodoListin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundException
-
deleteTodoListLocal
public int deleteTodoListLocal(String listName)
-
addTodoListItem
public void addTodoListItem(String listName, TodoItemDTO item) throws ResourceNotFoundException, InvalidRequestException
- Specified by:
addTodoListItemin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundExceptionInvalidRequestException
-
updateTodoListItem
public TodoItemDTO updateTodoListItem(String listName, String itemName, TodoItemDTO item) throws ResourceNotFoundException
- Specified by:
updateTodoListItemin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundException
-
deleteTodoListItem
public void deleteTodoListItem(String listName, String itemName) throws ResourceNotFoundException
- Specified by:
deleteTodoListItemin interfaceTodosMgmtRemote- Throws:
ResourceNotFoundException
-
deleteTodoListItem
public void deleteTodoListItem(TodoItem item)
-
deleteAll
public void deleteAll()
- Specified by:
deleteAllin interfaceTodosMgmtRemote
-
-