Interface ColorRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Color,Long>, org.springframework.data.jpa.repository.JpaRepository<Color,Long>, org.springframework.data.repository.ListCrudRepository<Color,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<Color,Long>, org.springframework.data.repository.PagingAndSortingRepository<Color,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Color>, org.springframework.data.repository.Repository<Color,Long>

public interface ColorRepository extends org.springframework.data.jpa.repository.JpaRepository<Color,Long>
Repository interface for managing Color entities.

This interface provides methods for performing CRUD operations and additional query methods for interacting with the database.

Since:
15.12.2024
Version:
1.0.0
Author:
Needle & Stitch
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds a color by its hex code.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByHex

      Optional<Color> findByHex(String hex)
      Finds a color by its hex code.
      Parameters:
      hex - The hex code of the color to find
      Returns:
      An Optional containing the found Color if present, otherwise an empty Optional.