Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class OneDto{
- Long id;
- String attributeMod;
- String attributeDontMod;
- 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
- //be created and linked to this "one" entity, and those that have id=[some_number] will be updated and linked to this "one" entity
- }
- class ChildDto{
- Long id;
- String attributeMod;
- String attributeDontMod;
- }
- class OneDto{
- Long id;
- String attributeMod;
- String attributeDontMod;
- List<ChildDto> childrenToAdd; //used if we want to add children that is not yet in DB and attach them to this "one" entity
- List<ChildDto> childrenToAddAndUpdate; //used if we want to update existing entites and attach them to this "one" entity
- List<Long> childrenIdsToDelete; //used in case that we want to update existing "one" entity - to remove children
- }
- class ChildDto{//same as above}
- class OneDto{
- Long id;
- String attributeMod;
- String attributeDontMod;
- }
- class ChildDto{
- Long id;
- Long oneId;
- String attributeMod;
- String attributeDontMod;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement