Implémentation code module "sale" dans la partie client. répercussion modif diagrammes Astah

This commit is contained in:
Notmoo-PC\Notmoo 2017-07-21 19:30:33 +02:00
parent e1dd5d0b61
commit 4a2d834690
12 changed files with 290 additions and 275 deletions

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="BookmarkManager">
<bookmark url="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SimpleSaleFirerer.java" line="0" />
</component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="19b165bf-e2da-4da1-acc7-2c26d2b83e8b" name="Default" comment="" /> <list default="true" id="19b165bf-e2da-4da1-acc7-2c26d2b83e8b" name="Default" comment="" />
<ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/out/" />
@ -26,6 +29,14 @@
</list> </list>
</option> </option>
</component> </component>
<component name="FindInProjectRecents">
<findStrings>
<find>com.pqt.core.entities.sale.Sale</find>
</findStrings>
<replaceStrings>
<replace>long</replace>
</replaceStrings>
</component>
<component name="GradleLocalSettings"> <component name="GradleLocalSettings">
<option name="externalProjectsViewState"> <option name="externalProjectsViewState">
<projects_view /> <projects_view />
@ -34,7 +45,6 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/log/ILoggable.java" />
<option value="$PROJECT_DIR$/pom.xml" /> <option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/product/ProductUpdate.java" /> <option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/product/ProductUpdate.java" />
<option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/QueryType.java" /> <option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/QueryType.java" />
@ -44,7 +54,6 @@
<option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/ConnectQuery.java" /> <option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/ConnectQuery.java" />
<option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/SimpleQuery.java" /> <option value="$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/query/SimpleQuery.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/UpdateBuilder.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/UpdateBuilder.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/ISimpleQueryCallback.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/ISimpleQueryCallback.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IStatQueryCallback.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IStatQueryCallback.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IStockQueryCallback.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IStockQueryCallback.java" />
@ -53,12 +62,7 @@
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogListenerAdapter.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogListenerAdapter.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/connection/listeners/IConnectionFirerer.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/connection/listeners/IConnectionFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockFirerer.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IUpdateQueryCallback.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleBuilder.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleService.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SimpleSaleFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SaleListenerAdapter.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogService.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogService.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogLineMakerManager.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogLineMakerManager.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/SimpleLogFirerer.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/SimpleLogFirerer.java" />
@ -72,7 +76,6 @@
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/account/listeners/SimpleAccountFirerer.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/account/listeners/SimpleAccountFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/StockListenerAdapter.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/StockListenerAdapter.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockListener.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockListener.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleListener.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogListener.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogListener.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/connection/listeners/IConnectionListener.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/connection/listeners/IConnectionListener.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/account/listeners/IAccountListener.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/account/listeners/IAccountListener.java" />
@ -85,6 +88,14 @@
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/listeners/StatListenerAdapter.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/listeners/StatListenerAdapter.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatDao.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatDao.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatService.java" /> <option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatService.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IUpdateQueryCallback.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IIdQueryCallback.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleListener.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SaleListenerAdapter.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleService.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SimpleSaleFirerer.java" />
<option value="$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleBuilder.java" />
</list> </list>
</option> </option>
</component> </component>
@ -102,7 +113,8 @@
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-7" /> <option name="x" value="249" />
<option name="y" value="-9" />
<option name="width" value="974" /> <option name="width" value="974" />
<option name="height" value="1047" /> <option name="height" value="1047" />
</component> </component>
@ -137,7 +149,7 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope" /> <pane id="AndroidView" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
@ -180,79 +192,6 @@
<item name="java" type="462c0819:PsiDirectoryNode" /> <item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" /> <item name="module" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="account" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="account" type="462c0819:PsiDirectoryNode" />
<item name="listeners" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="connection" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="connection" type="462c0819:PsiDirectoryNode" />
<item name="listeners" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="log" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="log" type="462c0819:PsiDirectoryNode" />
<item name="listeners" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="query" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" /> <item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" /> <item name="Workspace" type="462c0819:PsiDirectoryNode" />
@ -274,27 +213,6 @@
<item name="sale" type="462c0819:PsiDirectoryNode" /> <item name="sale" type="462c0819:PsiDirectoryNode" />
<item name="listeners" type="462c0819:PsiDirectoryNode" /> <item name="listeners" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="stat" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" />
<item name="client" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="main" type="462c0819:PsiDirectoryNode" />
<item name="java" type="462c0819:PsiDirectoryNode" />
<item name="module" type="462c0819:PsiDirectoryNode" />
<item name="stat" type="462c0819:PsiDirectoryNode" />
<item name="listeners" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="Main" type="b2602c69:ProjectViewProjectNode" /> <item name="Main" type="b2602c69:ProjectViewProjectNode" />
<item name="Workspace" type="462c0819:PsiDirectoryNode" /> <item name="Workspace" type="462c0819:PsiDirectoryNode" />
@ -334,8 +252,8 @@
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="AndroidView" />
<pane id="PackagesPane" /> <pane id="PackagesPane" />
<pane id="Scope" />
<pane id="Scratches" /> <pane id="Scratches" />
</panes> </panes>
</component> </component>
@ -767,11 +685,12 @@
<workItem from="1500496778101" duration="10559000" /> <workItem from="1500496778101" duration="10559000" />
<workItem from="1500548966272" duration="6327000" /> <workItem from="1500548966272" duration="6327000" />
<workItem from="1500649289222" duration="220000" /> <workItem from="1500649289222" duration="220000" />
<workItem from="1500652207907" duration="5819000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="27733000" /> <option name="totallyTimeSpent" value="33552000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
@ -785,30 +704,30 @@
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<layout> <layout>
<window_info id="TODO" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24347825" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24347825" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936078" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936078" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22707888" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.11247335" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Properties" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Properties" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout> </layout>
@ -830,14 +749,6 @@
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/client/pom.xml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="jar://C:/Program Files/Java/jdk1.8.0_131/src.zip!/java/util/Set.java"> <entry file="jar://C:/Program Files/Java/jdk1.8.0_131/src.zip!/java/util/Set.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1691"> <state relative-caret-position="-1691">
@ -873,13 +784,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="39" lean-forward="false" selection-start-line="2" selection-start-column="39" selection-end-line="2" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogFirerer.java"> <entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/listeners/ILogFirerer.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34"> <state relative-caret-position="34">
@ -945,66 +849,12 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IUpdateQueryCallback.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="24" lean-forward="false" selection-start-line="5" selection-start-column="24" selection-end-line="5" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="9" column="21" lean-forward="false" selection-start-line="9" selection-start-column="21" selection-end-line="9" selection-end-column="21" />
<folding>
<element signature="e#615#616#0" expanded="false" />
<element signature="e#636#637#0" expanded="false" />
<element signature="e#703#704#0" expanded="false" />
<element signature="e#724#725#0" expanded="false" />
<element signature="e#792#793#0" expanded="false" />
<element signature="e#813#814#0" expanded="false" />
<element signature="e#885#886#0" expanded="false" />
<element signature="e#909#910#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="20" lean-forward="false" selection-start-line="6" selection-start-column="20" selection-end-line="6" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SimpleSaleFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="21" lean-forward="false" selection-start-line="5" selection-start-column="21" selection-end-line="5" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SaleListenerAdapter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="21" lean-forward="false" selection-start-line="5" selection-start-column="21" selection-end-line="5" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogService.java"> <entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/log/LogService.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136"> <state relative-caret-position="136">
<caret line="8" column="21" lean-forward="false" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" /> <caret line="8" column="21" lean-forward="false" selection-start-line="8" selection-start-column="21" selection-end-line="8" selection-end-column="21" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1074,7 +924,7 @@
<state relative-caret-position="102"> <state relative-caret-position="102">
<caret line="9" column="20" lean-forward="false" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" /> <caret line="9" column="20" lean-forward="false" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1140,16 +990,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleListener.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="53" lean-forward="false" selection-start-line="6" selection-start-column="53" selection-end-line="6" selection-end-column="53" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockListener.java"> <entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stock/Listeners/IStockListener.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102"> <state relative-caret-position="102">
@ -1183,7 +1023,7 @@
<state relative-caret-position="119"> <state relative-caret-position="119">
<caret line="7" column="42" lean-forward="false" selection-start-line="7" selection-start-column="42" selection-end-line="7" selection-end-column="42" /> <caret line="7" column="42" lean-forward="false" selection-start-line="7" selection-start-column="42" selection-end-line="7" selection-end-column="42" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1204,24 +1044,16 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/listeners/SimpleStatFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatDao.java"> <entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/StatDao.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="954"> <state relative-caret-position="954">
<caret line="65" column="43" lean-forward="false" selection-start-line="65" selection-start-column="43" selection-end-line="65" selection-end-column="43" /> <caret line="65" column="43" lean-forward="false" selection-start-line="65" selection-start-column="43" selection-end-line="65" selection-end-column="43" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="false" />
<element signature="e#2000#2001#0" expanded="true" /> <element signature="e#2000#2001#0" expanded="false" />
<element signature="e#2053#2054#0" expanded="true" /> <element signature="e#2053#2054#0" expanded="false" />
<element signature="e#2108#2109#0" expanded="true" /> <element signature="e#2108#2109#0" expanded="false" />
<element signature="e#2158#2159#0" expanded="true" /> <element signature="e#2158#2159#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1231,15 +1063,15 @@
<state relative-caret-position="85"> <state relative-caret-position="85">
<caret line="5" column="0" lean-forward="true" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" /> <caret line="5" column="0" lean-forward="true" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="false" />
<element signature="e#239#240#0" expanded="true" /> <element signature="e#239#240#0" expanded="false" />
<element signature="e#274#275#0" expanded="true" /> <element signature="e#274#275#0" expanded="false" />
<element signature="e#377#378#0" expanded="true" /> <element signature="e#377#378#0" expanded="false" />
<element signature="e#408#409#0" expanded="true" /> <element signature="e#408#409#0" expanded="false" />
<element signature="e#460#461#0" expanded="true" /> <element signature="e#460#461#0" expanded="false" />
<element signature="e#498#499#0" expanded="true" /> <element signature="e#498#499#0" expanded="false" />
<element signature="e#553#554#0" expanded="true" /> <element signature="e#553#554#0" expanded="false" />
<element signature="e#594#595#0" expanded="true" /> <element signature="e#594#595#0" expanded="false" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -1251,6 +1083,108 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/QueryExecutor.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="8" column="2" lean-forward="false" selection-start-line="8" selection-start-column="2" selection-end-line="8" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/query/query_callback/IIdQueryCallback.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="20" lean-forward="false" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="10" column="62" lean-forward="false" selection-start-line="10" selection-start-column="62" selection-end-line="10" selection-end-column="62" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/ISaleListener.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="60" lean-forward="false" selection-start-line="12" selection-start-column="60" selection-end-line="12" selection-end-column="60" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SaleListenerAdapter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="51" lean-forward="false" selection-start-line="13" selection-start-column="51" selection-end-line="13" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/stat/listeners/SimpleStatFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="11" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/listeners/SimpleSaleFirerer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding>
<element signature="e#1410#1411#0" expanded="true" />
<element signature="e#1467#1468#0" expanded="true" />
<element signature="e#1659#1660#0" expanded="true" />
<element signature="e#1719#1720#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="67" lean-forward="false" selection-start-line="4" selection-start-column="67" selection-end-line="4" selection-end-column="67" />
<folding>
<element signature="e#518#519#0" expanded="true" />
<element signature="e#566#567#0" expanded="true" />
<element signature="e#609#610#0" expanded="true" />
<element signature="e#646#647#0" expanded="true" />
<element signature="e#878#879#0" expanded="true" />
<element signature="e#952#953#0" expanded="true" />
<element signature="e#1031#1032#0" expanded="true" />
<element signature="e#1110#1111#0" expanded="true" />
<element signature="e#1189#1190#0" expanded="true" />
<element signature="e#1270#1271#0" expanded="true" />
<element signature="e#1428#1429#0" expanded="true" />
<element signature="e#1475#1476#0" expanded="true" />
<element signature="e#1530#1531#0" expanded="true" />
<element signature="e#1580#1581#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/client/src/main/java/com/pqt/client/module/sale/SaleBuilder.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="952">
<caret line="65" column="0" lean-forward="true" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/core/src/main/java/com/pqt/core/entities/sale/Sale.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-423">
<caret line="14" column="13" lean-forward="false" selection-start-line="14" selection-start-column="13" selection-end-line="14" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

