Guest User

Untitled

a guest
Oct 19th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. @Transactional
  2. public ApiKeys save(ApiKeys apiKey) {
  3. log.debug("Request to save ApiKeys : {}", apiKey);
  4.  
  5. if(apiKey.getSecret() == null && apiKey.getId() != null)
  6. {
  7. ApiKeys apiKeyFromDb = findOne(apiKey.getId());
  8. apiKey.setSecret(apiKeyFromDb.getSecret());
  9. apiKey.setSalt(apiKeyFromDb.getSalt());
  10. }
  11.  
  12. return apiKeysRepository.save(apiKey);
  13. }
Add Comment
Please, Sign In to add comment