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

s2.spring.automate.data.S2SpringDataSuspendConfigurerAdapter.kt Maven / Gradle / Ivy

The newest version!
package s2.spring.automate.data

import org.springframework.data.repository.kotlin.CoroutineCrudRepository
import s2.automate.core.persist.AutomatePersister
import s2.dsl.automate.Evt
import s2.dsl.automate.S2Automate
import s2.dsl.automate.S2State
import s2.dsl.automate.model.WithS2Id
import s2.dsl.automate.model.WithS2State
import s2.spring.automate.S2ConfigurerAdapter
import s2.spring.automate.data.persister.SpringDataAutomateCoroutinePersister
import s2.spring.automate.executor.S2AutomateExecutorSpring

abstract class S2SpringDataSuspendConfigurerAdapter(
	private val aggregateRepository: CoroutineCrudRepository
) : S2ConfigurerAdapter() where
EVENT : Evt,
STATE : S2State,
ENTITY : WithS2State,
ENTITY : WithS2Id,
AGGREGATE : S2AutomateExecutorSpring {

	override fun aggregateRepository(): AutomatePersister {
		return SpringDataAutomateCoroutinePersister(
			aggregateRepository
		)
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy