Guest User

Untitled

a guest
Jul 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. private String vendorCode;
  2. private VendorType sth;
  3. private String sth;
  4. private String sth;
  5. private String sth;
  6. private String sth;
  7. private String sth;
  8. private String sth;
  9.  
  10. public ResponseEntity<?> restSaveVendors(@RequestBody sth sthConfiguration)
  11. {
  12.  
  13. Optional<sthEntity> sthEntity = sthRepository.findBysthCode(sthConfiguration.getsth().getsthCode());
  14.  
  15. if(sthEntity.isPresent())
  16. {
  17. return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
  18. }
  19.  
  20.  
  21. so my code is below; I think is wrong
  22.  
  23. if(sthEntity != null)
  24. {
  25. sthRepository.save(sthConfiguration.getsth());
  26. }
Add Comment
Please, Sign In to add comment