public class TaskService extends BaseService<TaskModel>
sessionFactory
Constructor and Description |
---|
TaskService() |
Modifier and Type | Method and Description |
---|---|
TaskModel |
add(TaskModel taskModel)
It creates a single new entity in the database and retrieves the created object.
|
List<TaskModel> |
getCollection() |
TaskModel |
getEntityById(long id) |
TaskModel |
save(TaskModel taskModel)
It updates or creates an entity and retrieves the updated object included the ID.
|
TaskModel |
update(TaskModel taskModel)
It updates an entity what already exists and retrieves the updated object.
|
findEntityByAttribute, getCollection, getEntityById, setSessionFactory
public TaskModel add(TaskModel taskModel)
BaseService
add
in class BaseService<TaskModel>
taskModel
- Any entity model with Hibernate annotations.public TaskModel update(TaskModel taskModel)
BaseService
update
in class BaseService<TaskModel>
taskModel
- Any entity model with Hibernate annotations.public TaskModel save(TaskModel taskModel)
BaseService
save
in class BaseService<TaskModel>
taskModel
- Any entity model with Hibernate annotations.public TaskModel getEntityById(long id)
Copyright © 2015. All rights reserved.