Skip to content

Conversation

@technologic-technologic
Copy link
Owner

  • Added CrossOrigin comment to enable communication between UI and BS.
  • Added configuration properties to connect to DB
  • Modified Product attributes to comply with oracleDB rules.
  • Created ProductFilter.java to help me make filtered searches with specs technology (JpaSpecificationExecutor):
    • nameContains: query for searching case-insensitive names in the inventory.
    • categoryContains: query for searching case-insensitive categories in the inventory
    • quantityEquals: query for seaching for products availability in stock.
  • Added the logic in ProductServiceImpl.findByNameAndCategoryAndStockQuantity to utilize productFilter static methods and make the queries to db; implemented Pageable to sort and pagination.
  • Adedd javadocs to comment code
  • Change the version from 0.0.1-SNAPSHOT to 1.0.0
    Backend is now working as intended and required for the breakableToy 1

Nice to have in the future:

  • Availability to restore the stock using web browser cache, or something like that.

Modified Product's ID attribute to comply with database RAW Id type
BS is operative now. Complying to the requirements.
Changing the version to 1.0.0, although is not going tio be necessary.
Added javadocs comments for documentation.

Nice to have in the feature:
*Availability to restore the stock using web browser cache, or something like that. Probably cookies of some sort.
@technologic-technologic
Copy link
Owner Author

Seems okay to me 👍

Modified pom.xml:
 - Moved hardcoded versions to the properties block
Modified pom.xml:
 - Added lombok dependency (version:1.18.38) to manage getters & setters
Modified Product.java:
 - Deleted getters & setters
 - Enabled lombok dependency to keep the code clean
 - ...Next project will use ID instead of UUID
* Deleted application.properties
* Created application.yml
* Deleted unused FilteredSearch.java. Following the YAGNI principle. Wasn´t needed
Modified ProductServiceImpl.java
 - Added method/logic to delete products.
* Products are DELETED as no safe-delete was needed in this project
ProductServiceImpl.java:
 - Removed hardcoded value from updateStock method
 - Added condition to avoid a db call to save the same information

ProductService.java & InventoryManagerController.java:
 - Updated method signatures to return a DTO to prevent exposing sensitive data. No multiple layers needed.

ProductFilter.java:
 - Updated quantityEquals method to comply with client requests
Modified files:
- ProductRepository.java: added definition to repository to make the necessary query
- ProductMapper.java: Transform the InventorySummaryInterface from the repository method to a response appropriate data type for the endpoint.
- InventoryService.java: added definition for the summary/metrics new method
- InventoryServiceImpl.java: added implementation of the new method from the InventoryService.java
- InventoryManagerController.java: added endpoint for summary
@technologic-technologic technologic-technologic merged commit 2208829 into Stage Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants