Skip to content

Migrated Entities + DAOs → Panache#2

Merged
overheadhunter merged 7 commits intodevelopfrom
feature/active-records
Oct 15, 2021
Merged

Migrated Entities + DAOs → Panache#2
overheadhunter merged 7 commits intodevelopfrom
feature/active-records

Conversation

@infeo
Copy link
Copy Markdown
Member

@infeo infeo commented Oct 15, 2021

With the Panache the Quarkus Stack offers a library to reduce Persistence boiler plate code.

This PR uses the lib and its Active Record pattern to remove all standard getter and setter methods as well as remove Daos for the existing entities. Although there are more features, this is a good first step to die into the framework.

Active Record was chosen over Repository Pattern due to the context: Scalability is not a point currently, but a clean coded solution.

Additionally, on request, the package name for the entities was changed.

@infeo infeo requested a review from overheadhunter October 15, 2021 10:28
Comment on lines -125 to +75
", access=" + access.stream().map(Access::getId).collect(Collectors.toList()) +
", access=" + access.stream().map(a -> a.id).collect(Collectors.toList()) +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was the same before, but

  1. why convert a set to a list?
  2. why not just use new ArrayList(access)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently only the id should be displayed. By using the arrayList, we would still need a projection onto the id only.

@overheadhunter overheadhunter changed the title Feature/active records Migrated Entities + DAOs → Panache Oct 15, 2021
@overheadhunter overheadhunter merged commit c743d15 into develop Oct 15, 2021
@overheadhunter overheadhunter deleted the feature/active-records branch October 15, 2021 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants