-
Notifications
You must be signed in to change notification settings - Fork 310
Add support for RepositoryFragmentsContributor
#1574
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
Conversation
...ringframework/data/cassandra/repository/support/CassandraRepositoryFragmentsContributor.java
Outdated
Show resolved
Hide resolved
This change adopts the newly added AOT changes from spring-projects/spring-data-commons#3282 to Cassandra repositories. - Introduces repository fragments contributor and updates the repository factories and factory beans w/ to use the default implementations. - Also makes the `CassandraRepositoryFactoryBean` consistent with its reactive counterpart by only setting the mapping context from the `CassandraOperations` in `afterPropertiesSet` iff the mapping context was not specified by the user. See: spring-projects#1566
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start, left two comments about visibility.
...ringframework/data/cassandra/repository/support/CassandraRepositoryFragmentsContributor.java
Outdated
Show resolved
Hide resolved
...ework/data/cassandra/repository/support/ReactiveCassandraRepositoryFragmentsContributor.java
Outdated
Show resolved
Hide resolved
Moves default fragment contributors into their own file and sets their visiblity to package-protected.
* @author Chris Bono | ||
* @since 5.0 | ||
*/ | ||
enum DefaultCassandraRepositoryFragmentsContributor implements CassandraRepositoryFragmentsContributor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question on naming of "default impls".... what is our team standard on this? I have seen so far quite a bit of Foo -> FooSupport
rather than Foo -> DefaultFoo
. I am happy to rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly, SimpleFoo
or DefaultFoo
. In JPA and MongoDB I went for QuerydslContributor
because the name is already quite long. How about EmptyContributor
for Cassandra?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeh, I like EmptyContributor
. I will adjust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Shorten name of default fragment contributors to `EmptyFragmentsContributor` and `ReactiveEmptyFragmentsContributor`.
RepositoryFragmentsContributor
This change adopts the newly added AOT changes from spring-projects/spring-data-commons#3282 to Cassandra repositories. - Introduces repository fragments contributor and updates the repository factories and factory beans w/ to use the default implementations. - Also makes the `CassandraRepositoryFactoryBean` consistent with its reactive counterpart by only setting the mapping context from the `CassandraOperations` in `afterPropertiesSet` iff the mapping context was not specified by the user. Closes #1574
Adopt to deprecations in Commons. See #1574
Thank you for your contribution. That's merged and polished now. |
This code proposal adopts the newly added AOT changes (spring-data-commons/3282) to Cassandra repositories.
Note
While the AOT repositories support has not been added yet, I think it still makes sense to add these changes in as they will be required by AOT and this is a small enough change to focus on in a single PR.
Introduces repository fragments contributor and updates the repository factories and factory beans w/ to use the default implementations.
Also makes the
CassandraRepositoryFactoryBean
consistent with its reactive counterpart by only setting the mapping context from theCassandraOperations
inafterPropertiesSet
iff the mapping context was not specified by the user.See: #1566