View File

@ -1,6 +1,6 @@
package com.pqt.client.module.query; package com.pqt.client.module.query;
import com.pqt.client.module.query.query_callback.IUpdateQueryCallback; import com.pqt.client.module.query.query_callback.IIdQueryCallback;
import com.pqt.core.entities.query.IQuery; import com.pqt.core.entities.query.IQuery;
import com.pqt.client.module.query.query_callback.ISimpleQueryCallback; import com.pqt.client.module.query.query_callback.ISimpleQueryCallback;
import com.pqt.client.module.query.query_callback.IStatQueryCallback; import com.pqt.client.module.query.query_callback.IStatQueryCallback;
@ -28,7 +28,7 @@ public class QueryExecutor {
return 0; return 0;
} }
public long execute(IQuery query, IUpdateQueryCallback callback) { public long execute(IQuery query, IIdQueryCallback callback) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package com.pqt.client.module.query.query_callback; package com.pqt.client.module.query.query_callback;
public interface IUpdateQueryCallback { public interface IIdQueryCallback {
public void ack(long id); public void ack(long id);
public void err(long id, Throwable cause); public void err(long id, Throwable cause);
public void ref(long id, Throwable cause); public void ref(long id, Throwable cause);

View File

@ -1,28 +1,76 @@
package com.pqt.client.module.sale; package com.pqt.client.module.sale;
import com.pqt.core.entities.client.Client;
import com.pqt.core.entities.product.Product; import com.pqt.core.entities.product.Product;
import com.pqt.core.entities.sale.Sale; import com.pqt.core.entities.sale.Sale;
import com.pqt.core.entities.sale.SaleStatus;
import com.pqt.core.entities.sale.SaleType;
import com.pqt.core.entities.user_account.Account;
import java.util.Date;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
//TODO écrire contenu méthodes
//TODO écrire javadoc //TODO écrire javadoc
public class SaleBuilder { public class SaleBuilder {
public boolean addProduct(Product product) { private Map<Product, Integer> products;
return false; private Account orderedFor, orderedBy;
private Client orderedWith;
private SaleType type;
public SaleBuilder() {
this.products = new HashMap<>();
orderedFor = null;
orderedBy = null;
}
public SaleBuilder addProduct(Product product) {
if(products.containsKey(product)){
//Check for sufficient stock
if(product.getAmountRemaining()<products.get(product)) {
products.replace(product, products.get(product) + 1);
}
}else{
products.put(product, 1);
}
return this;
} }
public boolean removeProduct(Product product) { public SaleBuilder removeProduct(Product product) {
return false; if(products.containsKey(product)) {
if (products.get(product) == 1)
products.remove(product);
else
products.replace(product, products.get(product) - 1);
}
return this;
} }
public Map<Product,Integer> getCurrentProductList() { public SaleBuilder orderedFor(Account account){
return null; orderedFor = account;
} return this;
}
public SaleBuilder orderedBy(Account account){
orderedBy = account;
return this;
}
public SaleBuilder orderedWith(Client client){
this.orderedWith = client;
return this;
}
public SaleBuilder saleType(SaleType type){
this.type = type;
return this;
}
public Sale build() { public Sale build() {
return null; return new Sale(0, products, new Date(), orderedWith, orderedBy, orderedFor, type, SaleStatus.PENDING);
} }
} }

View File

@ -1,30 +1,58 @@
package com.pqt.client.module.sale; package com.pqt.client.module.sale;
import com.pqt.client.module.query.QueryExecutor;
import com.pqt.client.module.query.QueryFactory;
import com.pqt.client.module.query.query_callback.IIdQueryCallback;
import com.pqt.client.module.sale.listeners.ISaleFirerer;
import com.pqt.client.module.sale.listeners.ISaleListener; import com.pqt.client.module.sale.listeners.ISaleListener;
import com.pqt.client.module.sale.listeners.SimpleSaleFirerer;
//TODO écrire contenu méthodes
//TODO écrire javadoc //TODO écrire javadoc
//TODO add log lines //TODO add log lines
public class SaleService { public class SaleService {
public void getNewSaleBuilder() { private ISaleFirerer eventFirerer;
public SaleService() {
eventFirerer = new SimpleSaleFirerer();
} }
public void commitSale(SaleBuilder saleBuilder) { public SaleBuilder getNewSaleBuilder() {
return new SaleBuilder();
} }
public long commitSale(SaleBuilder saleBuilder) {
return QueryExecutor.INSTANCE.execute(QueryFactory.newSaleQuery(saleBuilder.build()), new IIdQueryCallback() {
@Override
public void ack(long id) {
eventFirerer.fireSaleValidationSuccess(id);
}
@Override
public void err(long id, Throwable cause) {
eventFirerer.fireSaleValidationError(id, cause);
}
@Override
public void ref(long id, Throwable cause) {
eventFirerer.fireSaleValidationRefused(id, cause);
}
});
}
/*
TODO implémenter le revert de commande
public void revertSale(int saleId) { public void revertSale(int saleId) {
} }
*/
public void addListener(ISaleListener listener) { public void addListener(ISaleListener listener) {
eventFirerer.addListener(listener);
} }
public void removeListener(ISaleListener listener) { public void removeListener(ISaleListener listener) {
eventFirerer.removeListener(listener);
} }
} }

View File

@ -4,11 +4,11 @@ import com.pqt.core.entities.sale.Sale;
public interface ISaleFirerer { public interface ISaleFirerer {
public abstract void fireSaleValidationSuccess(Sale sale); public abstract void fireSaleValidationSuccess(long saleId);
public abstract void fireSaleValidationError(Sale sale, Throwable cause); public abstract void fireSaleValidationError(long saleId, Throwable cause);
public abstract void fireSaleValidationRefused(Sale sale, Throwable cause); public abstract void fireSaleValidationRefused(long saleId, Throwable cause);
public abstract void addListener(ISaleListener listener); public abstract void addListener(ISaleListener listener);

View File

@ -6,10 +6,10 @@ import java.util.EventListener;
public interface ISaleListener extends EventListener { public interface ISaleListener extends EventListener {
public abstract void onSaleValidationSuccess(Sale sale); public abstract void onSaleValidationSuccess(long saleId);
public abstract void onSaleValidationError(Sale sale, Throwable cause); public abstract void onSaleValidationError(long saleId, Throwable cause);
public abstract void onSaleValidationRefused(Sale sale, Throwable cause); public abstract void onSaleValidationRefused(long saleId, Throwable cause);
} }

View File

@ -2,33 +2,32 @@ package com.pqt.client.module.sale.listeners;
import com.pqt.core.entities.sale.Sale; import com.pqt.core.entities.sale.Sale;
//TODO écrire contenu méthodes
//TODO écrire javadoc //TODO écrire javadoc
public class SaleListenerAdapter implements ISaleListener { public class SaleListenerAdapter implements ISaleListener {
/** /**
* @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationSuccess(com.pqt.core.entities.sale.Sale) * @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationSuccess(long)
* *
* *
*/ */
public void onSaleValidationSuccess(Sale sale) { public void onSaleValidationSuccess(long saleId) {
} }
/** /**
* @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationError(com.pqt.core.entities.sale.Sale, Throwable) * @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationError(long, Throwable)
*/ */
public void onSaleValidationError(Sale sale, Throwable cause) { public void onSaleValidationError(long saleId, Throwable cause) {
} }
/** /**
* @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationRefused(com.pqt.core.entities.sale.Sale, Throwable) * @see com.pqt.client.module.sale.listeners.ISaleListener#onSaleValidationRefused(long, Throwable)
*/ */
public void onSaleValidationRefused(Sale sale, Throwable cause) { public void onSaleValidationRefused(long saleId, Throwable cause) {
} }

View File

@ -1,33 +1,44 @@
package com.pqt.client.module.sale.listeners; package com.pqt.client.module.sale.listeners;
import com.pqt.core.entities.sale.Sale; import javax.swing.event.EventListenerList;
//TODO écrire contenu méthodes
//TODO écrire javadoc //TODO écrire javadoc
public class SimpleSaleFirerer implements ISaleFirerer { public class SimpleSaleFirerer implements ISaleFirerer {
/** private EventListenerList listeners;
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationSuccess(com.pqt.core.entities.sale.Sale)
*/
public void fireSaleValidationSuccess(Sale sale) {
public SimpleSaleFirerer() {
listeners = new EventListenerList();
}
/**
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationSuccess(long)
*/
public void fireSaleValidationSuccess(long saleId) {
for(ISaleListener l : listeners.getListeners(ISaleListener.class)){
l.onSaleValidationSuccess(saleId);
}
} }
/** /**
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationError(com.pqt.core.entities.sale.Sale, Throwable) * @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationError(long, Throwable)
*/ */
public void fireSaleValidationError(Sale sale, Throwable cause) { public void fireSaleValidationError(long saleId, Throwable cause) {
for(ISaleListener l : listeners.getListeners(ISaleListener.class)){
l.onSaleValidationError(saleId, cause);
}
} }
/** /**
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationRefused(com.pqt.core.entities.sale.Sale, Throwable) * @see com.pqt.client.module.sale.listeners.ISaleFirerer#fireSaleValidationRefused(long, Throwable)
*/ */
public void fireSaleValidationRefused(Sale sale, Throwable cause) { public void fireSaleValidationRefused(long saleId, Throwable cause) {
for(ISaleListener l : listeners.getListeners(ISaleListener.class)){
l.onSaleValidationRefused(saleId, cause);
}
} }
@ -35,7 +46,7 @@ public class SimpleSaleFirerer implements ISaleFirerer {
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#addListener(com.pqt.client.module.sale.listeners.ISaleListener) * @see com.pqt.client.module.sale.listeners.ISaleFirerer#addListener(com.pqt.client.module.sale.listeners.ISaleListener)
*/ */
public void addListener(ISaleListener listener) { public void addListener(ISaleListener listener) {
listeners.add(ISaleListener.class, listener);
} }
@ -43,7 +54,7 @@ public class SimpleSaleFirerer implements ISaleFirerer {
* @see com.pqt.client.module.sale.listeners.ISaleFirerer#removeListener(com.pqt.client.module.sale.listeners.ISaleListener) * @see com.pqt.client.module.sale.listeners.ISaleFirerer#removeListener(com.pqt.client.module.sale.listeners.ISaleListener)
*/ */
public void removeListener(ISaleListener listener) { public void removeListener(ISaleListener listener) {
listeners.remove(ISaleListener.class, listener);
} }
} }

View File

@ -3,7 +3,7 @@ package com.pqt.client.module.stock;
import com.pqt.client.module.query.QueryExecutor; import com.pqt.client.module.query.QueryExecutor;
import com.pqt.client.module.query.QueryFactory; import com.pqt.client.module.query.QueryFactory;
import com.pqt.client.module.query.query_callback.IStockQueryCallback; import com.pqt.client.module.query.query_callback.IStockQueryCallback;
import com.pqt.client.module.query.query_callback.IUpdateQueryCallback; import com.pqt.client.module.query.query_callback.IIdQueryCallback;
import com.pqt.client.module.stock.Listeners.IStockFirerer; import com.pqt.client.module.stock.Listeners.IStockFirerer;
import com.pqt.client.module.stock.Listeners.IStockListener; import com.pqt.client.module.stock.Listeners.IStockListener;
import com.pqt.client.module.stock.Listeners.SimpleStockFirerer; import com.pqt.client.module.stock.Listeners.SimpleStockFirerer;
@ -75,7 +75,7 @@ public class StockDao {
} }
public long commitUpdate(List<ProductUpdate> updates){ public long commitUpdate(List<ProductUpdate> updates){
return QueryExecutor.INSTANCE.execute(QueryFactory.newUpdateQuery(updates),new IUpdateQueryCallback(){ return QueryExecutor.INSTANCE.execute(QueryFactory.newUpdateQuery(updates),new IIdQueryCallback(){
@Override @Override
public void ack(long id) { public void ack(long id) {

View File

@ -1,10 +1,5 @@
package com.pqt.client.module.stock; package com.pqt.client.module.stock;
import com.pqt.client.module.query.QueryExecutor;
import com.pqt.client.module.query.QueryFactory;
import com.pqt.client.module.query.query_callback.IUpdateQueryCallback;
import com.pqt.client.module.stock.Listeners.IStockFirerer;
import com.pqt.client.module.stock.Listeners.SimpleStockFirerer;
import com.pqt.core.entities.product.Product; import com.pqt.core.entities.product.Product;
import com.pqt.client.module.stock.Listeners.IStockListener; import com.pqt.client.module.stock.Listeners.IStockListener;