Class ProfileRepository

java.lang.Object
com.serinity.accesscontrol.repository.base.BaseRepository<Profile,Long>
com.serinity.accesscontrol.repository.ProfileRepository

public final class ProfileRepository extends BaseRepository<Profile,Long>
Repository class for performing CRUD operations on Profile entities.
Since:
2026-02-03
Version:
1.0
Author:
@ZouariOmar (zouariomar20@gmail.com)
See Also:
  • Constructor Details

    • ProfileRepository

      public ProfileRepository(org.zouarioss.skinnedratorm.core.EntityManager em)
      Creates a repository instance for profiles.
      Parameters:
      em - entity manager used for persistence operations
  • Method Details

    • findByUsername

      public Profile findByUsername(String username)
      Finds a profile by its unique generated username.
      Parameters:
      username - the auto-generated username
      Returns:
      the matching Profile
      Throws:
      RuntimeException - if the profile is not found or a DB error occurs
    • findByUserId

      public Profile findByUserId(UUID userId)
      Finds the profile associated with a given user.
      Parameters:
      userId - the UUID of the owner User
      Returns:
      the matching Profile
      Throws:
      RuntimeException - if the profile is not found or a DB error occurs