Interface OrganizationService
- All Known Implementing Classes:
OrganizationServiceImpl
public interface OrganizationService
Service interface for managing
Organization
entities. Defines methods for CRUD operations and querying organizations.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Check if organization with this unique identifier exists.create
(Organization organization) Creates a new organization.void
Deletes an organization by its unique identifier.findAll
(int pageNumber, int pageSize) Retrieves a paginated list of organizations.Retrieves an organization by its unique identifier.void
update
(Organization organization, Long id) Updates an existing organization.
-
Method Details
-
create
Creates a new organization.- Parameters:
organization
- the organization to create- Returns:
- the created
Organization
-
findById
Retrieves an organization by its unique identifier.- Parameters:
id
- the unique identifier of the organization- Returns:
- the found
Organization
- Throws:
EntityNotFoundException
- if no organization with the given ID is found
-
checkExistanceById
Check if organization with this unique identifier exists.- Parameters:
id
- the unique identifier of the organization- Throws:
EntityNotFoundException
- if no organization with the given ID is found
-
findAll
Retrieves a paginated list of organizations.- Parameters:
pageNumber
- the page number (starting from 0)pageSize
- the number of organizations per page- Returns:
- a
Page
containing the requested subjects
-
update
Updates an existing organization.- Parameters:
organization
- the updated organization dataid
- the unique identifier of the organization- Throws:
EntityNotFoundException
- if no organization with the given ID is found
-
delete
Deletes an organization by its unique identifier.- Parameters:
id
- the unique identifier of the organization to delete
-