CommentRepository

@Repository
interface CommentRepository : JpaRepository<Comment, Long>

Functions

Link copied to clipboard
abstract fun count(): Long
abstract fun <S : Comment> count(example: Example<S>): Long
Link copied to clipboard
abstract fun delete(entity: Comment)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<Comment>)
Link copied to clipboard
abstract fun deleteAllById(ids: MutableIterable<Long>)
Link copied to clipboard
Link copied to clipboard
abstract fun deleteAllInBatch()
abstract fun deleteAllInBatch(entities: MutableIterable<Comment>)
Link copied to clipboard
abstract fun deleteById(id: Long)
Link copied to clipboard
Link copied to clipboard
abstract fun <S : Comment> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: Long): Boolean
Link copied to clipboard
abstract override fun <S : Comment> findAll(example: Example<S>): MutableList<S>
abstract override fun <S : Comment> findAll(example: Example<S>, sort: Sort): MutableList<S>
abstract override fun findAll(): MutableList<Comment>
abstract override fun findAll(sort: Sort): MutableList<Comment>
abstract fun findAll(pageable: Pageable): Page<Comment>
abstract fun <S : Comment> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract override fun findAllById(ids: MutableIterable<Long>): MutableList<Comment>
Link copied to clipboard
abstract fun <S : Comment, R : Any> findBy(example: Example<S>, queryFunction: Function<FluentQuery.FetchableFluentQuery<S>, R>): R
Link copied to clipboard
abstract fun findByArticleId(articleId: Long): List<Comment>

게시글 ID로 댓글 조회

Link copied to clipboard
abstract fun findByArticleIdAndId(articleId: Long, id: Long): Comment?

게시글 ID + 댓글 ID로 특정 댓글 조회

Link copied to clipboard
abstract fun findByAuthorId(authorId: Long, pageable: Pageable): Page<Comment>

작성자 ID로 댓글 조회

Link copied to clipboard
abstract fun findById(id: Long): Optional<Comment>
Link copied to clipboard
abstract fun <S : Comment> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: Long): Comment
Link copied to clipboard
abstract fun getOne(id: Long): Comment
Link copied to clipboard
abstract fun getReferenceById(id: Long): Comment
Link copied to clipboard
abstract fun <S : Comment> save(entity: S): S
Link copied to clipboard
abstract override fun <S : Comment> saveAll(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Comment> saveAllAndFlush(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Comment> saveAndFlush(entity: S): S