Interface CallbackRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Callback,Integer>, org.springframework.data.repository.Repository<Callback, Integer>
-
Method Summary
Modifier and TypeMethodDescriptionintcountAllByDataEquals(String data) Counts callbacks scheduled on a specific date.intReturns the total number of callbacks.voiddeleteCallbacksByBankerId(Integer bankerId) Deletes callbacks for a specific banker.voiddeleteCallbacksByClientId(Integer clientId) Deletes callbacks for a specific client.intupdateCallback(Integer callbackId, Integer bankerId, Integer clientId, String data, String dataApp, String note) Updates a callback via native SQL.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
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.
-