All Downloads are FREE. Search and download functionalities are using the official Maven repository.

s2.spring.sourcing.ssm.noview.EntityStatusModelViewer.kt Maven / Gradle / Ivy

The newest version!
package s2.spring.sourcing.ssm.noview//package s2.spring.sourcing.ssm
//
//import s2.dsl.automate.Evt
//import s2.dsl.automate.Msg
//import s2.dsl.automate.model.WithS2Id
//import s2.dsl.automate.model.WithS2State
//import s2.sourcing.dsl.view.View
//
//class StateEntity(
//	val id: ID,
//	var state: STATE
//) : WithS2State, WithS2Id {
//	override fun s2State() = state
//	override fun s2Id() = id
//}
//
//class EntityStatusModelViewer : View> where
//EVENT : WithS2Id,
//EVENT : WithS2State,
//EVENT : Evt {
//	override suspend fun evolve(event: EVENT, model: StateEntity?): StateEntity {
//		return model?.apply {
//			state = event.s2State()
//		} ?: StateEntity(id = event.s2Id(), state = event.s2State())
//	}
//}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy