@Repository public interface RidRepository extends BaseRepository<Rid,CenterAndMachineId>
| Modifier and Type | Method and Description |
|---|---|
Rid |
findRid(String centerId,
String machineId)
This method fetch entity for provided center and machine id.
|
int |
updateRid(int currentSequence,
String centerId,
String machineId)
This method update sequence number against provided center and machine id.
|
create, createNamedQuerySelect, createNamedQueryUpdateOrDelete, createQuerySelect, createQuerySelect, createQueryUpdateOrDelete, delete, findAll, findById, updatedeleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlushfindAll@Query(value="from Rid r WHERE r.centerId=?1 AND r.machineId=?2") Rid findRid(String centerId, String machineId)
centerId - the center id.machineId - the machine id.@Modifying
@Transactional
@Query(value="UPDATE Rid r SET r.currentSequenceNo=?1 WHERE r.centerId=?2 AND r.machineId=?3")
int updateRid(int currentSequence,
String centerId,
String machineId)
currentSequence - the current sequence number.centerId - the center id.machineId - the machine id.Copyright © 2020. All rights reserved.