Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repository programming model #273

Merged
merged 18 commits into from
Oct 16, 2023
Merged

repository programming model #273

merged 18 commits into from
Oct 16, 2023

Conversation

gavinking
Copy link
Contributor

This draft implements the ideas proposed in #223.

This is unfinished, since it updates only the specification, and not the Java APIs.

I'm sending it "early" for the purpose of obtaining feedback.

implement the proposal in jakartaee#223
@njr-11
Copy link
Contributor

njr-11 commented Sep 25, 2023

At first glance, there is a lot of good information here and lots of it looks good, but I highly recommend splitting this up and delivering it in smaller pieces so that we can ensure it is sufficiently well-reviewed.

@gavinking
Copy link
Contributor Author

@njr-11 I don't want to split it up into bits because it's a single internally self-consistent model. The "bits" don't make sense in isolation from each other.

And the core if this change is only 200 lines of contiguous text. So I would much prefer to take feedback as comments on the relevant lines. (Or as comments on issue #223, of course.)

Copy link
Contributor

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

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

Here are some review comments through around line 260. I'll add others separately. I'm a little worried about the possibility of git losing the comments since I'm going kind of slowly on this.

spec/src/main/asciidoc/repository.asciidoc Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
gavinking and others added 4 commits October 3, 2023 13:58
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@gavinking
Copy link
Contributor Author

Here are some review comments through around line 260. I'll add others separately.

Thanks, and sorry for the unacceptably slow response time.

I'm a little worried about the possibility of git losing the comments since I'm going kind of slowly on this.

I think they're always available from the Conversations drop-down.

Copy link
Contributor

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

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

@gavinking I revised my review comments based on the decision that was made at this past week's Jakarta Data meeting. It seems like we reached agreement on most of what is covered in this pull, so hopefully once the updates from the review comments are included, we'll be able to merge in your pull.

spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/repository.asciidoc Outdated Show resolved Hide resolved
gavinking and others added 4 commits October 8, 2023 20:04
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
Co-authored-by: Nathan Rauh <nathan.rauh@us.ibm.com>
@njr-11
Copy link
Contributor

njr-11 commented Oct 12, 2023

@gavinking with Otavio's pull to add the lifecycle annotations now being merged, I was able to resolve one of the 4 remaining review comments. Could you incorporate the remaining 3 suggestions (I don't think these should be controversial) and rebase your pull to resolve merge conflicts? After that I think we should be ready to merge this. Thanks!

@njr-11
Copy link
Contributor

njr-11 commented Oct 16, 2023

We need to make progress on getting this issue in because it is accumulating merge conflicts with other pulls that update the main spec document. I'll look into merging in the suggestions, which I don't see any opposition to, resolve the current set of merge conflicts, switch the pull to Ready for Review, and approve my own review of the pull. If I'm able to do these things successfully, then I'll post a second comment to let others know to review it, and then hopefully we can get it merged.

@njr-11 njr-11 marked this pull request as ready for review October 16, 2023 13:43
A repository may declare lifecycle methods for a single entity type, or for multiple related entity types.
Similarly, a repository might have query methods which return different entity types.

A repository interface may inherit methods from a superinterface.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain more about this point?

What are you talking about here?

Are you talking about buil-in repositories? Or non-built-in ones?

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you talking about buil-in repositories? Or non-built-in ones?

Given that all the built-in repositories only allow for a single entity type, per the parameterized type variable for the entity, we can assume that Gavin is targeting these statements at user-defined (non-built-in) repository interfaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right.

@njr-11
Copy link
Contributor

njr-11 commented Oct 16, 2023

This is ready for review now if anyone else want to review it. I was able to successfully resolve the merge conflicts and add in the suggestions.

njr-11 and others added 2 commits October 16, 2023 10:44
Co-authored-by: Otávio Santana <otaviopolianasantana@gmail.com>
Co-authored-by: Otávio Santana <otaviopolianasantana@gmail.com>
A repository may declare lifecycle methods for a single entity type, or for multiple related entity types.
Similarly, a repository might have query methods which return different entity types.

A repository interface may inherit methods from a superinterface.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
A repository interface may inherit methods from a superinterface.
A non-built-in repository interface may inherit methods from a superinterface.

Can we procedure this way?
WDYT?

Copy link
Contributor

@njr-11 njr-11 Oct 16, 2023

Choose a reason for hiding this comment

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

My vote would be against adding that language because it's also true that built-in repository interfaces can inherit methods from a superinterface. This currently exists in the spec where PageableRepository inherits from BasicRepository and inherits its methods as well. And where CrudRepository inherits from BasicRepository and inherits its methods as well.

If you feel strongly about it, then go ahead and commit the change, and merge the pull because this appears to be the last remaining review comment.

njr-11 and others added 3 commits October 16, 2023 14:20
Co-authored-by: Otávio Santana <otaviopolianasantana@gmail.com>
Co-authored-by: Otávio Santana <otaviopolianasantana@gmail.com>
Co-authored-by: Otávio Santana <otaviopolianasantana@gmail.com>
@otaviojava
Copy link
Contributor

We have a long time in this PR; I will merge it and open PRs to improve it.

@otaviojava otaviojava merged commit db0d095 into jakartaee:main Oct 16, 2023
4 checks passed
@gavinking
Copy link
Contributor Author

We have a long time in this PR; I will merge it and open PRs to improve it.

Apologies folks, and thanks for merging this.

I came back today to resolve the conflicts, and fix up the remaining suggestions but I see I was too late.

If you let me know about any concerns that were left unresolved, I will send a PR with those edits later today. @otaviojava @njr-11

@njr-11
Copy link
Contributor

njr-11 commented Oct 17, 2023

If you let me know about any concerns that were left unresolved, I will send a PR with those edits later today.

Thanks for all of your contributions on this @gavinking ! I believe we resolved everything and am not aware of anything else to follow up on from this pull.

@gavinking
Copy link
Contributor Author

OK thanks. Sorry again for the slow turnaround time.

@otaviojava
Copy link
Contributor

@gavinking thank you for all the support.
If you don´t mind review it again.

Please, let us know if we are missing anything.

@gavinking
Copy link
Contributor Author

@otaviojava yes I will do that, I promise!

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.

None yet

4 participants