Class SubmissionDao

java.lang.Object
me.nickhanson.codeforge.persistence.SubmissionDao

public class SubmissionDao extends Object
Data Access Object for Submission entities. Provides methods to perform CRUD operations and custom queries.
Author:
Nick Hanson
  • Constructor Details

    • SubmissionDao

      public SubmissionDao()
  • Method Details

    • getById

      public Submission getById(Long id)
    • getAll

      public List<Submission> getAll()
    • saveOrUpdate

      public void saveOrUpdate(Submission submission)
    • delete

      public void delete(Submission submission)
    • listByChallengeId

      public List<Submission> listByChallengeId(Long challengeId)
      Lists all submissions associated with a specific challenge ID.
      Parameters:
      challengeId - The ID of the challenge.
      Returns:
      A list of submissions for the given challenge ID.
    • listByChallengeIdAndUser

      public List<Submission> listByChallengeIdAndUser(Long challengeId, String userId)
      Lists submissions for a specific challenge and user.
      Parameters:
      challengeId - The ID of the challenge.
      userId - The ID of the user.
      Returns:
      A list of submissions for the given challenge ID and user ID.