-
Notifications
You must be signed in to change notification settings - Fork 0
Type-specific entity states #56
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
Conversation
Also: * Improve common test fixtures.
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.
Pull Request Overview
This PR updates the entity state implementation to support different entity kinds (Aggregate, ProcessManager, Projection, and generic Entity) by making entity states implement more specific interfaces based on their EntityOption.kind value. The version is bumped from 2.0.0-SNAPSHOT.027 to 2.0.0-SNAPSHOT.028.
Key changes:
- Enhanced
ImplementEntityStateto select the appropriate entity state interface based on entity kind - Added new test entities (
TransitionandBlob) to test different entity kinds - Refactored test utilities to use an extension property for generating Java file paths
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Bumped version to 2.0.0-SNAPSHOT.028 |
| pom.xml | Updated version reference to 2.0.0-SNAPSHOT.028 |
| entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt | Enhanced to select entity state interface based on EntityOption kind |
| entity-tests/src/testFixtures/proto/given/entities/organization.proto | Added Transition and Blob test entities |
| entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityStateSpec.kt | New test file verifying correct interface selection |
| entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/EntityPluginTestSetup.kt | Refactored to use extension property for Java file paths |
| entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/query/*.kt | Updated to use refactored departmentJava property |
| entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/field/AddFieldClassSpec.kt | Updated to use refactored departmentJava property |
| entity-tests/src/test/kotlin/io/spine/tools/core/jvm/entity/column/AddColumnClassSpec.kt | Updated to use refactored departmentJava property |
| dependencies.md | Auto-generated dependency report updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt
Outdated
Show resolved
Hide resolved
entity/src/main/kotlin/io/spine/tools/core/jvm/entity/ImplementEntityState.kt
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…o type-specific-entity-states
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.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR extends the CoreJvm Compiler to use
ProcessManagerState,AggregateState, andProjectionStateinstead ofEntityStatewhen an entitykindset in the proto option is other thanENTITY. This is needed to allow specific generic type binding in corresponding entity classes in CoreJvm.