This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-2873
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/CAUSEWAY-2873 by this push:
new a7d79adff9 CAUSEWAY-2873: cleans up the _todo.adoc for petclinic
a7d79adff9 is described below
commit a7d79adff93b903093931c1071ef80c450f20831
Author: Dan Haywood <[email protected]>
AuthorDate: Mon May 27 17:54:05 2024 +0100
CAUSEWAY-2873: cleans up the _todo.adoc for petclinic
---
.../modules/petclinic/pages/100-todo.adoc | 121 ---------------------
.../tutorials/modules/petclinic/pages/_todo.adoc | 14 +++
2 files changed, 14 insertions(+), 121 deletions(-)
diff --git a/antora/components/tutorials/modules/petclinic/pages/100-todo.adoc
b/antora/components/tutorials/modules/petclinic/pages/100-todo.adoc
deleted file mode 100644
index 13156e85d2..0000000000
--- a/antora/components/tutorials/modules/petclinic/pages/100-todo.adoc
+++ /dev/null
@@ -1,121 +0,0 @@
-
-TODO: ideas for future steps:
-* more user-friendly error message if hit duplicate (enter two pet owners with
same name)
-
-
-validate pet name is unique within Pet
-
-
-refactor addPet to be an inline-mixin.
-
-need a disable and a hide action
-
-
-update home page, show upcoming appointments
-
-
-visit
-- need some words about adding VisitRepository
-
-cf : we no longer have a PetRepository, but adapt...
-
-
-[#exercise-4-2-add-petrepository]
-== Ex 4.2: Add PetRepository
-
-We will need to find the ``Pet``s belonging to a `PetOwner`.
-We do this by introducing a `PetRepository`, implemented as a
link:https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories.definition[Spring
Data repository].
-
-=== Solution
-
-[source,bash]
-----
-git checkout tags/04-02-PetRepository
-mvn clean install
-mvn -pl spring-boot:run
-----
-
-
-
-=== Tasks
-
-* create the `PetRepository`, extending Spring Data's
`org.springframework.data.repository.Repository` interface:
-+
-[source,java]
-.PetRepository.java
-----
-import org.springframework.data.repository.Repository;
-
-public interface PetRepository extends Repository<Pet, Long> {
-
- List<Pet> findByPetOwner(PetOwner petOwner);
-}
-----
-
-Confirm the application still runs.
-
-
-
-
-
-PetOwner#daysSinceLastVisit could be made into a mixin - eg if these marketing
analytics were the responsibility of some other module.
-
-
-hidden properties
-
-
-mixins
-
-[source,java]
-.PetOwner_pets.java
-----
-import lombok.RequiredArgsConstructor;
-
-@Collection // <.>
-@CollectionLayout(defaultView = "table")
-@RequiredArgsConstructor // <.>
-public class PetOwner_pets { // <.>
-
- private final PetOwner petOwner; // <.>
-
- public List<Pet> coll() {
- return petRepository.findByPetOwner(petOwner); // <.>
- }
-
- @Inject PetRepository petRepository; // <5>
-}
-----
-<.> indicates that this is a collection mixin
-<.> lombok annotation to avoid some boilerplate
-<.> collection name is derived from the mixin class name, being the name after
the '_'.
-<.> the "mixee" that is being contributed to, in other words `PetOwner`.
-<.> inject the `PetRepository` as defined in previous exercise, in order to
find the ``Pet``s owned by the `PetOwner`.
-
-
-
-
-[#exercise-4-5-digression-clean-up-casing-of-database-schema]
-== Ex 4.5: Digression: clean-up casing of database schema
-
-Reviewing the tables in the database we can see that we have a mix between
lower- and upper-case table and column names.
-In this exercise we'll take a timeout to make everything consistent.
-
-=== Solution
-
-[source,bash]
-----
-git checkout tags/04-05-db-schema-consistent-casings
-mvn clean install
-mvn -pl spring-boot:run
-----
-
-=== Tasks
-
-* check out the tag and inspect the changes:
-
-** `Pet` entity table name
-** `PetOwner` entity table name and column names
-** JDBC URL
-
-* run the application to check the database schema.
-
diff --git a/antora/components/tutorials/modules/petclinic/pages/_todo.adoc
b/antora/components/tutorials/modules/petclinic/pages/_todo.adoc
new file mode 100644
index 0000000000..d2f920205b
--- /dev/null
+++ b/antora/components/tutorials/modules/petclinic/pages/_todo.adoc
@@ -0,0 +1,14 @@
+= Ideas for the future...
+
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by
applicable law or ag [...]
+
+
+* more user-friendly error message if hit duplicate (enter two pet owners with
same name)
+
+* refactor addPet to be an inline-mixin.
+
+* add an disable and a hide action
+
+* PetOwner#daysSinceLastVisit could be made into a mixin
+** eg if these marketing analytics were the responsibility of some other
module.
+