# hawkBit repository API API for repository access. Contains: - Entity Model - Management service API ## Method naming concept (example target management) ``` // Count all targets Long count() // Count by filter parameter (example) Long countByTargetFilterQuery(@NotEmpty String targetFilterQuery); //Create entity List create(@NotEmpty Collection create) Target create(@NotNull TargetCreate create) //Delete entities (throws EntityNotFoundException if one element does not exist (at least one not found in collection case)) void delete(@NotEmpty Collection targetIDs); void delete(@NotNull Long targetID); void deleteByControllerId(@NotEmpty String controllerId); void deleteByControllerId(@NotEmpty Collection controllerId); //Update Target (throws EntityNotFoundException if one element does not exist (at least one not found in collection case)) List update(@NotEmpty Collection update); Target update(@NotNull TargetUpdate update); //Exist boolean exists(@NotNull Long targetId) boolean existsByAssignedDistributionSet(@NotNull Long distributionSetID); // Read methods // Find one on technical ID (Optional, no EntityNotFoundException) Optional get(@NotNull Long targetId); List get(@NotEmpty Collection targetId); // Find one on non-ID but unique constraint (Optional, no EntityNotFoundException) Optional getByControllerID(@NotEmpty String controllerId); List getByControllerID(@NotEmpty Collection controllerId); // Find one on non-ID but and non unique constraint (Optional, no EntityNotFoundException) Optional findFirstByDescription(@NotEmpty String description); // Query/search repository (page might be empty, no EntityNotFoundException) (note: pageReq always first in signature) Page findByAssignedDistributionSet(@NotNull Long distributionSetID, @NotNull Pageable pageable); ```