Skip to content
Browse files

Added all

  • Loading branch information...
0 parents commit 0279748e1519158c5474925372de1c344161c4d7 @krimple committed Oct 8, 2011
Showing with 9,690 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +4 −0 build_all.sh
  3. +8 −0 chapter-01/build_all.sh
  4. +12 −0 chapter-01/pizzashop-activerecord/.settings/.jsdtscope
  5. +43 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.ajdt.core.prefs
  6. +9 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.jdt.core.prefs
  7. +10 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.common.component
  8. +7 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.common.project.facet.core.xml
  9. +1 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.jsdt.ui.superType.container
  10. +1 −0 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.jsdt.ui.superType.name
  11. +8 −0 chapter-01/pizzashop-activerecord/.settings/org.maven.ide.eclipse.prefs
  12. +48 −0 chapter-01/pizzashop-activerecord/pizzashopactiverecord.roo
  13. +512 −0 chapter-01/pizzashop-activerecord/pom.xml
  14. +13 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/BaseController.java
  15. +108 −0 .../pizzashop-activerecord/src/main/java/com/springsource/pizzashop/BaseController_Roo_Controller.aj
  16. +13 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/PizzaController.java
  17. +120 −0 ...pizzashop-activerecord/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller.aj
  18. +13 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/PizzaOrderController.java
  19. +126 −0 ...shop-activerecord/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller.aj
  20. +13 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/ToppingController.java
  21. +108 −0 ...zzashop-activerecord/src/main/java/com/springsource/pizzashop/ToppingController_Roo_Controller.aj
  22. +19 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base.java
  23. +12 −0 ...1/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Configurable.aj
  24. +78 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Entity.aj
  25. +18 −0 ...er-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_JavaBean.aj
  26. +44 −0 ...-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Jpa_Entity.aj
  27. +32 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Json.aj
  28. +18 −0 ...er-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_ToString.aj
  29. +33 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza.java
  30. +45 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder.java
  31. +15 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk.java
  32. +12 −0 ...ashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Configurable.aj
  33. +78 −0 ...1/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Entity.aj
  34. +78 −0 ...pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_JavaBean.aj
  35. +44 −0 ...zzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Jpa_Entity.aj
  36. +32 −0 ...-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Json.aj
  37. +25 −0 ...pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_ToString.aj
  38. +12 −0 .../pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Configurable.aj
  39. +78 −0 ...ter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Entity.aj
  40. +46 −0 ...r-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_JavaBean.aj
  41. +44 −0 ...01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Jpa_Entity.aj
  42. +32 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Json.aj
  43. +21 −0 ...r-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_ToString.aj
  44. +19 −0 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping.java
  45. +12 −0 ...izzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Configurable.aj
  46. +78 −0 ...r-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Entity.aj
  47. +18 −0 ...01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_JavaBean.aj
  48. +44 −0 .../pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Jpa_Entity.aj
  49. +32 −0 ...ter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Json.aj
  50. +18 −0 ...01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_ToString.aj
  51. +18 −0 ...erecord/src/main/java/com/springsource/pizzashop/web/ApplicationConversionServiceFactoryBean.java
  52. +136 −0 ...a/com/springsource/pizzashop/web/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj
  53. +16 −0 chapter-01/pizzashop-activerecord/src/main/resources/META-INF/persistence.xml
  54. +70 −0 chapter-01/pizzashop-activerecord/src/main/resources/META-INF/spring/applicationContext.xml
  55. +6 −0 chapter-01/pizzashop-activerecord/src/main/resources/META-INF/spring/database.properties
  56. +4 −0 chapter-01/pizzashop-activerecord/src/main/resources/META-INF/spring/solr.properties
  57. +17 −0 chapter-01/pizzashop-activerecord/src/main/resources/log4j.properties
  58. +3 −0 chapter-01/pizzashop-activerecord/src/main/webapp/META-INF/MANIFEST.MF
  59. +1 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/classes/alt.properties
  60. +1 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/classes/standard.properties
  61. +48 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/i18n/application.properties
  62. +99 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/i18n/messages.properties
  63. +28 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/layouts/default.jspx
  64. +19 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/layouts/layouts.xml
  65. +75 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/spring/webmvc-config.xml
  66. +61 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/create.tagx
  67. +25 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/dependency.tagx
  68. +38 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/checkbox.tagx
  69. +63 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/column.tagx
  70. +75 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/datetime.tagx
  71. +51 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/display.tagx
  72. +60 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/editor.tagx
  73. +108 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/input.tagx
  74. +42 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/reference.tagx
  75. +199 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/select.tagx
  76. +35 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/simple.tagx
  77. +162 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/table.tagx
  78. +47 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/fields/textarea.tagx
  79. +30 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/find.tagx
  80. +31 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/list.tagx
  81. +103 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/show.tagx
  82. +47 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/form/update.tagx
  83. +25 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/menu/category.tagx
  84. +29 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/menu/item.tagx
  85. +13 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/menu/menu.tagx
  86. +31 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/language.tagx
  87. +29 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/load-scripts.tagx
  88. +87 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/pagination.tagx
  89. +33 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/panel.tagx
  90. +5 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/placeholder.tagx
  91. +36 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/tags/util/theme.tagx
  92. +9 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/bases/create.jspx
  93. +10 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/bases/list.jspx
  94. +8 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/bases/show.jspx
  95. +8 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/bases/update.jspx
  96. +16 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/bases/views.xml
  97. +30 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/dataAccessFailure.jspx
  98. +37 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/footer.jspx
  99. +11 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/header.jspx
  100. +11 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/index-template.jspx
  101. +14 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/index.jspx
  102. +23 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/menu.jspx
  103. +16 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzaorders/create.jspx
  104. +15 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzaorders/list.jspx
  105. +15 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzaorders/show.jspx
  106. +15 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzaorders/update.jspx
  107. +16 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzaorders/views.xml
  108. +12 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzas/create.jspx
  109. +13 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzas/list.jspx
  110. +11 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzas/show.jspx
  111. +11 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzas/update.jspx
  112. +16 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/pizzas/views.xml
  113. +29 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/resourceNotFound.jspx
  114. +9 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/toppings/create.jspx
  115. +10 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/toppings/list.jspx
  116. +8 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/toppings/show.jspx
  117. +8 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/toppings/update.jspx
  118. +16 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/toppings/views.xml
  119. +29 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/uncaughtException.jspx
  120. +24 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/views/views.xml
  121. +114 −0 chapter-01/pizzashop-activerecord/src/main/webapp/WEB-INF/web.xml
  122. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/add.png
  123. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/banner-graphic.png
  124. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/create.png
  125. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/delete.png
  126. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/en.png
  127. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/favicon.ico
  128. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/list.png
  129. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/resultset_first.png
  130. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/resultset_last.png
  131. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/resultset_next.png
  132. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/resultset_previous.png
  133. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/show.png
  134. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/springsource-logo.png
  135. BIN chapter-01/pizzashop-activerecord/src/main/webapp/images/update.png
  136. +369 −0 chapter-01/pizzashop-activerecord/src/main/webapp/styles/alt.css
  137. +373 −0 chapter-01/pizzashop-activerecord/src/main/webapp/styles/standard.css
  138. +7 −0 ...r-01/pizzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/BaseDataOnDemand.java
  139. +12 −0 ...activerecord/src/test/java/com/springsource/pizzashop/domain/BaseDataOnDemand_Roo_Configurable.aj
  140. +83 −0 ...activerecord/src/test/java/com/springsource/pizzashop/domain/BaseDataOnDemand_Roo_DataOnDemand.aj
  141. +12 −0 ...1/pizzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/BaseIntegrationTest.java
  142. +12 −0 ...iverecord/src/test/java/com/springsource/pizzashop/domain/BaseIntegrationTest_Roo_Configurable.aj
  143. +121 −0 ...record/src/test/java/com/springsource/pizzashop/domain/BaseIntegrationTest_Roo_IntegrationTest.aj
  144. +7 −0 ...-01/pizzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/PizzaDataOnDemand.java
  145. +12 −0 ...ctiverecord/src/test/java/com/springsource/pizzashop/domain/PizzaDataOnDemand_Roo_Configurable.aj
  146. +102 −0 ...ctiverecord/src/test/java/com/springsource/pizzashop/domain/PizzaDataOnDemand_Roo_DataOnDemand.aj
  147. +12 −0 .../pizzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/PizzaIntegrationTest.java
  148. +12 −0 ...verecord/src/test/java/com/springsource/pizzashop/domain/PizzaIntegrationTest_Roo_Configurable.aj
  149. +121 −0 ...ecord/src/test/java/com/springsource/pizzashop/domain/PizzaIntegrationTest_Roo_IntegrationTest.aj
  150. +7 −0 ...izzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/PizzaOrderDataOnDemand.java
  151. +12 −0 ...record/src/test/java/com/springsource/pizzashop/domain/PizzaOrderDataOnDemand_Roo_Configurable.aj
  152. +126 −0 ...record/src/test/java/com/springsource/pizzashop/domain/PizzaOrderDataOnDemand_Roo_DataOnDemand.aj
  153. +12 −0 ...ashop-activerecord/src/test/java/com/springsource/pizzashop/domain/PizzaOrderIntegrationTest.java
  154. +12 −0 ...ord/src/test/java/com/springsource/pizzashop/domain/PizzaOrderIntegrationTest_Roo_Configurable.aj
  155. +121 −0 .../src/test/java/com/springsource/pizzashop/domain/PizzaOrderIntegrationTest_Roo_IntegrationTest.aj
  156. +7 −0 ...1/pizzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/ToppingDataOnDemand.java
  157. +12 −0 ...iverecord/src/test/java/com/springsource/pizzashop/domain/ToppingDataOnDemand_Roo_Configurable.aj
  158. +83 −0 ...iverecord/src/test/java/com/springsource/pizzashop/domain/ToppingDataOnDemand_Roo_DataOnDemand.aj
  159. +12 −0 ...izzashop-activerecord/src/test/java/com/springsource/pizzashop/domain/ToppingIntegrationTest.java
  160. +12 −0 ...record/src/test/java/com/springsource/pizzashop/domain/ToppingIntegrationTest_Roo_Configurable.aj
  161. +121 −0 ...ord/src/test/java/com/springsource/pizzashop/domain/ToppingIntegrationTest_Roo_IntegrationTest.aj
  162. +12 −0 chapter-01/pizzashop-layered/.settings/.jsdtscope
  163. +43 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.ajdt.core.prefs
  164. +9 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.jdt.core.prefs
  165. +10 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.wst.common.component
  166. +7 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.wst.common.project.facet.core.xml
  167. +1 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.wst.jsdt.ui.superType.container
  168. +1 −0 chapter-01/pizzashop-layered/.settings/org.eclipse.wst.jsdt.ui.superType.name
  169. +8 −0 chapter-01/pizzashop-layered/.settings/org.maven.ide.eclipse.prefs
  170. +499 −0 chapter-01/pizzashop-layered/pom.xml
  171. +14 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/BaseController.java
  172. +113 −0 ...er-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/BaseController_Roo_Controller.aj
  173. +96 −0 .../pizzashop-layered/src/main/java/com/springsource/pizzashop/BaseController_Roo_Controller_Json.aj
  174. +14 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/PizzaController.java
  175. +133 −0 ...r-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller.aj
  176. +96 −0 ...pizzashop-layered/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller_Json.aj
  177. +14 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/PizzaOrderController.java
  178. +143 −0 ...pizzashop-layered/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller.aj
  179. +96 −0 ...shop-layered/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller_Json.aj
  180. +14 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/ToppingController.java
  181. +113 −0 ...01/pizzashop-layered/src/main/java/com/springsource/pizzashop/ToppingController_Roo_Controller.aj
  182. +96 −0 ...zzashop-layered/src/main/java/com/springsource/pizzashop/ToppingController_Roo_Controller_Json.aj
  183. +19 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Base.java
  184. +18 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Base_Roo_JavaBean.aj
  185. +44 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Jpa_Entity.aj
  186. +32 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Json.aj
  187. +18 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Base_Roo_ToString.aj
  188. +33 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Pizza.java
  189. +40 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrder.java
  190. +15 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk.java
  191. +12 −0 ...izzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk_Roo_Configurable.aj
  192. +63 −0 .../pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk_Roo_Identifier.aj
  193. +32 −0 ...ter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk_Roo_Json.aj
  194. +14 −0 ...izzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk_Roo_Serializable.aj
  195. +18 −0 ...01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk_Roo_ToString.aj
  196. +54 −0 ...r-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_JavaBean.aj
  197. +40 −0 ...01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Jpa_Entity.aj
  198. +32 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Json.aj
  199. +22 −0 ...r-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_ToString.aj
  200. +46 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_JavaBean.aj
  201. +44 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Jpa_Entity.aj
  202. +32 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_Json.aj
  203. +21 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Pizza_Roo_ToString.aj
  204. +19 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Topping.java
  205. +18 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_JavaBean.aj
  206. +44 −0 ...er-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Jpa_Entity.aj
  207. +32 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_Json.aj
  208. +18 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/domain/Topping_Roo_ToString.aj
  209. +8 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/repository/BaseRepository.java
  210. +20 −0 ...-layered/src/main/java/com/springsource/pizzashop/repository/BaseRepository_Roo_Jpa_Repository.aj
  211. +8 −0 ...1/pizzashop-layered/src/main/java/com/springsource/pizzashop/repository/PizzaOrderRepository.java
  212. +20 −0 ...ed/src/main/java/com/springsource/pizzashop/repository/PizzaOrderRepository_Roo_Jpa_Repository.aj
  213. +8 −0 ...ter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/repository/PizzaRepository.java
  214. +20 −0 ...layered/src/main/java/com/springsource/pizzashop/repository/PizzaRepository_Roo_Jpa_Repository.aj
  215. +8 −0 ...r-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/repository/ToppingRepository.java
  216. +20 −0 ...yered/src/main/java/com/springsource/pizzashop/repository/ToppingRepository_Roo_Jpa_Repository.aj
  217. +7 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/BaseService.java
  218. +5 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/BaseServiceImpl.java
  219. +51 −0 ...pizzashop-layered/src/main/java/com/springsource/pizzashop/service/BaseServiceImpl_Roo_Service.aj
  220. +19 −0 ...-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/BaseService_Roo_Service.aj
  221. +7 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaOrderService.java
  222. +5 −0 ...-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaOrderServiceImpl.java
  223. +51 −0 ...hop-layered/src/main/java/com/springsource/pizzashop/service/PizzaOrderServiceImpl_Roo_Service.aj
  224. +19 −0 ...zzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaOrderService_Roo_Service.aj
  225. +7 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaService.java
  226. +5 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaServiceImpl.java
  227. +51 −0 ...izzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaServiceImpl_Roo_Service.aj
  228. +19 −0 ...01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/PizzaService_Roo_Service.aj
  229. +7 −0 chapter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/ToppingService.java
  230. +5 −0 ...ter-01/pizzashop-layered/src/main/java/com/springsource/pizzashop/service/ToppingServiceImpl.java
  231. +51 −0 ...zashop-layered/src/main/java/com/springsource/pizzashop/service/ToppingServiceImpl_Roo_Service.aj
  232. +19 −0 .../pizzashop-layered/src/main/java/com/springsource/pizzashop/service/ToppingService_Roo_Service.aj
  233. +18 −0 ...layered/src/main/java/com/springsource/pizzashop/web/ApplicationConversionServiceFactoryBean.java
  234. +173 −0 ...a/com/springsource/pizzashop/web/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj
  235. +13 −0 chapter-01/pizzashop-layered/src/main/resources/META-INF/persistence.xml
  236. +7 −0 chapter-01/pizzashop-layered/src/main/resources/META-INF/spring/applicationContext-jpa.xml
  237. +70 −0 chapter-01/pizzashop-layered/src/main/resources/META-INF/spring/applicationContext.xml
  238. +6 −0 chapter-01/pizzashop-layered/src/main/resources/META-INF/spring/database.properties
  239. +17 −0 chapter-01/pizzashop-layered/src/main/resources/log4j.properties
  240. +3 −0 chapter-01/pizzashop-layered/src/main/webapp/META-INF/MANIFEST.MF
  241. +1 −0 chapter-01/pizzashop-layered/src/main/webapp/WEB-INF/classes/alt.properties
  242. +1 −0 chapter-01/pizzashop-layered/src/main/webapp/WEB-INF/classes/standard.properties
  243. +44 −0 chapter-01/pizzashop-layered/src/main/webapp/WEB-INF/i18n/application.properties
Sorry, we could not display the entire diff because too many files (1,914) changed.
9 .gitignore
@@ -0,0 +1,9 @@
+target
+*.class
+*.ipr
+*.iws
+.classpath
+.project
+.eclipse
+log.roo
+
4 build_all.sh
@@ -0,0 +1,4 @@
+cd chapter-01
+./build_all.sh
+cd ..
+
8 chapter-01/build_all.sh
@@ -0,0 +1,8 @@
+cd pizzashop-layered
+roo quit
+mvn package
+cd ..
+cd pizzashop-activerecord
+roo quit
+mvn package
+cd ..
12 chapter-01/pizzashop-activerecord/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/webapp"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
43 chapter-01/pizzashop-activerecord/.settings/org.eclipse.ajdt.core.prefs
@@ -0,0 +1,43 @@
+#Sun Oct 02 06:35:35 EDT 2011
+eclipse.preferences.version=1
+org.aspectj.ajdt.core.compiler.BuildOptions.showweavemessages=false
+org.aspectj.ajdt.core.compiler.lint.BrokeSerialVersionCompatibility=ignore
+org.aspectj.ajdt.core.compiler.lint.CannotImplementLazyTJP=ignore
+org.aspectj.ajdt.core.compiler.lint.InvalidAbsoluteTypeName=warning
+org.aspectj.ajdt.core.compiler.lint.NeedSerialVersionUIDField=ignore
+org.aspectj.ajdt.core.compiler.lint.NoInterfaceCtorJoinpoint=warning
+org.aspectj.ajdt.core.compiler.lint.ShadowNotInStructure=ignore
+org.aspectj.ajdt.core.compiler.lint.TypeNotExposedToWeaver=warning
+org.aspectj.ajdt.core.compiler.lint.UnresolvableMember=warning
+org.aspectj.ajdt.core.compiler.lint.WildcardTypeName=ignore
+org.aspectj.ajdt.core.compiler.lint.adviceDidNotMatch=warning
+org.aspectj.ajdt.core.compiler.lint.annotationAsTargetForDecpIgnored=warning
+org.aspectj.ajdt.core.compiler.lint.calculatingSerialVersionUID=ignore
+org.aspectj.ajdt.core.compiler.lint.cantFindType=error
+org.aspectj.ajdt.core.compiler.lint.cantFindTypeAffectingJPMatch=warning
+org.aspectj.ajdt.core.compiler.lint.cantMatchArrayTypeOnVarargs=ignore
+org.aspectj.ajdt.core.compiler.lint.elementAlreadyAnnotated=warning
+org.aspectj.ajdt.core.compiler.lint.enumAsTargetForDecpIgnored=warning
+org.aspectj.ajdt.core.compiler.lint.invalidTargetForAnnotation=warning
+org.aspectj.ajdt.core.compiler.lint.multipleAdviceStoppingLazyTjp=ignore
+org.aspectj.ajdt.core.compiler.lint.noExplicitConstructorCall=warning
+org.aspectj.ajdt.core.compiler.lint.noGuardForLazyTjp=ignore
+org.aspectj.ajdt.core.compiler.lint.noJoinpointsForBridgeMethods=warning
+org.aspectj.ajdt.core.compiler.lint.runtimeExceptionNotSoftened=warning
+org.aspectj.ajdt.core.compiler.lint.swallowedExceptionInCatchBlock=ignore
+org.aspectj.ajdt.core.compiler.lint.uncheckedAdviceConversion=warning
+org.aspectj.ajdt.core.compiler.lint.uncheckedArgument=warning
+org.aspectj.ajdt.core.compiler.lint.unmatchedTargetKind=warning
+org.aspectj.ajdt.core.compiler.lint.unorderedAdviceAtShadow=ignore
+org.aspectj.ajdt.core.compiler.list.UnmatchedSuperTypeInCall=warning
+org.aspectj.ajdt.core.compiler.weaver.XHasMember=false
+org.aspectj.ajdt.core.compiler.weaver.XNoInline=false
+org.aspectj.ajdt.core.compiler.weaver.XNotReweavable=false
+org.aspectj.ajdt.core.compiler.weaver.XSerializableAspects=false
+org.aspectj.ajdt.core.compiler.weaver.outxml=true
+org.aspectj.ajdt.core.compiler.weaver.timers=false
+org.aspectj.ajdt.core.compiler.weaver.verbose=false
+org.aspectj.ajdt.core.complier.lint.aspectExcludedByConfiguration=ignore
+org.eclipse.ajdt.core.builder.incrementalCompilationOptimizations=true
+org.eclipse.ajdt.core.compiler.nonStandardOptions=
+org.eclipse.ajdt.core.compiler.useProjectSettings=true
9 chapter-01/pizzashop-activerecord/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+#Sun Oct 02 06:35:33 EDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
10 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="pizzashop-activerecord">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+ <property name="context-root" value="pizzashop-activerecord"/>
+ <property name="java-output-path" value="/pizzashop-activerecord/target/classes"/>
+ </wb-module>
+</project-modules>
7 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="wst.jsdt.web"/>
+ <installed facet="java" version="1.6"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>
1 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
1 chapter-01/pizzashop-activerecord/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
8 chapter-01/pizzashop-activerecord/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,8 @@
+#Sun Oct 02 06:35:30 EDT 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
48 chapter-01/pizzashop-activerecord/pizzashopactiverecord.roo
@@ -0,0 +1,48 @@
+// Create a new project
+project com.springsource.pizzashop
+
+// Setup JPA persistence using EclipseLink and H2
+jpa setup --provider ECLIPSELINK --database H2_IN_MEMORY
+
+// Create domain entities
+entity --class ~.domain.Base --testAutomatically
+field string --fieldName name --sizeMin 2 --notNull
+
+entity --class ~.domain.Topping --testAutomatically
+field string --fieldName name --sizeMin 2 --notNull
+
+entity --class ~.domain.Pizza --testAutomatically
+field string --fieldName name --notNull --sizeMin 2
+field number --fieldName price --type java.math.BigDecimal
+field set --fieldName toppings --type ~.domain.Topping
+field reference --fieldName base --type ~.domain.Base
+
+entity --class ~.domain.PizzaOrder --testAutomatically --identifierType ~.domain.PizzaOrderPk
+field string --fieldName name --notNull --sizeMin 2
+field string --fieldName address --sizeMax 30
+field number --fieldName total --type java.math.BigDecimal
+field date --fieldName deliveryDate --type java.util.Date
+field set --fieldName pizzas --type ~.domain.Pizza
+
+field string --fieldName shopCountry --class ~.domain.PizzaOrderPk
+field string --fieldName shopCity
+field string --fieldName shopName
+
+// Offer JSON remoting for all domain types trough Spring MVC
+json all --deepSerialize
+web mvc json setup
+web mvc json all
+
+web mvc setup
+web mvc all --package ~.web
+
+// Example scripts for JSON remoting:
+// curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{name: "Thin Crust"}' http://localhost:8080/pizzashop/bases
+// curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '[{name: "Cheesy Crust"},{name: "Thick Crust"}]' http://localhost:8080/pizzashop/bases/jsonArray
+// curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '[{name: "Fresh Tomato"},{name: "Prawns"},{name: "Mozarella"},{name: "Bogus"}]' http://localhost:8080/pizzashop/toppings/jsonArray
+// curl -i -X DELETE -H "Accept: application/json" http://localhost:8080/pizzashop/toppings/7
+// curl -i -X PUT -H "Content-Type: application/json" -H "Accept: application/json" -d '{id:6,name:"Mozzarella",version:1}' http://localhost:8080/pizzashop/toppings
+// curl -i -H "Accept: application/json" http://localhost:8080/pizzashop/toppings
+// curl -i -H "Accept: application/json" http://localhost:8080/pizzashop/toppings/6
+// curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{name:"Napolitana",price:7.5,base:{id:1},toppings:[{name: "Anchovy fillets"},{name: "Mozzarella"}]}' http://localhost:8080/pizzashop/pizzas
+// curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{name:"Stefan",total:7.5,address:"Sydney, AU",deliveryDate:1314595427866,id:{shopCountry:"AU",shopCity:"Sydney",shopName:"Pizza Pan 1"},pizzas:[{id:8,version:1}]}' http://localhost:8080/pizzashop/pizzaorders
512 chapter-01/pizzashop-activerecord/pom.xml
@@ -0,0 +1,512 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>com.springsource.pizzashop</groupId>
+ <artifactId>pizzashop-activerecord</artifactId>
+ <packaging>war</packaging>
+ <version>0.1.0.BUILD-SNAPSHOT</version>
+ <name>ActiveRecord Pizza Shop</name>
+ <properties>
+ <aspectj.version>1.6.12.M2</aspectj.version>
+ <java.version>1.6</java.version>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <roo.version>1.2.0.M1</roo.version>
+ <slf4j.version>1.6.2</slf4j.version>
+ <spring.version>3.0.6.RELEASE</spring.version>
+ </properties>
+ <repositories>
+ <repository>
+ <id>spring-maven-release</id>
+ <name>Spring Maven Release Repository</name>
+ <url>http://maven.springframework.org/release</url>
+ </repository>
+ <repository>
+ <id>spring-maven-milestone</id>
+ <name>Spring Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ </repository>
+ <repository>
+ <id>spring-roo-repository</id>
+ <name>Spring Roo Repository</name>
+ <url>http://spring-roo-repository.springsource.org/release</url>
+ </repository>
+ <repository>
+ <id>EclipseLink Repo</id>
+ <url>http://mirrors.ibiblio.org/pub/mirrors/eclipse/rt/eclipselink/maven.repo</url>
+ <name>EclipseLink Repo</name>
+ </repository>
+ <repository>
+ <id>JBoss Repo</id>
+ <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
+ <name>JBoss Repo</name>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>spring-maven-release</id>
+ <name>Spring Maven Release Repository</name>
+ <url>http://maven.springframework.org/release</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>spring-maven-milestone</id>
+ <name>Spring Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ </pluginRepository>
+ <pluginRepository>
+ <id>spring-roo-repository</id>
+ <name>Spring Roo Repository</name>
+ <url>http://spring-roo-repository.springsource.org/release</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <dependencies>
+ <!-- General dependencies for standard applications -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.9</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${aspectj.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjweaver</artifactId>
+ <version>${aspectj.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.flexjson</groupId>
+ <artifactId>flexjson</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <!-- ROO dependencies -->
+ <dependency>
+ <groupId>org.springframework.roo</groupId>
+ <artifactId>org.springframework.roo.annotations</artifactId>
+ <version>${roo.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- Spring dependencies -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.2.0.Final</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <version>2.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.5.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xerces</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-js-resources</artifactId>
+ <version>2.2.1.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp.jstl</groupId>
+ <artifactId>jstl-api</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>jstl-impl</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tiles</groupId>
+ <artifactId>tiles-core</artifactId>
+ <version>2.2.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tiles</groupId>
+ <artifactId>tiles-jsp</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>3.6.7.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.6.7.Final</version>
+ <exclusions>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <version>1.0.1.Final</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <!-- <configuration> <webXml>target/web.xml</webXml> </configuration> -->
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>aspectj-maven-plugin</artifactId>
+ <version>1.2</version>
+ <!-- NB: do use 1.3 or 1.3.x due to MASPECTJ-90 - wait for 1.4 -->
+ <dependencies>
+ <!-- NB: You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${aspectj.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjtools</artifactId>
+ <version>${aspectj.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>test-compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <outxml>true</outxml>
+ <aspectLibraries>
+ <aspectLibrary>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aspects</artifactId>
+ </aspectLibrary>
+ </aspectLibraries>
+ <source>${java.version}</source>
+ <target>${java.version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.9</version>
+ <configuration>
+ <printSummary>false</printSummary>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <excludes>
+ <exclude>**/*_Roo_*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.7</version>
+ </plugin>
+ <!-- IDE -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.7</version>
+ <!-- Note 2.8 does not work with AspectJ aspect path -->
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>false</downloadJavadocs>
+ <wtpversion>2.0</wtpversion>
+ <additionalBuildcommands>
+ <buildCommand>
+ <name>org.eclipse.ajdt.core.ajbuilder</name>
+ <arguments>
+ <aspectPath>org.springframework.aspects</aspectPath>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ </buildCommand>
+ </additionalBuildcommands>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.ajdt.ui.ajnature</projectnature>
+ <projectnature>com.springsource.sts.roo.core.nature</projectnature>
+ <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
+ </additionalProjectnatures>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-idea-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <dependenciesAsLibraries>true</dependenciesAsLibraries>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>8.0.1.v20110908</version>
+ <configuration>
+ <webAppConfig>
+ <contextPath>/${project.name}</contextPath>
+ </webAppConfig>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
13 ...er-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/BaseController.java
@@ -0,0 +1,13 @@
+package com.springsource.pizzashop;
+
+import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import com.springsource.pizzashop.domain.Base;
+
+@Controller
+@RequestMapping("/bases")
+@RooWebScaffold(path = "bases", formBackingObject = Base.class, exposeJson = true)
+public class BaseController {
+}
108 ...op-activerecord/src/main/java/com/springsource/pizzashop/BaseController_Roo_Controller.aj
@@ -0,0 +1,108 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop;
+
+import com.springsource.pizzashop.domain.Base;
+import java.io.UnsupportedEncodingException;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.Collection;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.WebUtils;
+
+privileged aspect BaseController_Roo_Controller {
+
+ @RequestMapping(method = RequestMethod.POST)
+ public String BaseController.create(@Valid Base base, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("base", base);
+ return "bases/create";
+ }
+ uiModel.asMap().clear();
+ base.persist();
+ return "redirect:/bases/" + encodeUrlPathSegment(base.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(params = "form", method = RequestMethod.GET)
+ public String BaseController.createForm(Model uiModel) {
+ uiModel.addAttribute("base", new Base());
+ return "bases/create";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ public String BaseController.show(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("base", Base.findBase(id));
+ uiModel.addAttribute("itemId", id);
+ return "bases/show";
+ }
+
+ @RequestMapping(method = RequestMethod.GET)
+ public String BaseController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ if (page != null || size != null) {
+ int sizeNo = size == null ? 10 : size.intValue();
+ final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;
+ uiModel.addAttribute("bases", Base.findBaseEntries(firstResult, sizeNo));
+ float nrOfPages = (float) Base.countBases() / sizeNo;
+ uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
+ } else {
+ uiModel.addAttribute("bases", Base.findAllBases());
+ }
+ return "bases/list";
+ }
+
+ @RequestMapping(method = RequestMethod.PUT)
+ public String BaseController.update(@Valid Base base, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("base", base);
+ return "bases/update";
+ }
+ uiModel.asMap().clear();
+ base.merge();
+ return "redirect:/bases/" + encodeUrlPathSegment(base.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
+ public String BaseController.updateForm(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("base", Base.findBase(id));
+ return "bases/update";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
+ public String BaseController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ Base base = Base.findBase(id);
+ base.remove();
+ uiModel.asMap().clear();
+ uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
+ uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
+ return "redirect:/bases";
+ }
+
+ @ModelAttribute("bases")
+ public Collection<Base> BaseController.populateBases() {
+ return Base.findAllBases();
+ }
+
+ String BaseController.encodeUrlPathSegment(String pathSegment, HttpServletRequest httpServletRequest) {
+ String enc = httpServletRequest.getCharacterEncoding();
+ if (enc == null) {
+ enc = WebUtils.DEFAULT_CHARACTER_ENCODING;
+ }
+ try {
+ pathSegment = UriUtils.encodePathSegment(pathSegment, enc);
+ }
+ catch (UnsupportedEncodingException uee) {}
+ return pathSegment;
+ }
+
+}
13 ...r-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/PizzaController.java
@@ -0,0 +1,13 @@
+package com.springsource.pizzashop;
+
+import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import com.springsource.pizzashop.domain.Pizza;
+
+@Controller
+@RequestMapping("/pizzas")
+@RooWebScaffold(path = "pizzas", formBackingObject = Pizza.class, exposeJson = true)
+public class PizzaController {
+}
120 ...p-activerecord/src/main/java/com/springsource/pizzashop/PizzaController_Roo_Controller.aj
@@ -0,0 +1,120 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop;
+
+import com.springsource.pizzashop.domain.Base;
+import com.springsource.pizzashop.domain.Pizza;
+import com.springsource.pizzashop.domain.Topping;
+import java.io.UnsupportedEncodingException;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.Collection;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.WebUtils;
+
+privileged aspect PizzaController_Roo_Controller {
+
+ @RequestMapping(method = RequestMethod.POST)
+ public String PizzaController.create(@Valid Pizza pizza, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("pizza", pizza);
+ return "pizzas/create";
+ }
+ uiModel.asMap().clear();
+ pizza.persist();
+ return "redirect:/pizzas/" + encodeUrlPathSegment(pizza.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(params = "form", method = RequestMethod.GET)
+ public String PizzaController.createForm(Model uiModel) {
+ uiModel.addAttribute("pizza", new Pizza());
+ return "pizzas/create";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ public String PizzaController.show(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("pizza", Pizza.findPizza(id));
+ uiModel.addAttribute("itemId", id);
+ return "pizzas/show";
+ }
+
+ @RequestMapping(method = RequestMethod.GET)
+ public String PizzaController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ if (page != null || size != null) {
+ int sizeNo = size == null ? 10 : size.intValue();
+ final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;
+ uiModel.addAttribute("pizzas", Pizza.findPizzaEntries(firstResult, sizeNo));
+ float nrOfPages = (float) Pizza.countPizzas() / sizeNo;
+ uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
+ } else {
+ uiModel.addAttribute("pizzas", Pizza.findAllPizzas());
+ }
+ return "pizzas/list";
+ }
+
+ @RequestMapping(method = RequestMethod.PUT)
+ public String PizzaController.update(@Valid Pizza pizza, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("pizza", pizza);
+ return "pizzas/update";
+ }
+ uiModel.asMap().clear();
+ pizza.merge();
+ return "redirect:/pizzas/" + encodeUrlPathSegment(pizza.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
+ public String PizzaController.updateForm(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("pizza", Pizza.findPizza(id));
+ return "pizzas/update";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
+ public String PizzaController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ Pizza pizza = Pizza.findPizza(id);
+ pizza.remove();
+ uiModel.asMap().clear();
+ uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
+ uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
+ return "redirect:/pizzas";
+ }
+
+ @ModelAttribute("bases")
+ public Collection<Base> PizzaController.populateBases() {
+ return Base.findAllBases();
+ }
+
+ @ModelAttribute("pizzas")
+ public Collection<Pizza> PizzaController.populatePizzas() {
+ return Pizza.findAllPizzas();
+ }
+
+ @ModelAttribute("toppings")
+ public Collection<Topping> PizzaController.populateToppings() {
+ return Topping.findAllToppings();
+ }
+
+ String PizzaController.encodeUrlPathSegment(String pathSegment, HttpServletRequest httpServletRequest) {
+ String enc = httpServletRequest.getCharacterEncoding();
+ if (enc == null) {
+ enc = WebUtils.DEFAULT_CHARACTER_ENCODING;
+ }
+ try {
+ pathSegment = UriUtils.encodePathSegment(pathSegment, enc);
+ }
+ catch (UnsupportedEncodingException uee) {}
+ return pathSegment;
+ }
+
+}
13 ...pizzashop-activerecord/src/main/java/com/springsource/pizzashop/PizzaOrderController.java
@@ -0,0 +1,13 @@
+package com.springsource.pizzashop;
+
+import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import com.springsource.pizzashop.domain.PizzaOrder;
+
+@Controller
+@RequestMapping("/pizzaorders")
+@RooWebScaffold(path = "pizzaorders", formBackingObject = PizzaOrder.class, exposeJson = true)
+public class PizzaOrderController {
+}
126 ...iverecord/src/main/java/com/springsource/pizzashop/PizzaOrderController_Roo_Controller.aj
@@ -0,0 +1,126 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop;
+
+import com.springsource.pizzashop.domain.Pizza;
+import com.springsource.pizzashop.domain.PizzaOrder;
+import java.io.UnsupportedEncodingException;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.Collection;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import org.joda.time.format.DateTimeFormat;
+import org.springframework.context.i18n.LocaleContextHolder;
+import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.WebUtils;
+
+privileged aspect PizzaOrderController_Roo_Controller {
+
+ @RequestMapping(method = RequestMethod.POST)
+ public String PizzaOrderController.create(@Valid PizzaOrder pizzaOrder, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("pizzaOrder", pizzaOrder);
+ addDateTimeFormatPatterns(uiModel);
+ return "pizzaorders/create";
+ }
+ uiModel.asMap().clear();
+ pizzaOrder.persist();
+ return "redirect:/pizzaorders/" + encodeUrlPathSegment(pizzaOrder.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(params = "form", method = RequestMethod.GET)
+ public String PizzaOrderController.createForm(Model uiModel) {
+ uiModel.addAttribute("pizzaOrder", new PizzaOrder());
+ addDateTimeFormatPatterns(uiModel);
+ return "pizzaorders/create";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ public String PizzaOrderController.show(@PathVariable("id") Long id, Model uiModel) {
+ addDateTimeFormatPatterns(uiModel);
+ uiModel.addAttribute("pizzaorder", PizzaOrder.findPizzaOrder(id));
+ uiModel.addAttribute("itemId", id);
+ return "pizzaorders/show";
+ }
+
+ @RequestMapping(method = RequestMethod.GET)
+ public String PizzaOrderController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ if (page != null || size != null) {
+ int sizeNo = size == null ? 10 : size.intValue();
+ final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;
+ uiModel.addAttribute("pizzaorders", PizzaOrder.findPizzaOrderEntries(firstResult, sizeNo));
+ float nrOfPages = (float) PizzaOrder.countPizzaOrders() / sizeNo;
+ uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
+ } else {
+ uiModel.addAttribute("pizzaorders", PizzaOrder.findAllPizzaOrders());
+ }
+ addDateTimeFormatPatterns(uiModel);
+ return "pizzaorders/list";
+ }
+
+ @RequestMapping(method = RequestMethod.PUT)
+ public String PizzaOrderController.update(@Valid PizzaOrder pizzaOrder, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("pizzaOrder", pizzaOrder);
+ addDateTimeFormatPatterns(uiModel);
+ return "pizzaorders/update";
+ }
+ uiModel.asMap().clear();
+ pizzaOrder.merge();
+ return "redirect:/pizzaorders/" + encodeUrlPathSegment(pizzaOrder.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
+ public String PizzaOrderController.updateForm(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("pizzaOrder", PizzaOrder.findPizzaOrder(id));
+ addDateTimeFormatPatterns(uiModel);
+ return "pizzaorders/update";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
+ public String PizzaOrderController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ PizzaOrder pizzaOrder = PizzaOrder.findPizzaOrder(id);
+ pizzaOrder.remove();
+ uiModel.asMap().clear();
+ uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
+ uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
+ return "redirect:/pizzaorders";
+ }
+
+ @ModelAttribute("pizzas")
+ public Collection<Pizza> PizzaOrderController.populatePizzas() {
+ return Pizza.findAllPizzas();
+ }
+
+ @ModelAttribute("pizzaorders")
+ public Collection<PizzaOrder> PizzaOrderController.populatePizzaOrders() {
+ return PizzaOrder.findAllPizzaOrders();
+ }
+
+ void PizzaOrderController.addDateTimeFormatPatterns(Model uiModel) {
+ uiModel.addAttribute("pizzaOrder_deliverydate_date_format", DateTimeFormat.patternForStyle("M-", LocaleContextHolder.getLocale()));
+ }
+
+ String PizzaOrderController.encodeUrlPathSegment(String pathSegment, HttpServletRequest httpServletRequest) {
+ String enc = httpServletRequest.getCharacterEncoding();
+ if (enc == null) {
+ enc = WebUtils.DEFAULT_CHARACTER_ENCODING;
+ }
+ try {
+ pathSegment = UriUtils.encodePathSegment(pathSegment, enc);
+ }
+ catch (UnsupportedEncodingException uee) {}
+ return pathSegment;
+ }
+
+}
13 ...01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/ToppingController.java
@@ -0,0 +1,13 @@
+package com.springsource.pizzashop;
+
+import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import com.springsource.pizzashop.domain.Topping;
+
+@Controller
+@RequestMapping("/toppings")
+@RooWebScaffold(path = "toppings", formBackingObject = Topping.class, exposeJson = true)
+public class ToppingController {
+}
108 ...activerecord/src/main/java/com/springsource/pizzashop/ToppingController_Roo_Controller.aj
@@ -0,0 +1,108 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop;
+
+import com.springsource.pizzashop.domain.Topping;
+import java.io.UnsupportedEncodingException;
+import java.lang.Integer;
+import java.lang.Long;
+import java.lang.String;
+import java.util.Collection;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.WebUtils;
+
+privileged aspect ToppingController_Roo_Controller {
+
+ @RequestMapping(method = RequestMethod.POST)
+ public String ToppingController.create(@Valid Topping topping, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("topping", topping);
+ return "toppings/create";
+ }
+ uiModel.asMap().clear();
+ topping.persist();
+ return "redirect:/toppings/" + encodeUrlPathSegment(topping.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(params = "form", method = RequestMethod.GET)
+ public String ToppingController.createForm(Model uiModel) {
+ uiModel.addAttribute("topping", new Topping());
+ return "toppings/create";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ public String ToppingController.show(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("topping", Topping.findTopping(id));
+ uiModel.addAttribute("itemId", id);
+ return "toppings/show";
+ }
+
+ @RequestMapping(method = RequestMethod.GET)
+ public String ToppingController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ if (page != null || size != null) {
+ int sizeNo = size == null ? 10 : size.intValue();
+ final int firstResult = page == null ? 0 : (page.intValue() - 1) * sizeNo;
+ uiModel.addAttribute("toppings", Topping.findToppingEntries(firstResult, sizeNo));
+ float nrOfPages = (float) Topping.countToppings() / sizeNo;
+ uiModel.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages));
+ } else {
+ uiModel.addAttribute("toppings", Topping.findAllToppings());
+ }
+ return "toppings/list";
+ }
+
+ @RequestMapping(method = RequestMethod.PUT)
+ public String ToppingController.update(@Valid Topping topping, BindingResult bindingResult, Model uiModel, HttpServletRequest httpServletRequest) {
+ if (bindingResult.hasErrors()) {
+ uiModel.addAttribute("topping", topping);
+ return "toppings/update";
+ }
+ uiModel.asMap().clear();
+ topping.merge();
+ return "redirect:/toppings/" + encodeUrlPathSegment(topping.getId().toString(), httpServletRequest);
+ }
+
+ @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET)
+ public String ToppingController.updateForm(@PathVariable("id") Long id, Model uiModel) {
+ uiModel.addAttribute("topping", Topping.findTopping(id));
+ return "toppings/update";
+ }
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
+ public String ToppingController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {
+ Topping topping = Topping.findTopping(id);
+ topping.remove();
+ uiModel.asMap().clear();
+ uiModel.addAttribute("page", (page == null) ? "1" : page.toString());
+ uiModel.addAttribute("size", (size == null) ? "10" : size.toString());
+ return "redirect:/toppings";
+ }
+
+ @ModelAttribute("toppings")
+ public Collection<Topping> ToppingController.populateToppings() {
+ return Topping.findAllToppings();
+ }
+
+ String ToppingController.encodeUrlPathSegment(String pathSegment, HttpServletRequest httpServletRequest) {
+ String enc = httpServletRequest.getCharacterEncoding();
+ if (enc == null) {
+ enc = WebUtils.DEFAULT_CHARACTER_ENCODING;
+ }
+ try {
+ pathSegment = UriUtils.encodePathSegment(pathSegment, enc);
+ }
+ catch (UnsupportedEncodingException uee) {}
+ return pathSegment;
+ }
+
+}
19 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base.java
@@ -0,0 +1,19 @@
+package com.springsource.pizzashop.domain;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import org.springframework.roo.addon.entity.RooEntity;
+import org.springframework.roo.addon.javabean.RooJavaBean;
+import org.springframework.roo.addon.json.RooJson;
+import org.springframework.roo.addon.tostring.RooToString;
+
+@RooJavaBean
+@RooToString
+@RooEntity
+@RooJson(deepSerialize = true)
+public class Base {
+
+ @NotNull
+ @Size(min = 2)
+ private String name;
+}
12 ...hop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Configurable.aj
@@ -0,0 +1,12 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import org.springframework.beans.factory.annotation.Configurable;
+
+privileged aspect Base_Roo_Configurable {
+
+ declare @type: Base: @Configurable;
+
+}
78 ...pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Entity.aj
@@ -0,0 +1,78 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import com.springsource.pizzashop.domain.Base;
+import java.lang.Long;
+import java.util.List;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import org.springframework.transaction.annotation.Transactional;
+
+privileged aspect Base_Roo_Entity {
+
+ @PersistenceContext
+ transient EntityManager Base.entityManager;
+
+ @Transactional
+ public void Base.persist() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.persist(this);
+ }
+
+ @Transactional
+ public void Base.remove() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ if (this.entityManager.contains(this)) {
+ this.entityManager.remove(this);
+ } else {
+ Base attached = Base.findBase(this.id);
+ this.entityManager.remove(attached);
+ }
+ }
+
+ @Transactional
+ public void Base.flush() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.flush();
+ }
+
+ @Transactional
+ public void Base.clear() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.clear();
+ }
+
+ @Transactional
+ public Base Base.merge() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ Base merged = this.entityManager.merge(this);
+ this.entityManager.flush();
+ return merged;
+ }
+
+ public static final EntityManager Base.entityManager() {
+ EntityManager em = new Base().entityManager;
+ if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
+ return em;
+ }
+
+ public static long Base.countBases() {
+ return entityManager().createQuery("SELECT COUNT(o) FROM Base o", Long.class).getSingleResult();
+ }
+
+ public static List<Base> Base.findAllBases() {
+ return entityManager().createQuery("SELECT o FROM Base o", Base.class).getResultList();
+ }
+
+ public static Base Base.findBase(Long id) {
+ if (id == null) return null;
+ return entityManager().find(Base.class, id);
+ }
+
+ public static List<Base> Base.findBaseEntries(int firstResult, int maxResults) {
+ return entityManager().createQuery("SELECT o FROM Base o", Base.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
+ }
+
+}
18 ...zzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_JavaBean.aj
@@ -0,0 +1,18 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import java.lang.String;
+
+privileged aspect Base_Roo_JavaBean {
+
+ public String Base.getName() {
+ return this.name;
+ }
+
+ public void Base.setName(String name) {
+ this.name = name;
+ }
+
+}
44 ...ashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Jpa_Entity.aj
@@ -0,0 +1,44 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import java.lang.Integer;
+import java.lang.Long;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+privileged aspect Base_Roo_Jpa_Entity {
+
+ declare @type: Base: @Entity;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ @Column(name = "id")
+ private Long Base.id;
+
+ @Version
+ @Column(name = "version")
+ private Integer Base.version;
+
+ public Long Base.getId() {
+ return this.id;
+ }
+
+ public void Base.setId(Long id) {
+ this.id = id;
+ }
+
+ public Integer Base.getVersion() {
+ return this.version;
+ }
+
+ public void Base.setVersion(Integer version) {
+ this.version = version;
+ }
+
+}
32 ...1/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_Json.aj
@@ -0,0 +1,32 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import com.springsource.pizzashop.domain.Base;
+import flexjson.JSONDeserializer;
+import flexjson.JSONSerializer;
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+privileged aspect Base_Roo_Json {
+
+ public String Base.toJson() {
+ return new JSONSerializer().exclude("*.class").deepSerialize(this);
+ }
+
+ public static Base Base.fromJsonToBase(String json) {
+ return new JSONDeserializer<Base>().use(null, Base.class).deserialize(json);
+ }
+
+ public static String Base.toJsonArray(Collection<Base> collection) {
+ return new JSONSerializer().exclude("*.class").deepSerialize(collection);
+ }
+
+ public static Collection<Base> Base.fromJsonArrayToBases(String json) {
+ return new JSONDeserializer<List<Base>>().use(null, ArrayList.class).use("values", Base.class).deserialize(json);
+ }
+
+}
18 ...zzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Base_Roo_ToString.aj
@@ -0,0 +1,18 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import java.lang.String;
+
+privileged aspect Base_Roo_ToString {
+
+ public String Base.toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Id: ").append(getId()).append(", ");
+ sb.append("Name: ").append(getName()).append(", ");
+ sb.append("Version: ").append(getVersion());
+ return sb.toString();
+ }
+
+}
33 chapter-01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/Pizza.java
@@ -0,0 +1,33 @@
+package com.springsource.pizzashop.domain;
+
+import java.math.BigDecimal;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import org.springframework.roo.addon.entity.RooEntity;
+import org.springframework.roo.addon.javabean.RooJavaBean;
+import org.springframework.roo.addon.json.RooJson;
+import org.springframework.roo.addon.tostring.RooToString;
+
+@RooJavaBean
+@RooToString
+@RooEntity
+@RooJson(deepSerialize = true)
+public class Pizza {
+
+ @NotNull
+ @Size(min = 2)
+ private String name;
+
+ private BigDecimal price;
+
+ @ManyToMany(cascade = CascadeType.ALL)
+ private Set<Topping> toppings = new HashSet<Topping>();
+
+ @ManyToOne
+ private Base base;
+}
45 ...01/pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder.java
@@ -0,0 +1,45 @@
+package com.springsource.pizzashop.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.CascadeType;
+import javax.persistence.ManyToMany;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.springframework.roo.addon.entity.RooEntity;
+import org.springframework.roo.addon.javabean.RooJavaBean;
+import org.springframework.roo.addon.json.RooJson;
+import org.springframework.roo.addon.tostring.RooToString;
+
+@RooJavaBean
+@RooToString
+@RooEntity(/*identifierType = PizzaOrderPk.class*/)
+@RooJson(deepSerialize = true)
+public class PizzaOrder {
+
+ private String shopCountry;
+
+ private String shopCity;
+
+ private String shopName;
+ @NotNull
+ @Size(min = 2)
+ private String name;
+
+ @Size(max = 30)
+ private String address;
+
+ private BigDecimal total;
+
+ @Temporal(TemporalType.TIMESTAMP)
+ @DateTimeFormat(style = "M-")
+ private Date deliveryDate;
+
+ @ManyToMany(cascade = CascadeType.ALL)
+ private Set<Pizza> pizzas = new HashSet<Pizza>();
+}
15 .../pizzashop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrderPk.java
@@ -0,0 +1,15 @@
+package com.springsource.pizzashop.domain;
+
+import org.springframework.roo.addon.entity.RooIdentifier;
+import org.springframework.roo.addon.tostring.RooToString;
+
+//@RooToString
+//@RooIdentifier
+public final class PizzaOrderPk {
+
+ private String shopCountry;
+
+ private String shopCity;
+
+ private String shopName;
+}
12 ...tiverecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Configurable.aj
@@ -0,0 +1,12 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import org.springframework.beans.factory.annotation.Configurable;
+
+privileged aspect PizzaOrder_Roo_Configurable {
+
+ declare @type: PizzaOrder: @Configurable;
+
+}
78 ...hop-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Entity.aj
@@ -0,0 +1,78 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import com.springsource.pizzashop.domain.PizzaOrder;
+import java.lang.Long;
+import java.util.List;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import org.springframework.transaction.annotation.Transactional;
+
+privileged aspect PizzaOrder_Roo_Entity {
+
+ @PersistenceContext
+ transient EntityManager PizzaOrder.entityManager;
+
+ @Transactional
+ public void PizzaOrder.persist() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.persist(this);
+ }
+
+ @Transactional
+ public void PizzaOrder.remove() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ if (this.entityManager.contains(this)) {
+ this.entityManager.remove(this);
+ } else {
+ PizzaOrder attached = PizzaOrder.findPizzaOrder(this.id);
+ this.entityManager.remove(attached);
+ }
+ }
+
+ @Transactional
+ public void PizzaOrder.flush() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.flush();
+ }
+
+ @Transactional
+ public void PizzaOrder.clear() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ this.entityManager.clear();
+ }
+
+ @Transactional
+ public PizzaOrder PizzaOrder.merge() {
+ if (this.entityManager == null) this.entityManager = entityManager();
+ PizzaOrder merged = this.entityManager.merge(this);
+ this.entityManager.flush();
+ return merged;
+ }
+
+ public static final EntityManager PizzaOrder.entityManager() {
+ EntityManager em = new PizzaOrder().entityManager;
+ if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
+ return em;
+ }
+
+ public static long PizzaOrder.countPizzaOrders() {
+ return entityManager().createQuery("SELECT COUNT(o) FROM PizzaOrder o", Long.class).getSingleResult();
+ }
+
+ public static List<PizzaOrder> PizzaOrder.findAllPizzaOrders() {
+ return entityManager().createQuery("SELECT o FROM PizzaOrder o", PizzaOrder.class).getResultList();
+ }
+
+ public static PizzaOrder PizzaOrder.findPizzaOrder(Long id) {
+ if (id == null) return null;
+ return entityManager().find(PizzaOrder.class, id);
+ }
+
+ public static List<PizzaOrder> PizzaOrder.findPizzaOrderEntries(int firstResult, int maxResults) {
+ return entityManager().createQuery("SELECT o FROM PizzaOrder o", PizzaOrder.class).setFirstResult(firstResult).setMaxResults(maxResults).getResultList();
+ }
+
+}
78 ...p-activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_JavaBean.aj
@@ -0,0 +1,78 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import com.springsource.pizzashop.domain.Pizza;
+import java.lang.String;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Set;
+
+privileged aspect PizzaOrder_Roo_JavaBean {
+
+ public String PizzaOrder.getShopCountry() {
+ return this.shopCountry;
+ }
+
+ public void PizzaOrder.setShopCountry(String shopCountry) {
+ this.shopCountry = shopCountry;
+ }
+
+ public String PizzaOrder.getShopCity() {
+ return this.shopCity;
+ }
+
+ public void PizzaOrder.setShopCity(String shopCity) {
+ this.shopCity = shopCity;
+ }
+
+ public String PizzaOrder.getShopName() {
+ return this.shopName;
+ }
+
+ public void PizzaOrder.setShopName(String shopName) {
+ this.shopName = shopName;
+ }
+
+ public String PizzaOrder.getName() {
+ return this.name;
+ }
+
+ public void PizzaOrder.setName(String name) {
+ this.name = name;
+ }
+
+ public String PizzaOrder.getAddress() {
+ return this.address;
+ }
+
+ public void PizzaOrder.setAddress(String address) {
+ this.address = address;
+ }
+
+ public BigDecimal PizzaOrder.getTotal() {
+ return this.total;
+ }
+
+ public void PizzaOrder.setTotal(BigDecimal total) {
+ this.total = total;
+ }
+
+ public Date PizzaOrder.getDeliveryDate() {
+ return this.deliveryDate;
+ }
+
+ public void PizzaOrder.setDeliveryDate(Date deliveryDate) {
+ this.deliveryDate = deliveryDate;
+ }
+
+ public Set<Pizza> PizzaOrder.getPizzas() {
+ return this.pizzas;
+ }
+
+ public void PizzaOrder.setPizzas(Set<Pizza> pizzas) {
+ this.pizzas = pizzas;
+ }
+
+}
44 ...activerecord/src/main/java/com/springsource/pizzashop/domain/PizzaOrder_Roo_Jpa_Entity.aj
@@ -0,0 +1,44 @@
+// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
+// You may push code into the target .java compilation unit if you wish to edit any member(s).
+
+package com.springsource.pizzashop.domain;
+
+import java.lang.Integer;
+import java.lang.Long;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Version;
+