Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. class OneDto{
  2. Long id;
  3. String attributeMod;
  4. String attributeDontMod;
  5. List<ChildDto> children; //used to add or update children to "one" entity. In case we do update - children that is not in list will be deleted, those that have id=null will
  6. //be created and linked to this "one" entity, and those that have id=[some_number] will be updated and linked to this "one" entity
  7. }
  8.  
  9. class ChildDto{
  10. Long id;
  11. String attributeMod;
  12. String attributeDontMod;
  13. }
  14.  
  15. class OneDto{
  16. Long id;
  17. String attributeMod;
  18. String attributeDontMod;
  19. List<ChildDto> childrenToAdd; //used if we want to add children that is not yet in DB and attach them to this "one" entity
  20. List<ChildDto> childrenToAddAndUpdate; //used if we want to update existing entites and attach them to this "one" entity
  21. List<Long> childrenIdsToDelete; //used in case that we want to update existing "one" entity - to remove children
  22. }
  23.  
  24. class ChildDto{//same as above}
  25.  
  26. class OneDto{
  27. Long id;
  28. String attributeMod;
  29. String attributeDontMod;
  30. }
  31.  
  32. class ChildDto{
  33. Long id;
  34. Long oneId;
  35. String attributeMod;
  36. String attributeDontMod;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement