Feature/keep selected#17
Open
bekam-bit wants to merge 14 commits into
Open
Conversation
- Introduced `ActuatorManager`, `ItemTracker`, `ProductionLine`, `SensorManager`, and `SimulationEngine` classes for managing automation processes. - Implemented `DatabaseManager` for SQLite database interactions, including connection handling and CRUD operations. - Created `ProductItem` entity to replace the deprecated `Product` class, enhancing item tracking capabilities. - Developed `Logger` utility for logging events and errors within the system. - Added `ConsoleApp` and `ConsoleUI` for user interaction and simulation control. - Removed obsolete `EventLog` and `ProductRepository` classes to streamline the codebase. - Updated package structure to follow consistent naming conventions.
feat: Add core automation components and database management
- Updated WeightSensor class to improve weight simulation and calibration logic. - Enhanced the constructor to support initialization with explicit sensor ID. - Implemented ClockObserver interface for better time-based weight updates. - Refactored Repository class methods to streamline database interactions using a functional RowMapper. - Improved SensorRepository to handle both TemperatureSensor and WeightSensor with appropriate database operations. - Added safe getters for ResultSet to handle potential null values gracefully. - Created new test and demo classes for sensor initialization and management. - Introduced package-lock.json and package.json for dependency management.
…r lifecycle methods
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs a major refactoring of the factory automation system, standardizing package naming conventions and introducing new sensor implementations with a clock-based simulation engine.
Key Changes:
- Standardized package naming from
org.Automationtoorg.automation(lowercase) - Introduced new sensor architecture with
Sensor,TemperatureSensor, andWeightSensorclasses implementing simulation clock observers - Refactored database layer with improved
DatabaseManagerand repository pattern - Added comprehensive test utilities and demo classes
Reviewed changes
Copilot reviewed 48 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/main/java/org/automation/ui/ConsoleUI.java |
Updated package name to lowercase, cleaned up whitespace |
src/main/java/org/automation/ui/ConsoleApp.java |
New file entirely commented out - complete sensor management UI implementation |
src/main/java/org/automation/repositories/*.java |
Package rename and import path corrections for database layer |
src/main/java/org/automation/entities/Sensor*.java |
New sensor implementations with clock-based simulation and lifecycle management |
src/main/java/org/automation/engine/*.java |
New simulation engine and clock observer pattern implementation |
src/main/java/org/automation/database/*.java |
Refactored database manager with improved query/mutator pattern |
src/main/java/org/automation/controllers/SensorManager.java |
New centralized sensor management controller |
src/main/java/org/automation/TestSensorManager.java |
New interactive test utility for sensor management |
pom.xml |
Updated dependencies, removed JavaFX, added exec plugin configuration |
Old org/Automation files |
Deleted old package structure files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public int getSensorId() { return sensorId; } | ||
| public String getSensorType() { return sensorType; } | ||
| public String getLocation() { return location; } | ||
| public String getStatus() { return status; } |
There was a problem hiding this comment.
This get method is unsynchronized, but the corresponding set method is synchronized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.