CampaignRepository

@Repository
interface CampaignRepository : JpaRepository<Campaign, String> (source)

Repositório para acesso a dados de campanhas de marketing. Fornece métodos para listar, filtrar e buscar campanhas por tenant.

Functions

Link copied to clipboard
abstract fun count(): Long
abstract fun <S : Campaign> count(example: Example<S>): Long
Link copied to clipboard
abstract fun countByTenantIdAndStatus(tenantId: String, status: CampaignStatus): Long
Link copied to clipboard
abstract fun delete(entity: Campaign)
Link copied to clipboard
abstract fun deleteAll()
abstract fun deleteAll(entities: MutableIterable<Campaign>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun deleteAllInBatch()
abstract fun deleteAllInBatch(entities: MutableIterable<Campaign>)
Link copied to clipboard
abstract fun deleteById(id: String)
Link copied to clipboard
Link copied to clipboard
abstract fun <S : Campaign> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: String): Boolean
Link copied to clipboard
abstract override fun <S : Campaign> findAll(example: Example<S>): MutableList<S>
abstract override fun <S : Campaign> findAll(example: Example<S>, sort: Sort): MutableList<S>
abstract override fun findAll(): MutableList<Campaign>
abstract override fun findAll(sort: Sort): MutableList<Campaign>
abstract fun findAll(pageable: Pageable): Page<Campaign>
abstract fun <S : Campaign> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract override fun findAllById(ids: MutableIterable<String>): MutableList<Campaign>
Link copied to clipboard
abstract fun <S : Campaign, R : Any> findBy(example: Example<S>, queryFunction: Function<FluentQuery.FetchableFluentQuery<S>, R>): R
Link copied to clipboard
abstract fun findById(id: String): Optional<Campaign>
Link copied to clipboard
abstract fun findByIdAndTenantId(id: String, tenantId: String): Campaign?
abstract fun findByTenantIdAndStatusOrderByCreatedAtDesc(tenantId: String, status: CampaignStatus, pageable: Pageable): Page<Campaign>
Link copied to clipboard
abstract fun findByTenantIdOrderByCreatedAtDesc(tenantId: String, pageable: Pageable): Page<Campaign>
Link copied to clipboard
abstract fun <S : Campaign> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
@Query(value = " SELECT c FROM Campaign c WHERE c.status = 'SCHEDULED' AND c.scheduledTo <= :now ")
abstract fun findPendingCampaignsToProcess(now: LocalDateTime): List<Campaign>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: String): Campaign
Link copied to clipboard
abstract fun getOne(id: String): Campaign
Link copied to clipboard
abstract fun getReferenceById(id: String): Campaign
Link copied to clipboard
abstract fun <S : Campaign> save(entity: S): S
Link copied to clipboard
abstract override fun <S : Campaign> saveAll(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Campaign> saveAllAndFlush(entities: MutableIterable<S>): MutableList<S>
Link copied to clipboard
abstract fun <S : Campaign> saveAndFlush(entity: S): S