Commit Graph

6 Commits

Author SHA1 Message Date
Jens Schauder
25fa2d423e DATAJDBC-99 - Event support.
The repository publishes events before and after inserting, updating and deleting entities, as well as after instantiation of entities. JdbcEvent ist the common super class of all events and makes the id and the entity available (if possible). Added issue id comments to tests from previous issues.

Original pull request: #5.
2017-06-19 13:23:56 +02:00
Jens Schauder
1f1753e734 DATAJDBC-98 - Update implemented.
New instances get saved with an insert statement. Existing instances get updated. Also added some test to find certain corner cases that I feared may cause problems:

- ID properties being not editable (no setter and final).
- ID properties being primitive.
- ID properties not being named "id"

and fixed the issues resulting from those.

Original pull request: #5.
2017-06-19 13:23:36 +02:00
Jens Schauder
21490b8397 DATAJDBC-96 - Database based ID generation.
No longer using batch inserts, which won't (easily) hold up for long anyway, since we need to decide between update and insert anyway. If one wants to support batch insert one also has to check if any autoid columns are present, because those seem not to work with batch inserts with many or at least some drivers.

Related ticket: SPR-1836.
Original pull request: #5.
2017-06-19 13:23:15 +02:00
Jens Schauder
2181d8d3c6 DATAJDBC-97 - Basic implementation of all CRUD methods.
Original pull request: #5.
2017-06-19 13:23:03 +02:00
Jens Schauder
38a91d97a0 DATAJDBC-95 - Saving and loading a trivial entity.
Creation of the necessary sql statements is now dynamic and driven in a trivial way by the entity.

Known issues with the solution that need to get fixed later:

- SQL generating code is in the repository and should go somewhere else.
- Mapping logic is very trivial and should go in a separate place.

Original pull request: #5.
2017-06-19 13:22:56 +02:00
Jens Schauder
7696f5a1de Initial setup of infrastructure.
Created a maven project based on Spring Data JPA. Created JdbcRepositoryFactory, which actually creates Repositories. Wired the construction of meta data. Implemented a dummy version of saving an entity to demonstrate availability of meta data. Included a simple test for exercising the JdbcRepositoryFactory and the resulting JdbcRepository.

Related pull request: #5.
2017-06-19 13:20:10 +02:00