-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gh6072 3 add purchase orders to shipper transportation #6112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please check my comments (=>DDD)
- when you have your little domain model, it should also be quite easy to add unit tests and drive your code a bit.
- @teosarca wdyt?
* #L% | ||
*/ | ||
@Repository | ||
public class PurchaseOrderToShipperTransportationRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at the code this is not a repository.
in my mind a repository is something where you can load and save entities.
@teosarca wdyt, is it sufficient to simply rename this to something that ends with ...Service
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..or mayby ..DAO
, sinse we already have a service which is more BL'ish, compared to this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...oooor maybe we can start with a small shipperTeansportation entity...
we could have a repo for it..and it could have a purchase order ids, and code such as C_Order_AddTo_M_ShipperTransportation
could add another one, instead of having this addPurchaseOrderToShipperTransportation
And then the repo could save it, by behind the scenes creating that I_M_Package
and that I_M_ShippingPackage
Here is an overview of what got changed by this pull request: Complexity increasing per file
==============================
- de.metas.business/src/main/java/de/metas/shipping/PurchaseOrderToShipperTransportationService.java 2
- de.metas.business/src/main/java/de/metas/shipping/api/impl/ShipperTransportationDAO.java 3
- de.metas.business/src/main/java/de/metas/shipping/process/C_Order_AddTo_M_ShipperTransportation.java 2
- de.metas.business/src/main/java/de/metas/shipping/PurchaseOrderToShipperTransportationRepository.java 1
- de.metas.business/src/test/java/de/metas/shipping/PurchaseOrderToShipperTransportationServiceTest.java 1
Complexity decreasing per file
==============================
+ de.metas.swat/de.metas.swat.base/src/main/java/de/metas/tourplanning/process/M_ShippingPackage_CreateFromTourplanning.java -2
See the complete overview on Codacy |
#6072