From 20ac907c734ac2b341c780e9b4e88ffbc498341e Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Mon, 9 Oct 2017 16:20:57 +0200 Subject: [PATCH] Module Client : correction erreurs de compilation + suppression import inutiles --- .../gui/modules/sale_screen/SaleScreenController.java | 6 ++++-- .../pqt/client/gui/modules/sale_screen/SaleScreenModel.java | 3 ++- .../main/java/com/pqt/client/module/sale/SaleService.java | 2 -- .../src/main/java/com/pqt/client/module/stat/StatDao.java | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java index 6640d324..6bdfb43f 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenController.java @@ -13,7 +13,9 @@ import com.pqt.core.entities.user_account.Account; import com.pqt.core.entities.user_account.AccountLevel; import javafx.event.Event; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; class SaleScreenController { @@ -45,7 +47,7 @@ class SaleScreenController { @Override public void onAccountListUpdatedEvent() { - view.setAccounts(model.getAccountList()); + view.setAccounts(new ArrayList<>(model.getAccountList())); } @@ -99,7 +101,7 @@ class SaleScreenController { return model.getProductList(); } private List fetchAccountList(){ - return model.getAccountList(); + return new ArrayList<>(model.getAccountList()); } private List fetchSaleTypeList(){ return model.getSaleTypeList(); diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java index 8a07a511..2aeed7e0 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/modules/sale_screen/SaleScreenModel.java @@ -17,6 +17,7 @@ import com.pqt.core.entities.user_account.AccountLevel; import javax.swing.event.EventListenerList; import java.util.Arrays; +import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -143,7 +144,7 @@ class SaleScreenModel { .forEach(ISaleScreenModelListener::onAccountConnectedStateUpdatedEvent); } - List getAccountList() { + Collection getAccountList() { return accountService.getAllAccounts(); } diff --git a/Workspace/client/src/main/java/com/pqt/client/module/sale/SaleService.java b/Workspace/client/src/main/java/com/pqt/client/module/sale/SaleService.java index 53eefc4a..7f3235a9 100644 --- a/Workspace/client/src/main/java/com/pqt/client/module/sale/SaleService.java +++ b/Workspace/client/src/main/java/com/pqt/client/module/sale/SaleService.java @@ -1,8 +1,6 @@ package com.pqt.client.module.sale; import com.pqt.client.module.query.QueryExecutor; -import com.pqt.client.module.query.QueryMessageFactory; -import com.pqt.client.module.query.query_callback.ICollectionItemMessageCallback; import com.pqt.client.module.query.query_callback.INoItemMessageCallback; import com.pqt.client.module.sale.listeners.ISaleFirerer; import com.pqt.client.module.sale.listeners.ISaleListener; diff --git a/Workspace/client/src/main/java/com/pqt/client/module/stat/StatDao.java b/Workspace/client/src/main/java/com/pqt/client/module/stat/StatDao.java index 881c73ce..5a0444b5 100644 --- a/Workspace/client/src/main/java/com/pqt/client/module/stat/StatDao.java +++ b/Workspace/client/src/main/java/com/pqt/client/module/stat/StatDao.java @@ -1,7 +1,6 @@ package com.pqt.client.module.stat; import com.pqt.client.module.query.QueryExecutor; -import com.pqt.client.module.query.QueryMessageFactory; import com.pqt.client.module.query.query_callback.IMapItemMessageCallback; import com.pqt.client.module.stat.listeners.IStatFirerer; import com.pqt.client.module.stat.listeners.IStatListener;