vendredi 3 mars 2023

Using org.springframework.data.jdbc.core.convert.SqlGenerator in my own package throw composition design

I'm currently working on a project that utilizes Spring Data JDBC custom repository. In my custom repository, I have implemented my own DataAccessStrategy, AggregateRoot, AggregateExecutor, and SqlParameterSource to generate SQL scripts. However, I would like to use the SqlGenerator class to generate SQL, which has a package-private access modifier.

To get around this, I plan on using composition by creating a public class in org.springframework.data.jdbc.core.convert and using a private final field with the SqlGenerator type.

My question is: would it be a good idea to open up the methods of the package-private SqlGenerator class for use in my library?

Any advice or suggestions would be greatly appreciated!

Aucun commentaire:

Enregistrer un commentaire