Package balu.pizza.webapp.services
Class BaseService
java.lang.Object
balu.pizza.webapp.services.BaseService
Service layer of the project for the Base entity
-
Constructor Summary
ConstructorDescriptionBaseService
(BaseRepository baseRepository) Implementing the repository layer to interact with the database -
Method Summary
-
Constructor Details
-
BaseService
Implementing the repository layer to interact with the database- Parameters:
baseRepository
- Base Repository
-
-
Method Details
-
findByName
Base search method by name- Parameters:
name
-- Returns:
- An object that may contain a Base or be empty
-
create
Create new Base- Parameters:
base
-- Returns:
- new Base from DB
-
findAll
- Returns:
- List of all Bases from DB
-
findAllSorted
- Returns:
- Sorted by name list of all Bases from DB
-
findById
Find base by ID- Parameters:
baseId
-- Returns:
- Base or throw NotFoundException
-
update
Update Base in DB- Parameters:
base
-- Returns:
- updated Base
-