Interface CallbackRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Callback,Integer>, org.springframework.data.repository.Repository<Callback,Integer>

public interface CallbackRepository extends org.springframework.data.repository.CrudRepository<Callback,Integer>
Repository for callback entities and custom queries.
  • Method Details

    • countAllCallbacks

      @Query(value="SELECT COUNT(*) FROM CALLBACKS", nativeQuery=true) int countAllCallbacks()
      Returns the total number of callbacks.
    • updateCallback

      @Transactional @Modifying @Query(value="UPDATE CALLBACKS\nSET ID_BANKER = :bankerId,\n ID_CLIENTE = :clientId,\n DATA = :data,\n DATA_APP = :dataApp,\n NOTE = :note\nWHERE ID = :callbackId\n", nativeQuery=true) int updateCallback(Integer callbackId, Integer bankerId, Integer clientId, String data, String dataApp, String note)
      Updates a callback via native SQL.
    • countAllByDataEquals

      @Query(value="SELECT COUNT(*) FROM CALLBACKS c WHERE c.DATA =:data", nativeQuery=true) int countAllByDataEquals(String data)
      Counts callbacks scheduled on a specific date.
    • deleteCallbacksByClientId

      @Transactional @Modifying @Query(value="DELETE FROM callbacks WHERE id_cliente = :clientId", nativeQuery=true) void deleteCallbacksByClientId(Integer clientId)
      Deletes callbacks for a specific client.
    • deleteCallbacksByBankerId

      @Transactional @Modifying @Query(value="DELETE FROM callbacks WHERE ID_BANKER = :bankerId", nativeQuery=true) void deleteCallbacksByBankerId(Integer bankerId)
      Deletes callbacks for a specific banker.